Could not load java.net.BindException错误解决
生活随笔
收集整理的這篇文章主要介紹了
Could not load java.net.BindException错误解决
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
出現了錯誤異常:
信息: Illegal access: this web application instance has been stopped already.? Could not load java.net.BindException.? 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:1273)
?at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
?at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
?at com.mysql.jdbc.SQLError.createLinkFailureMessageBasedOnHeuristics(SQLError.java:1220)
?at com.mysql.jdbc.CommunicationsException.<init>(CommunicationsException.java:51)
?at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1070)
?at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3270)
?at com.mysql.jdbc.MysqlIO.quit(MysqlIO.java:1659)
?at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4296)
?at com.mysql.jdbc.ConnectionImpl.cleanup(ConnectionImpl.java:1265)
?at com.mysql.jdbc.ConnectionImpl.finalize(ConnectionImpl.java:2667)
?at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
?at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
?at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
?at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
在啟動 tomcat ,并發布應用后沒有問題,但是如果重新發布就出現如下異常: this web application instance has been stopped already. Could not load java.net.BindException this web application instance has been stopped already. Could not load com.mysql.jdbc 這是由于 MySQL 的 JDBC 驅動放在應用的 WEB-INF/lib 目錄下,在重新發布時其加載了兩次,故只要將其拷貝到 TOMCAT_HOME%/lib 中即可解決該問題。 解決這兩個異常可以將 MySQL 的驅動文件從 WEB-INF/lib 文件夾中移動到 %TOMCAT_HOME%/lib 中
信息: Illegal access: this web application instance has been stopped already.? Could not load java.net.BindException.? 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:1273)
?at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
?at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
?at com.mysql.jdbc.SQLError.createLinkFailureMessageBasedOnHeuristics(SQLError.java:1220)
?at com.mysql.jdbc.CommunicationsException.<init>(CommunicationsException.java:51)
?at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1070)
?at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3270)
?at com.mysql.jdbc.MysqlIO.quit(MysqlIO.java:1659)
?at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4296)
?at com.mysql.jdbc.ConnectionImpl.cleanup(ConnectionImpl.java:1265)
?at com.mysql.jdbc.ConnectionImpl.finalize(ConnectionImpl.java:2667)
?at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
?at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
?at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
?at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
在啟動 tomcat ,并發布應用后沒有問題,但是如果重新發布就出現如下異常: this web application instance has been stopped already. Could not load java.net.BindException this web application instance has been stopped already. Could not load com.mysql.jdbc 這是由于 MySQL 的 JDBC 驅動放在應用的 WEB-INF/lib 目錄下,在重新發布時其加載了兩次,故只要將其拷貝到 TOMCAT_HOME%/lib 中即可解決該問題。 解決這兩個異常可以將 MySQL 的驅動文件從 WEB-INF/lib 文件夾中移動到 %TOMCAT_HOME%/lib 中
轉載于:https://www.cnblogs.com/sblackboy/p/6250216.html
總結
以上是生活随笔為你收集整理的Could not load java.net.BindException错误解决的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: (转)Three challenges
- 下一篇: 基于NFS实现lamp的负载均衡之二: