tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Treves" <dw...@macam.ac.il>
Subject newbie Q about EJB from servlets
Date Wed, 17 Oct 2001 07:23:27 GMT
Hi, Iam trying to get a reference to an EJB object from a servlet. I set the
following tag in the web.xml file:

 <ejb-ref>
  <description>reference to LoginBean</description>
  <ejb-ref-name>ejb/AuthHome</ejb-ref-name>
  <ejb-ref-type>Session</ejb-ref-type>
  <home>macam.common.ejb.authBean.AuthHome</home>
  <remote>macam.common.ejb.authBean.Auth</remote>
 </ejb-ref>

If my servlet code tries to get the EJB reference I get the following error:

java.lang.NoClassDefFoundError: javax/ejb/CreateException.....  (the rest at
the bottom - if it matters)

I have under "WEB-INF\classes" the whole package of my EJBs, yet it throws
tht exception. By the way, if I try to catch also javax.ejb.RemoveException
in my code I get the same error but regarding RemoveException (instead
CreateException)

Any idea what I am missing here? do I need some <env-entry> tags that I am
not aware of?

I should add that the EJB object itself is available all along (waiting for
calls).

Here is the complete error message:




A Servlet Exception Has Occurred
Exception Report:
javax.servlet.ServletException: Cannot allocate servlet instance for path
/webTrails/servlet/login
 at
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java
:415)
 at
org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:216)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:1145)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:215)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2366)
 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1005)
 at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1098
)
 at java.lang.Thread.run(Thread.java:539)

Root Cause:
java.lang.NoClassDefFoundError: javax/ejb/CreateException
 at java.lang.Class.getDeclaredConstructors0(Native Method)
 at java.lang.Class.privateGetDeclaredConstructors(Class.java:1581)
 at java.lang.Class.getConstructor0(Class.java:1753)
 at java.lang.Class.newInstance0(Class.java:271)
 at java.lang.Class.newInstance(Class.java:254)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:832)
 at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:621)
 at
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java
:396)
 at
org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:216)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:1145)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:215)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2366)
 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1005)
 at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1098
)
 at java.lang.Thread.run(Thread.java:539)


Mime
View raw message