问题描述
系统:windows2003环境:WebSphere6.1错误:同时部署多个项目时。第一个能正常访问。其他的访问的时候的日志如下:[11-3-3011:07:11:827CST]000015b4SystemErrRExceptioninthread"Thread-4004"java.lang.VerifyError:classloadingconstraintviolated(class:oracle/jdbc/internal/OracleStatement$$EnhancerByCGLIB$$95478f94method:CGLIB$setROWIDAtName$159(Ljava/lang/String;Loracle/sql/ROWID;)V)atpc:0[11-3-3011:07:11:827CST]000015b4SystemErrRatjava.lang.J9VMInternals.verifyImpl(NativeMethod)[11-3-3011:07:11:827CST]000015b4SystemErrRatjava.lang.J9VMInternals.verify(J9VMInternals.java:59)[11-3-3011:07:11:827CST]000015b4SystemErrRatjava.lang.J9VMInternals.initialize(J9VMInternals.java:120)[11-3-3011:07:11:827CST]000015b4SystemErrRatsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)[11-3-3011:07:11:827CST]000015b4SystemErrRatsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)[11-3-3011:07:11:827CST]000015b4SystemErrRatsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[11-3-3011:07:11:827CST]000015b4SystemErrRatjava.lang.reflect.Method.invoke(Method.java:615)[11-3-3011:07:11:827CST]000015b4SystemErrRatorg.logicalcobwebs.cglib.proxy.Enhancer.setCallbacksHelper(Enhancer.java:616)[11-3-3011:07:11:827CST]000015b4SystemErrRatorg.logicalcobwebs.cglib.proxy.Enhancer.setThreadCallbacks(Enhancer.java:609)[11-3-3011:07:11:827CST]000015b4SystemErrRatorg.logicalcobwebs.cglib.proxy.Enhancer.createUsingReflection(Enhancer.java:631)[11-3-3011:07:11:827CST]000015b4SystemErrRatorg.logicalcobwebs.cglib.proxy.Enhancer.firstInstance(Enhancer.java:538)[11-3-3011:07:11:827CST]000015b4SystemErrRatorg.logicalcobwebs.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:231)[11-3-3011:07:11:827CST]000015b4SystemErrRatorg.logicalcobwebs.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)[11-3-3011:07:11:827CST]000015b4SystemErrRatorg.logicalcobwebs.cglib.proxy.Enhancer.create(Enhancer.java:285)[11-3-3011:07:11:827CST]000015b4SystemErrRatorg.logicalcobwebs.proxool.ProxyFactory.getProxy(ProxyFactory.java:78)[11-3-3011:07:11:827CST]000015b4SystemErrRatorg.logicalcobwebs.proxool.ProxyFactory.getStatement(ProxyFactory.java:60)[11-3-3011:07:11:827CST]000015b4SystemErrRatorg.logicalcobwebs.proxool.WrappedConnection.invoke(WrappedConnection.java:196)[11-3-3011:07:11:827CST]000015b4SystemErrRatorg.logicalcobwebs.proxool.WrappedConnection.intercept(WrappedConnection.java:87)[11-3-3011:07:11:827CST]000015b4SystemErrRatoracle.jdbc.internal.OracleConnection$$EnhancerByCGLIB$$a6816abf.prepareStatement(<generated>)[11-3-3011:07:11:827CST]000015b4SystemErrRatpde.ams.database.jdbc.JdbcOracleDao.executeQuery(JdbcOracleDao.java:80)[11-3-3011:07:11:827CST]000015b4SystemErrRatpde.ams.search.IndexRunner.startIndex(IndexRunner.java:176)[11-3-3011:07:11:827CST]000015b4SystemErrRatpde.ams.search.IndexRunner.work(IndexRunner.java:119)[11-3-3011:07:11:827CST]000015b4SystemErrRatpde.ams.search.IndexRunner.run(IndexRunner.java:106)[11-3-3011:07:11:827CST]000015b4SystemErrRatjava.lang.Thread.run(Thread.java:797)
解决方案
解决方案二:
打开oracle驱动的jar里面的MANIFEST.MF清单文件看,这个jar包是不是已经经过数字签名,并且Sealed:true如果Sealed:true那么这个jar里面的javapackage列表中的所有类,如果在这个jar文件之外也有其它类在这些javapackage中的话就会出错,再加上数字签名就能防止其它人弄一个类往你的javapackage名字空间里面混淆替换,篡改原来的jar文件。你这个CGLIB增强在它看来属于篡改行为。
解决方案三:
Manifest-Version:1.0Specification-Title:OracleJDBCdriverclassesforusewithJDK14Sealed:trueCreated-By:1.4.2_08(SunMicrosystemsInc.)Implementation-Title:ojdbc14.jarSpecification-Vendor:OracleCorporationSpecification-Version:OracleJDBCDriverversion-"10.2.0.1.0"Implementation-Version:OracleJDBCDriverversion-"10.2.0.1.0"Implementation-Vendor:OracleCorporationImplementation-Time:WedJun2211:19:452005Name:oracle/sql/converter/Sealed:falseName:oracle/sql/Sealed:falseName:oracle/sql/converter_xcharset/Sealed:false
解决方案四:
上面这个是MANIFEST.MF清单。Sealed:true下面我应该怎么做呢
解决方案五:
把这个jar解压后重新打包成不带签名和sealed试试看,反正你是自己用的,又不是像Oracle那样发布产品出去。