Java Spring JPA未知错误,但应用程序按预期工作
我正在使用Spring4.0、Tomcat8、SpringDataJPA1.7.0.RELEASE、Hibernate4.1、MySQL5.6.21自制。我是java新手,刚从C++背景下移动。我想一定是有资源泄漏了。在我存在应用程序之前,我必须关闭或释放某些内容。但不知道该怎么办。请告诉我 每次重新启动时,我都会出现以下错误:-Java Spring JPA未知错误,但应用程序按预期工作,java,mysql,spring,jpa,Java,Mysql,Spring,Jpa,我正在使用Spring4.0、Tomcat8、SpringDataJPA1.7.0.RELEASE、Hibernate4.1、MySQL5.6.21自制。我是java新手,刚从C++背景下移动。我想一定是有资源泄漏了。在我存在应用程序之前,我必须关闭或释放某些内容。但不知道该怎么办。请告诉我 每次重新启动时,我都会出现以下错误:- Nov 20, 2014 2:01:01 PM org.apache.catalina.loader.WebappClassLoaderBase clear
Nov 20, 2014 2:01:01 PM org.apache.catalina.loader.WebappClassLoaderBase
clearReferencesThreads
WARNING: The web application [MyJap] appears to have started a thread named [MySQL
Statement Cancellation Timer] but has failed to stop it. This is very likely to create a
memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:502)
java.util.TimerThread.mainLoop(Timer.java:526)
java.util.TimerThread.run(Timer.java:505)
Nov 20, 2014 2:01:01 PM org.apache.coyote.AbstractProtocol start
这可能是原因吗?或者您可以将JDBC配置移动到Tomcat。在java世界中,我们被宠坏了,主要是通过重启来解决这个问题: