tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik G. Dybdahl" <gront...@yahoo.no>
Subject Re: TOMCAT3.2 BUG
Date Sat, 27 Jan 2001 18:39:32 GMT
I have tried to put a similar question in this newsgroup, without getting any
answers. Also tried other places, like the discussiong forum at Sun.
This is somewhat curious, because hopefully we are not the only ones trying to
access EJB's from JSP-pages.
Fact is:
The classes (and other resources, like jndi.properties) needed when accessing
remote objects like EJB's from JSP have to reside in the classpath used when
Tomcat is started. It does not work if they are put under the web-application
WEB-INF catalog. (BTW, this also applies eg. to the JRun 3.0 JSP-engine.) I
think the problem is that different classloaders are involved here. If you put
the class-definition for eg. an Enity Bean in a jar-file that is placed in
WEB-INF/lib, an Exception is thrown from java.net.URLClassLoader when the
remote object is received from the server (because the class defintion is not
found). Putting it in Tomcat's lib-directory "solves" this problem. Similar
problem is with the classes you mention.
Question is:
Where do the problem belong? Should it be posted as a bug in JDK 1.3?
Or should JSP-engines like Tomcat and JRun handle the situation?
I'm not sure, and it would be interesting to hear other opinions on this issue.
erik
--- shiva nand tripathi <shivanandt@rediffmail.com> skrev: > I am integrating
Apache Web server, Tomcat and Jboss (EJB container). Tomcat
> is running out of Apache process using mod_jk adapter. Tomcat is working fine
> for serving normal servlets and jsp. I deployed EJB on jBoss and accessed
> that by creating one java client application, it worked all right. Now when i
> want to access that EJB through Servlet, it is giving problems. I copied all
> the libraries required for client (ejb.jar, jnp-client.jar, jboss-client.jar
> and jta-spec.jar) to WEB-INF/lib, servlet and other helping classes to
> WEB-INF/classes. Now when i access the Servlet it gives " Cannot instantiate
> class: org.jnp.interf aces.NamingContextFactory. Root exception is
> java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory"
> Though this class is available in jnp-client.jar library which is in
> WEB-INF/lib directory. As per Tomcat documentation, Tomcat will include all
> jar files from WEB-INF/lib/ to classpath, but it is not working here. When i
> copied that the suppored client library files, jnp-client.jar etc ... to
> TOMCAT_HOME/lib, it started working. This shows that WEB-INF/lib/*.jar are
> not included in classpath. HELP?????????????????????????? 
> 
> 
> 
> 
> 
> 
> _____________________________________________________
> Chat with your friends as soon as they come online. Get Rediff Bol at
> http://bol.rediff.com
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-user-help@jakarta.apache.org
> 


_______________________________________________________
Do You Yahoo!?
Del dine bilder med andre på http://no.photos.yahoo.com

Mime
View raw message