Tomcat server downtime solution
Error message:
java. lang.Object. wait(Native Method)
java. lang.ref. ReferenceQueue. remove(ReferenceQueue.java:143)
com. MysqL. jdbc. AbandonedConnectionCleanupThread. run(AbandonedConnectionCleanupThread.java:43)
Every time this error occurs, the Tomcat application server will be shut down. After adding the following java code, it will never stop.
terms of settlement:
Writing java code
@WebListener,这个注解相当于在web.xml配置如下内容
For solutions, please refer to the following website: https://stackoverflow.com/questions/25699985/the-web-application-appears-to-have-started-a-thread-named-abandoned-connect
Of course, when I refer to this solution again, I found that if the version of MySQL connection is too low, it will cause errors in the Java code listed above. By improving MySQL connection Java version can solve this problem