• Post Reply Bookmark Topic Watch Topic
  • New Topic

Remote Web EJB Client Configuration  RSS feed

John Olmstead
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to use our primary Tomcat Web container to access ejb resources from an application server running remotely on a seperate box. In order for classes in the web container to function as an ejb client, classes from the j2ee.jar file are required. However, this jar has classes of the same signature from the javax.Servlet package in the Servlet.jar file and the relevent Servlet Spec prohibits this.

Error logging reports the following :

WebappClassLoader: validateJarFile(C:\Tomcat4\webapps\ems\WEB-INF\lib\j2ee.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

The referenced Servlet specification is :

SRV.9.7.2 Web Application Classloader
The classloader that a container uses to load a servlet in a WAR must allow thedeveloper to load any resources contained in library JARs within the WARfollowing normal J2SE semantics using getResource. It must not allow theWAR tooverride J2SE or Java servlet API classes. It is further recommended that the loadernot allow servlets in theWAR access to the web container’s implementation classes.It is recommended also that the application class loader be implemented sothat classes and resources packaged within the WAR are loaded in preference toclasses and resources residing in container-wide library JARs.

Clearly, both of these jars cannot be in the classpath. So the question is, what is the standard practice for accessing J2EE applications from remote web clients?
Much Thanks and Appreciation;
John Olmstead
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!