You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Duncan MacRae <dc...@hotmail.com> on 2011/02/19 01:37:34 UTC

Tomcat 6.0 and 7.0 Class Loaders

 
According to the diagrams on the following pages:
http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html
http://tomcat.apache.org/tomcat-7.0-doc/class-loader-howto.html
 
There is no longer a shared class loader in Tomcat, so why does the catalina.properties still contain the shared.loader property? 
 
 
I am trying to deploy JAXWS RI on Tomcat 6.0.20.
 
I have tried the shared.loader and server.loader properties. Neither worked, but the comon.loader property worked. Should these be removed or is there something I am missing?
 
 		 	   		  

RE: Tomcat 6.0 and 7.0 Class Loaders

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Duncan MacRae [mailto:dcmacrae@hotmail.com] 
> Subject: RE: Tomcat 6.0 and 7.0 Class Loaders

> I have installed the JAXWS JAR files at 
> ${catalina.home}/jaxws/*.jar for Tomcat 6.0.20. 

Might want to upgrade your Tomcat version - that one's almost two years old.

> This catalina.properties configurations works:
> common.loader=${catalina.home}/lib,${catalina.home}/lib/*.jar,
>               ${catalina.home}/jaxws/*.jar
> shared.loader=

> This one does not:
> common.loader=${catalina.home}/lib,${catalina.home}/lib/*.jar
> shared.loader=${catalina.home}/jaxws/*.jar

What does "does not work" mean?  (Exact error, please, including stack trace.)

What classes are trying to reference the JAXWS ones?  If it's any handled by the common loader, they will not be able to see classes from the shared loader.

Just to verify that the shared loader does work properly, I modified catalina.properties for Tomcat 7.0.5 to use this line:

shared.loader=${catalina.base}/shared,${catalina.base}/shared/*.jar

and moved (not copied) the following files from the examples webapp to it:

WEB-INF/classes/CookieExample.class
WEB-INF/classes/HelloWorldExample.class
WEB-INF/classes/LocalStrings.properties
WEB-INF/lib/jstl.jar
WEB-INF/lib/standard.jar

Cleared out the work and logs directories, started Tomcat, and all examples worked as expected.  The first time, I forgot to move LocalStrings.properties, and that resulted in a 500 status, with this exception:

java.util.MissingResourceException: Can't find bundle for base name LocalStrings, locale en_US

since the classes processed by the shared loader can't look downwards for the messages file.

 - 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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Tomcat 6.0 and 7.0 Class Loaders

Posted by Duncan MacRae <dc...@hotmail.com>.
I have installed the JAXWS JAR files at ${catalina.home}/jaxws/*.jar for Tomcat 6.0.20. 
 
 
This catalina.properties configurations works:
  common.loader=${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.home}/jaxws/*.jar
  shared.loader=
 

This one does not:
  common.loader=${catalina.home}/lib,${catalina.home}/lib/*.jar
  shared.loader=${catalina.home}/jaxws/*.jar

 
 

> From: Chuck.Caldarale@unisys.com
> To: users@tomcat.apache.org
> Date: Fri, 18 Feb 2011 22:08:59 -0600
> Subject: RE: Tomcat 6.0 and 7.0 Class Loaders
> 
> > From: Duncan MacRae [mailto:dcmacrae@hotmail.com] 
> > Subject: Tomcat 6.0 and 7.0 Class Loaders
> 
> > There is no longer a shared class loader in Tomcat, so why does
> > the catalina.properties still contain the shared.loader property? 
> 
> You can still configure a shared loader if you wish - even the server loader is still available; it's just that neither is enabled by default in order to minimize overhead. You're free to add paths to either in catalina.properties - but why would you want to?
> 
> - 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-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
 		 	   		  

RE: Tomcat 6.0 and 7.0 Class Loaders

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Duncan MacRae [mailto:dcmacrae@hotmail.com] 
> Subject: Tomcat 6.0 and 7.0 Class Loaders

> There is no longer a shared class loader in Tomcat, so why does
> the catalina.properties still contain the shared.loader property? 

You can still configure a shared loader if you wish - even the server loader is still available; it's just that neither is enabled by default in order to minimize overhead.  You're free to add paths to either in catalina.properties - but why would you want to?
 
 - 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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org