关于loading oracle.sql.BlobDBAccess : Package oracle.sql is sealed.异常

<p>pe8.1_02|javax.enterprise.system.stream.err|_ThreadID=12;|java.lang.SecurityException: Sealing violation </p>
<p>loading oracle.sql.BlobDBAccess : Package oracle.sql is sealed.<br>at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1764)<br>at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:905)<br>at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1370)<br>at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1234)<br>at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)<br>at java.lang.ClassLoader.defineClass1(Native Method)<br>at java.lang.ClassLoader.defineClass(ClassLoader.java:620)<br>at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)<br>at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1774)<br>at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:905)<br>at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1370)<br>at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1234)<br>at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)<br>at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)<br>at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)<br>at java.sql.DriverManager.getConnection(DriverManager.java:582)<br>at java.sql.DriverManager.getConnection(DriverManager.java:185)<br>at com.ibatis.common.jdbc.SimpleDataSource.popConnection(SimpleDataSource.java:580)<br>at com.ibatis.common.jdbc.SimpleDataSource.getConnection(SimpleDataSource.java:222)<br>at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)<br>at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)<br>at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForList(MappedStatement.java:139)<br>at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:567)<br>at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:541)<br>at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)<br>at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:94)<br>at com.neusoft.avnc.lbs.stkrttp.db.bussiness.ContentContr.selectContents(ContentContr.java:318)<br>at com.neusoft.avnc.lbs.stkrttp.core.ScanDBBusiness.dbWork(ScanDBBusiness.java:69)<br>at com.neusoft.avnc.lbs.stkrttp.mmo.DbReadMMO.run(DbReadMMO.java:60)<br>at java.lang.Thread.run(Thread.java:619)</p>

<p>今天偶然遇到了这个问题,查了半天原因,在论坛里查了半天都没有收获,结果在sun公司的官方网站上找到了答案。结果原因是oracle 10.2的jar包的作者把文件给seal(封印?)住了,导致类加载器加载不上jar包中的类。解决方案:</p>

<p>1,使用以前版本的jar包,例如10.1</p>
<p>2,把jar包jar包中的MANIFEST文件删掉最后的几行</p>

<p>原来的MANIFEST文件:</p>
<p>Manifest-Version: 1.0<br>Specification-Title: Oracle JDBC driver classes for use with JDK14<br>Sealed: true<br>Created-By: 1.4.2_14 (Sun Microsystems Inc.)<br>Implementation-Title: ojdbc14.jar<br>Specification-Vendor: Oracle Corporation<br>Specification-Version: Oracle JDBC Driver version - "10.2.0.4.0"<br>Implementation-Version: Oracle JDBC Driver version - "10.2.0.4.0"<br>Implementation-Vendor: Oracle Corporation<br>Implementation-Time: Sat Feb 2 11:40:29 2008</p>
<p>Name: oracle/sql/converter/<br>Sealed: false</p>
<p>Name: oracle/sql/<br>Sealed: false</p>
<p>Name: oracle/sql/converter_xcharset/<br>Sealed: false</p>
<p>改成:</p>
<p>Manifest-Version: 1.0<br>Specification-Title: Oracle JDBC driver classes for use with JDK14<br>Sealed: true<br>Created-By: 1.4.2_14 (Sun Microsystems Inc.)<br>Implementation-Title: ojdbc14.jar<br>Specification-Vendor: Oracle Corporation<br>Specification-Version: Oracle JDBC Driver version - "10.2.0.4.0"<br>Implementation-Version: Oracle JDBC Driver version - "10.2.0.4.0"<br>Implementation-Vendor: Oracle Corporation<br>Implementation-Time: Sat Feb 2 11:40:29 2008</p>

<p>至少我的困难是可以解决了,祝大家好运!</p>

你可能感兴趣的:(package)