I have no idea about this wrong when I use J2Cache:
INFO: Illegal access: this web application instance has been stopped already. Could not load org.jgroups.protocols.pbcast.GmsImpl$Request. 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:1612)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
at org.jgroups.protocols.pbcast.GMS.up(GMS.java:855)
at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:234)
at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:636)
at org.jgroups.protocols.BARRIER.up(BARRIER.java:103)
at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:147)
at org.jgroups.protocols.FD_ALL.up(FD_ALL.java:185)
at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:301)
at org.jgroups.protocols.MERGE2.up(MERGE2.java:209)
at org.jgroups.protocols.Discovery.up(Discovery.java:379)
at org.jgroups.protocols.TP.passMessageUp(TP.java:1412)
at org.jgroups.protocols.TP$MyHandler.run(TP.java:1598)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Jun 11, 2015 2:47:30 PM org.apache.catalina.connector.CoyoteAdapter log
WARNING: Exception while attempting to add an entry to the access log
java.lang.NullPointerException
at org.apache.catalina.connector.CoyoteAdapter.log(CoyoteAdapter.java:557)
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:182)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
The above of this wrong happened with tomcat's starting.
I have googled about it. Someone said:
If you use a QUIT signal on the Java process it should output a thread dump that should identify which threads is still running and preventing a proper shutdown. I have seen this on occasion with some versions of HSQLDB that had a driver that didn't shutdown properly but it could be anything else deployed in your install.
To send the QUIT signal : kill -QUIT JAVA_PID
where JAVA_PID is the process ID of your Java process you can retrieve using : ps aux
But unfortunately, I can't understand it.
Can anybody help me?
This sounds familiar to this issue - https://issues.jboss.org/browse/JGRP-826. My guess is that tomcat already shuts down while there are still JGroups threads running. How do you shutdown Tomcat? Do you explicitly shutdown the cache as well? I would try implementing a
ServletContextListener
to receive a callback when the application gets shutdown. At this point I would try to explicitly close the cache as well. This all depends of course how and where you use the cache.