Question : EJB Exception in WebServer

Hi, I am getting this exception when the web server is starting :

Failed to load servlet: : Naming Exception while looking up obj java:comp/env/ejb/crossStateless
    at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletInstance.java:99)
      at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycleServlet.java:147)
      at com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecycleServlet.java:270)
      at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleServlet.java:113)
      at com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:189)
      at javax.servlet.GenericServlet.init(GenericServlet.java:258)

Caused by: javax.naming.NameNotFoundException: Name comp/env/ejb not found in context "java:".
      at com.ibm.ws.naming.ipbase.NameSpace.getParentCtxInternal(NameSpace.java:1663)
      at com.ibm.ws.naming.ipbase.NameSpace.lookupInternal(NameSpace.java:1009)
      at com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpace.java:932)
      at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java:1261)
      at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:196)

Any idea, what is the problem?

Thanks

Answer : EJB Exception in WebServer

The NameNotFoundException is the clue.  I bet you have a problem with your classloader / classpath.

This article "TroubleShooting: Classloader problems for WebSphere Application Server"
http://www.IBM.com/support/docview.wss?rs=180&uid=swg21219358 does a pretty good job of helping with many/most of this kind of issue.

Take a look and see if it helps you, and let me know.
Random Solutions  
 
programming4us programming4us