当前位置: 代码迷 >> 综合 >> Tomcat启动失败:Could not load java.net.URLEncoder 问题解决
  详细解决方案

Tomcat启动失败:Could not load java.net.URLEncoder 问题解决

热度:11   发布时间:2024-01-12 18:46:41.0

最近在部署工程,启动Tomcat服务器的时候一直提示启动失败,具体错误提示如下:
Sep 07, 2017 9:58:41 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 21415 ms
Sep 07, 2017 9:58:42 PM org.apache.catalina.loader.WebappClassLoaderBase loadClass
INFO: Illegal access: this web application instance has been stopped already. Could not load java.net.URLEncoder. 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.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1745)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1703)
at org.quartz.utils.UpdateChecker.urlEncode(UpdateChecker.java:156)
at org.quartz.utils.UpdateChecker.buildParamsString(UpdateChecker.java:122)
at org.quartz.utils.UpdateChecker.buildUpdateCheckUrl(UpdateChecker.java:114)
at org.quartz.utils.UpdateChecker.doCheck(UpdateChecker.java:55)
at org.quartz.utils.UpdateChecker.checkForUpdate(UpdateChecker.java:47)
at org.quartz.utils.UpdateChecker.run(UpdateChecker.java:39)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
最初以为程序有问题,但是经过检查发现没问题,因为程序一直运行,只是最近在更换了运行环境之后之后报错,经过问题排查,发现在读取数据库的时候失败导致的。此时需要配置数据库文件
即 /usr/my.conf文件,添加一下内容之后问题解决:

lower_case_table_names=1
symbolic-links=0
max_connections=2000
wait_timeout=28800
interactive_timeout=28800
sql_mode=NO_ENGINE_SUBSTITUTION

  相关解决方案