当前位置:编程学习 > JSP >>

jsp和 mysql连接代码出现的问题

org.apache.catalina.core.StandardWrapperValve invoke 严重: Servlet.service() for servlet LoginServlet threw exception java.lang.ClassFormatError: Catch type in exception table has bad constant type in class file com/mysql/jdbc/StringUtils at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1815) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1325) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:270) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at dataBase.DBConn.<init>(DBConn.java:21) at dataBase.loginDaoTemp.queryByName(loginDaoTemp.java:22) at Servlet.LoginServlet.doPost(LoginServlet.java:100) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445) at java.lang.Thread.run(Unknown Source)
追问:刚设置好了!又有了新的问题,真是纠结!什么意思啊!
答案:应该是找不到你的mysql驱动包的路径,你可能需要设置mysql驱动包的ClassPath
其他:java.lang.ClassFormatError 把:com/mysql/jdbc/StringUtils和Servlet 的代码发出来看看是不是这个里面出问题了。

上一个:extjs中js怎么向jsp页面中动态添加一个7列6行的table
下一个:jsp访问数据库的过程

CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,