tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Ludwig <mil...@gmx.de>
Subject Re: HTTP Status 500 - Server Internal Error (continued!)
Date Mon, 20 Dec 2010 10:18:23 GMT
Hi Lewis,

McGibbney, Lewis John schrieb am 20.12.2010 um 09:42 (+0000):
> >I'm not sure the thread Tomcat points out wasn't
> >stopped is related to Commons Logging. Could it be
> >that you created the thread in your app?
> 
> I think that you are correct here although if I post more of the log
> for you to see then maybe we can confirm whether it is a common issue
> or not

> 20-Dec-2010 08:55:11 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
> SEVERE: A web application appears to have started a thread named [Thread-4] but has failed
to stop it. This is very likely to create a memory leak.

Well, "Thread-4" isn't very informative, is it? You could take a thread
dump just before shutting down Tomcat and then check if the unruly
thread Tomcat points out is still running is also contained in the
thread dump. If so you'll have more information on what causes this
issue.

> In reading about ClassLoader I have come full circle and have ended up
> running back into my friend the Endorsed Standards Override Mechanism.
> I made Jena (which uses its own OWL parser, therefore no need for
> xerces) available to Tomcat in an endorsed folder, this should
> override the JAXP API's this seemed to solve the parser problem.

http://jena.sourceforge.net/ - JAR is 23 MB

You should probably place Jena in your webapp's WEB-INF/lib/ folder.
This page has information on why to do so:

http://wiki.apache.org/commons/Logging/UndeployMemoryLeak

Notably:

  It is therefore a complete mystery to me why
  people seem so keen to push libraries up out of
  the components where they belong and into the
  container's library directories. It's like
  pushing user code into the operating system
  kernel. Just don't do it. 

The endorsed/ folder is not intended to accommodate arbitrary third
party libraries. You can read up on what's meant to go there on the
Java doc page I posted a link to. For example, the XML parser is.

-- 
Michael Ludwig

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


Mime
View raw message