Women in Technology

Hear us Roar

  Deploying Web Applications to Tomcat
Subject:   I am not able access a EJB from a servlet running on a tomcat webroser
Date:   2003-02-24 06:36:13
From:   modiba
I have just started learning Java. I have created an entity bean and deployed on a j2ee refernce server. I have included Client.jar file in CLASSPATH variableThen I created a standalone application and it works fine. Now I am trying to use it in servlet deployed on a tom cat web server I get following error message-
javax.servlet.ServletException: Servlet execution threw an exception
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
root cause

java.lang.NoClassDefFoundError: javax/ejb/EJBHome
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:493)


It seems that eventhough j2ee.jar is there in CLASSPATH variable TOM cat server is not using it and its uanble to find it. There must be some setting in some xml file which will allow me to do this. I am not sure about this Can you help me in this?

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • I am not able access a EJB from a servlet running on a tomcat webroser
    2004-01-13 11:50:27  anonymous2 [View]

    try to put your ejb.jar and j2ee.jar in the WEB-INF/lib/...
    It seems that Tomcat doesnt consider at all the classpath .

    Hope it helps
    Rachid K.