I'm attempting to call an EJB on a remote server. My runtime for the remote connection to the EJB is a Tomcat 5.5 server. When I instatiate my object making the call I get the following error:
dependent class 'javax/ejb/EJBHome' not found in classpath
The j2ee.jar exists in both my WEB-INF/lib directory of the web app making the call and the server/common/lib of Tomcat. I'm also using Eclipse 3.2 as my IDE and starting Tomcat from the IDE. It seems to me like the class should be in the classpath, does anyone have any ideas why the class can't be found by Tomcat? Thanks.
Sometimes your Eclipse setup could also be the issue. Could you try deploying your application which calls the EJB on Tomcat and start Tomcat from commad line. Also can you attach the stack trace of the exception.
When I place the j2ee.jar file in the common/lib directory I get the following error:
java.lang.NoSuchMethodException: org.apache.catalina.startup.Catalina.setAwait(boolean) at java.lang.Class.getMethod(Unknown Source) at org.apache.catalina.startup.Bootstrap.setAwait(Bootstrap.java:359) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431) Any ideas on why that exception might be thrown?
java.lang.NoSuchMethodException usally is caused due to incompatibilites. The jar you are putting in your classpath is not compatible with your tomcat version or some of the other libs you are using. Maybe upgrading to a newer tomcat version is a good solution.