You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ehuard <na...@elisehuard.be> on 2008/01/15 16:13:21 UTC

Tomcat 4.1.30 classloader problem

We've got an application in production on Tomcat 4.1.30 (SDK 1.4.2).
The application works fine in test. In production, however, there seems to
be some kind of degradation.
When there is a certain load (not even very high), the following occurs:
These 2 lines (in several classes, JasperReports as well as our own code):
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
documentBuilder = factory.newDocumentBuilder();

Start to work with the wrong class:
org.apache.axiom.om.impl.dom.jaxp.DocumentBuilderFactoryImpl
(the XML parser of Axis2)
instead of the wanted class:
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl

Both classes are in our classpath, but for some reason this problem only
occurs in production after a period of uptime.
This gives NullPointerExceptions.

What should we do to avoid this ?
Is it the classloader of tomcat going strange ?
Any help would be appreciated. 
-- 
View this message in context: http://www.nabble.com/Tomcat-4.1.30-classloader-problem-tp14841424p14841424.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Tomcat 4.1.30 classloader problem

Posted by ehuard <na...@elisehuard.be>.
I'm sorry, i didn't express myself well:
when i mean "in our classpath"
i do mean in WEB-INF/lib (i meant the normal classpath on Tomcat).
I'm familiar with the Tomcat classloader basics.
Thank you,

Elise

Caldarale, Charles R wrote:
> 
>> From: ehuard [mailto:nabble@elisehuard.be] 
>> Subject: Tomcat 4.1.30 classloader problem
>> 
>> Both classes are in our classpath
> 
> The red flag just went up.  When you say "classpath", are you referring
> to the CLASSPATH variable?  Even on 4.1 levels, you should never be
> setting that, nor should you add anything to Tomcat's -cp value on the
> command line.
> 
> Jars and classes used by webapps normally go in the webapp's WEB-INF/lib
> and WEB-INF/classes directories.  If classes must be shared across
> webapps, then Tomcat's shared/lib (or shared/classes) is the appropriate
> location; if classes need to be visible to both Tomcat and webapps, then
> common/lib (or common/classes) should be used.
> 
> Here's the doc:
> http://tomcat.apache.org/tomcat-4.1-doc/class-loader-howto.html
> 
>  - 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 start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Tomcat-4.1.30-classloader-problem-tp14841424p14873823.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Tomcat 4.1.30 classloader problem

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: ehuard [mailto:nabble@elisehuard.be] 
> Subject: Tomcat 4.1.30 classloader problem
> 
> Both classes are in our classpath

The red flag just went up.  When you say "classpath", are you referring
to the CLASSPATH variable?  Even on 4.1 levels, you should never be
setting that, nor should you add anything to Tomcat's -cp value on the
command line.

Jars and classes used by webapps normally go in the webapp's WEB-INF/lib
and WEB-INF/classes directories.  If classes must be shared across
webapps, then Tomcat's shared/lib (or shared/classes) is the appropriate
location; if classes need to be visible to both Tomcat and webapps, then
common/lib (or common/classes) should be used.

Here's the doc:
http://tomcat.apache.org/tomcat-4.1-doc/class-loader-howto.html

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