2014-09-24 20:45 GMT+04:00 Cheng-Jun Li <cheng-jun...@ericsson.com>: > > Hello, > > A) Version info of my system: > > Server version: Apache Tomcat/7.0.53 > Server built: May 1 2014 10:53:10 > Server number: 7.0.53.0 > OS Name: Linux > OS Version: 3.0.58-0.6.2.1.5158.0.PTF-default > Architecture: amd64 > JVM Version: 1.6.0_75-b31 > > Deployed app server: provisioningagent-web > > da-00:/opt/tomcat/webapps # ls -trl > total 36480 > -rwxr-x--- 1 mmas mmas 10444010 Jul 7 16:53 enumprovisioning-web.war > -rwxr-x--- 1 mmas mmas 26827266 Jul 7 17:03 provisioningagent-web.war > drwxr-xr-x 7 mmas mmas 480 Sep 24 09:53 enumprovisioning-web > drwxr-xr-x 9 mmas mmas 980 Sep 24 09:53 provisioningagent-web > da-00:/opt/tomcat/webapps # > > > B) Issue: > > Below exception happens randomly (it does not happen all the time, but often): > > Jul 10, 2014 6:15:19 AM org.apache.catalina.loader.WebappClassLoader > loadClass INFO: Illegal access: this web application instance has been > stopped already. Could not load com.sun.org.apache.xerces.internal.impl > .dv.dtd.DTDDVFactoryImpl. The eventual following stack trace is caused by an > error thrown for debugging purposes as well as to attempt to terminate the > thread which caused the illegal access, and has no functional impact. > java.lang.IllegalStateException at > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1600) > at > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559) > at > com.sun.org.apache.xerces.internal.utils.ObjectFactory.findProviderClass(ObjectFactory.java:358) > at > com.sun.org.apache.xerces.internal.utils.ObjectFactory.newInstance(ObjectFactory.java:303) > at > com.sun.org.apache.xerces.internal.utils.ObjectFactory.newInstance(ObjectFactory.java:289) > at > com.sun.org.apache.xerces.internal.impl.dv.DTDDVFactory.getInstance(DTDDVFactory.java:60) > at > com.sun.org.apache.xerces.internal.impl.dv.DTDDVFactory.getInstance(DTDDVFactory.java:45) > at > com.sun.org.apache.xerces.internal.parsers.XML11Configuration.<init>(XML11Configuration.java:538) > at > com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration.<init>(XIncludeAwareParserConfiguration.java:125) > at > com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration.<init>(XIncludeAwareParserConfiguration.java:86) > at > com.sun.org.apache.xerces.internal.parsers.DOMParser.<init>(DOMParser.java:133) > at > com.sun.org.apache.xerces.internal.parsers.DOMParser.<init>(DOMParser.java:117) > at > com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.<init>(DocumentBuilderImpl.java:115) > at > com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(DocumentBuilderFactoryImpl.java:72) > at > com.ericsson.messaging.oe.impl.bpmanagement.bpfaultmgt.ActiveAlarmList.update(ActiveAlarmList.java:597) > at > com.ericsson.messaging.oe.impl.bpmanagement.bpfaultmgt.ActiveAlarmList.read(ActiveAlarmList.java:823) > at com.ericsson.messaging.oe.impl.bpmanagement.bpfaultmgt.SAFaultDispatc > her$ActiveAlarmListVerificationTask.run(SAFaultDispatcher.java:223) at > java.util.TimerThread.mainLoop(Timer.java:512) at > java.util.TimerThread.run(Timer.java:462)
1. The above message means that a web application have already been stopped, but the TimerTask tries to load a class from it. What web application has started this timer? If the timer was started by this web application, then it is your fault. You should have configured a javax.servlet.ServletContextListener to stop (cancel) the timer when the web application stops. You cannot load classes when web application have already been stopped. 2. If the timer was started by a different web application, it means that you have PermGen memory leak somewhere. Ensure that you have JreMemoryLeakPreventionListener configured in server.xml. It is known that there was a PermGen memory leak in Java XML APIs. A workaround to suppress it was added to JreMemoryLeakPreventionListener in r884341 [1] Mark has a presentation on Memory Leaks http://people.apache.org/~markt/presentations/2010-11-04-Memory-Leaks-60mins.pdf 3. Bundling a separate copy of Apache Xerces with the web application may help. It will not help if the root cause is your failure to cancel the timer. [1] http://svn.apache.org/viewvc?view=revision&revision=r884341 Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org