[code=java]2013-8-10 20:01:01 org.apache.coyote.http11.Http11Protocol pause
信息: Pausing Coyote HTTP/1.1 on http-8080
2013-8-10 20:01:02 org.apache.catalina.core.StandardService stop
信息: Stopping service Catalina
2013-8-10 20:01:02 org.apache.coyote.http11.Http11Protocol destroy
信息: Stopping Coyote HTTP/1.1 on http-8080
2013-8-10 20:01:03 org.apache.catalina.loader.WebappClassLoader loadClass
信息: Illegal access: this web application instance has been stopped already. Could not load com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException. 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:1244)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.mysql.jdbc.Util.getInstance(Util.java:386)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1015)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:989)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:975)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:920)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2565)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2301)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:834)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
at sun.reflect.GeneratedConstructorAccessor14.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:416)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at com.cfuture.xiang.DAO.MySQLDBCon.getConn(MySQLDBCon.java:14)
at com.cfuture.xiang.DAO.ShowDao.databaseOperate(ShowDao.java:48)
at com.cfture.xiang.ShowServlet$1.actionPerformed(ShowServlet.java:26)
at javax.swing.Timer.fireActionPerformed(Timer.java:271)
at javax.swing.Timer$DoPostEvent.run(Timer.java:201)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
java.sql.SQLException: Unable to create correct SQLException class instance, error class/codes may be incorrect. Reason:
求助,网站能运行,但是不能与数据交互,控制台也不报错,关闭tomcat的时候就出现这样的错误信息,求解?
在你的工程下,随便找个java文件,声明一个MySQLNonTransientConnectionException类型,然后导入包,看import的路径,是com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException
还是com.mysql.jdbc.exceptions.jdbc5.MySQLNonTransientConnectionException
猜测是你用的jar包版本高了,与其它jar包不匹配导致的。
如果发现import的是5,建议下载个4的jar包替换掉5的
MySQLNonTransientConnectionException
要先搞清它用的是什么jar包。先自己在你的工程下,随便找个java文件,声明一个MySQLNonTransientConnectionException类型,然后导入包,看import的路径,然后F3这个类,看看在哪个jar包下。
应该是MySql驱动包与你这个connector包不匹配。