简体   繁体   中英

Why Does Restarting Applications From /manager Cause A Slew of “this web application instance has been stopped already. ” warnings. Why?

Tomcat 7 install w/jvm 1.7.
Several webapps loaded. Hibernate 3.3 w/ c3p0 connection pooling running on affected application.
Quartz 1.8.3 jobs running on affected application.

If I restart a web app from the /manager console, my catalina out starts filling up with this kind of thing:

INFO: Illegal access: this web application instance has been stopped already. Could not load org.hsqldb.jdbc.JDBCDriver. 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:1610) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1569) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at java.sql.DriverManager.isDriverAllowed(Unknown Source) at java.sql.DriverManager.getDrivers(Unknown Source) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:317) at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134) at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182) at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171) at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137) at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(Ba sicResourcePool.java:1014) at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32) at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)

Most curiously, I'm not trying to run anything invoking hsqldb, but am trying to touch an oracle database. Anyways, once I see this behavior in the logs, the oracle environment starts getting blasted with login requests, listener.log starts filling up and eventually the DBAs are screaming at me about my process.

If I restart the application server as a whole, none of this happens and everything is great.

What is going on? Any insight is greatly appreciated.

  1. Please see http://www.mchange.com/projects/c3p0/#configuring_to_avoid_memory_leaks_on_redeploy
  2. If you are starting up a c3p0 Connection within a web app, you must take care that it is properly close()ed when the application is undeployed. A ServletContextListener is a good place to handle initialization and destruction of Connection pools.

I think I need to work harder on destroying some threads. Will poke around there and see if I can get it to work. Thanks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM