java - Tomcat 停止的时候出现的警告问题。
PHP中文网
PHP中文网 2017-04-18 10:29:07
0
3
904

这是我截取的输出的警告日志:

Connected to server
[2016-09-23 09:26:22,319] Artifact xk_mvn_1:war exploded: Artifact is being deployed, please wait...
23-Sep-2016 21:26:24.478 INFO [RMI TCP Connection(3)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
[2016-09-23 09:26:26,148] Artifact xk_mvn_1:war exploded: Artifact is deployed successfully
[2016-09-23 09:26:26,148] Artifact xk_mvn_1:war exploded: Deploy took 3,829 milliseconds
23-Sep-2016 21:26:26.436 INFO [http-nio-8888-exec-1] [wqh.controller.MainController] .invoke0 wqh.controller:index_f
Fri Sep 23 21:26:26 CST 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Fri Sep 23 21:26:26 CST 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
23-Sep-2016 21:26:26.827 INFO [http-nio-8888-exec-2] [wqh.controller.MainController] .invoke0 wqh.controller:index_f
23-Sep-2016 21:26:27.085 INFO [http-nio-8888-exec-3] [wqh.controller.MainController] .invoke0 wqh.controller:index_f
"C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin\catalina.bat" stop
Using CATALINA_BASE:   "C:\Users\devts\.IntelliJIdea15\system\tomcat\Unnamed_xk_mvn_1"
Using CATALINA_HOME:   "C:\Program Files\Apache Software Foundation\Tomcat 9.0"
Using CATALINA_TMPDIR: "C:\Program Files\Apache Software Foundation\Tomcat 9.0\temp"
Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_92"
Using CLASSPATH:       "C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin\bootstrap.jar;C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin\tomcat-juli.jar"
23-Sep-2016 21:26:31.340 INFO [main] org.apache.catalina.core.StandardServer.await A valid shutdown command was received via the shutdown port. Stopping the Server instance.
23-Sep-2016 21:26:31.340 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8888"]
23-Sep-2016 21:26:31.392 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8008"]
23-Sep-2016 21:26:31.443 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina
23-Sep-2016 21:26:31.461 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
23-Sep-2016 21:26:31.461 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [Abandoned connection cleanup thread] 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.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
 com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:43)
23-Sep-2016 21:26:31.462 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [Timer-0] 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)
23-Sep-2016 21:26:31.475 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8888"]
23-Sep-2016 21:26:31.477 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8008"]
23-Sep-2016 21:26:31.478 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8888"]
23-Sep-2016 21:26:31.479 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-8008"]

运行环境:

IDEA15.06+JDK1.8+Tomcat9

疑问:这个警告代表什么?Timer-0是哪里来的?
`23-Sep-2016 21:26:31.462 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
`

PHP中文网
PHP中文网

认证0级讲师

모든 응답(3)
刘奇

사실 데이터 커넥션 풀을 사용할 때 데이터 드라이버를 등록했는데, tomcat을 종료할 때 등록이 취소되지 않고 그냥 수동으로 등록을 취소해 줬어요.

으아악
阿神

JDBC 연결이 제대로 닫히지 않습니다. 데이터베이스 연결을 얻는 코드가 닫히지 않거나 호출되지 않는지 확인하세요.

小葫芦

버전을 낮추셔서 JDK1.7+Tomcat7을 사용해 보시는 것도 좋을 것 같습니다.

최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿