> From: Pankaj Tandon [mailto:pankajtan...@gmail.com]
> Subject: Using JMX with Tomcat: classloading issues
> 
> Because rt.jar is (probably) used by the bootstrap classloader,
> I HAVE to include weblogic.jar in the CATALINA_HOME/common/lib
> directory.

Yes, rt.jar is handled by the bootstrap classloader.  Why do you think that 
requires placing weblogic.jar in common/lib?  It should work properly in your 
webapp's WEB-INF/lib, which would be the preferred location.

However, weblogic.jar may contain classes that Tomcat already supplies (notably 
the ones in servlet-api.jar), so these would need to be removed from 
weblogic.jar before you can use it anywhere.

> I can get the JMX part of the solution to work because both, rt.jar and
> weblogic.jar are loaded by the same (system) classloader.

That statement is also not true.  As previously established, rt.jar is handled 
by the bootstrap classloader, while jars in common/lib are handled by Tomcat's 
common classloader.

> But then my Jython classes do not work because jython.jar is tucked
> away in the webapp's WEB-INF/lib dir of the webapp and my Jython 
> solution needs classes from weblogic.jar which is loaded by the
> system classloader and hence in a different namespace.

I think you're misinterpreting whatever symptoms you're encountering.  None of 
what you describe so far is a problem, although you do have some misconceptions 
about how classloading in Tomcat works.

What symptoms are you seeing?  (You never actually said.)

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to