5

My project include Apache commons-* library.
Throw exception on tomcat shutdown, no exception if run default example.

catalina out:

INFO: Illegal access: this web application instance has been stopped already. Could not load org.apache.log4j.spi.ThrowableInformation. 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.

INFO: Illegal access: this web application instance has been stopped already. Could not load org.apache.log4j.spi.ThrowableInformation. 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.

INFO: Destroying ProtocolHandler ["http-bio-8080"]
Sep 24, 2012 4:00:14 PM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance ses ahas been stopped already.  Could not load org.apache.commons.pool.impl.CursorableLinkedList$Cursor.  The eventual following stack trace is caused by an error thrown for debugging purpos 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 org.apache.commons.pool.impl.CursorableLinkedList.cursor(CursorableLinkedList.java:305)
    at org.apache.commons.pool.impl.GenericObjectPool.evict(GenericObjectPool.java:1536)
    at org.apache.commons.pool.impl.GenericObjectPool$Evictor.run(GenericObjectPool.java:1749)
    at java.util.TimerThread.mainLoop(Timer.java:512)
    at java.util.TimerThread.run(Timer.java:462)

Exception in thread "Timer-0" java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/CursorableLinkedList$Cursor
    at org.apache.commons.pool.impl.CursorableLinkedList.cursor(CursorableLinkedList.java:305)
    at org.apache.commons.pool.impl.GenericObjectPool.evict(GenericObjectPool.java:1536)
    at org.apache.commons.pool.impl.GenericObjectPool$Evictor.run(GenericObjectPool.java:1749)
    at java.util.TimerThread.mainLoop(Timer.java:512)
    at java.util.TimerThread.run(Timer.java:462)


Caused by: java.lang.ClassNotFoundException: org.apache.commons.pool.impl.CursorableLinkedList$Cursor
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
    ... 5 more
Carl ouyang
  • 51
  • 1
  • 3
  • Do you have these classes? Are they loaded using the same classloader? – mindas Sep 24 '12 at 14:14
  • all commons-*.jar in WEB-INF/lib, tomcat version is 7.0.30. mayby same with http://stackoverflow.com/questions/3320400/to-prevent-a-memory-leak-the-jdbc-driver-has-been-forcibly-unregistered – Carl ouyang Sep 25 '12 at 02:04
  • the same issue.http://stackoverflow.com/questions/9872510/tomcat-7-java-lang-noclassdeffounderror-org-apache-log4j-spi-throwableinforma – Carl ouyang Sep 25 '12 at 02:15

1 Answers1

0

For myself, this issue went away after I stopped tomcat, deleted the expanded war folder and started tomcat again.

Champ
  • 1,291
  • 4
  • 16
  • 32