Class.forName("org.logicalcobwebs.proxool.ProxoolDriver");
conn = DriverManager.getConnection("proxool.xml-test");
Statement stat = conn.createStatement();
int a = 0;
rs = stat.executeQuery(sql);
以下的异常代码,控制台提示出错的代码是:Statement stat = conn.createStatement();
异常信息:
严重: Servlet.service() for servlet GetAddre threw exception
java.lang.SecurityException: class "com.microsoft.sqlserver.jdbc.ISQLServerStatement$$FastClassByProxool$$3407f37e"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java:776)
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:488)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.logicalcobwebs.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
at org.logicalcobwebs.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)
at org.logicalcobwebs.cglib.reflect.FastClass$Generator.create(FastClass.java:64)
at org.logicalcobwebs.cglib.proxy.MethodProxy.helper(MethodProxy.java:81)
at org.logicalcobwebs.cglib.proxy.MethodProxy.create(MethodProxy.java:46)
at $java.sql.Statement$$EnhancerByProxool$$591737f1.CGLIB$STATICHOOK2(<generated>)
at $java.sql.Statement$$EnhancerByProxool$$591737f1.<clinit>(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.logicalcobwebs.cglib.proxy.Enhancer.setCallbacksHelper(Enhancer.java:616)
at org.logicalcobwebs.cglib.proxy.Enhancer.setThreadCallbacks(Enhancer.java:609)
at org.logicalcobwebs.cglib.proxy.Enhancer.createUsingReflection(Enhancer.java:631)
at org.logicalcobwebs.cglib.proxy.Enhancer.firstInstance(Enhancer.java:538)
at org.logicalcobwebs.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:225)
at org.logicalcobwebs.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
at org.logicalcobwebs.cglib.proxy.Enhancer.create(Enhancer.java:285)
at org.logicalcobwebs.proxool.ProxyFactory.getProxy(ProxyFactory.java:116)
at org.logicalcobwebs.proxool.ProxyFactory.getStatement(ProxyFactory.java:97)
at org.logicalcobwebs.proxool.WrappedConnection.invoke(WrappedConnection.java:196)
at org.logicalcobwebs.proxool.WrappedConnection.intercept(WrappedConnection.java:87)
at $java.sql.Connection$$EnhancerByProxool$$f45c1f91.createStatement(<generated>)
at com.tonglu.AddUser.add(AddUser.java:64)
at com.tonglu.GetAddre.doGet(GetAddre.java:57)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
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:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
at java.lang.Thread.run(Thread.java:619)
连接池已经创建,如果不使用Statement stat = conn.createStatement();代码没问题,打印出来没问题。真心求解!
------解决方案--------------------
这是你的数据库出现了问题了!你可以换一种方式
------解决方案--------------------
有个类的签名和其他类不一样