From: Updike, C. <Cla...@jh...> - 2002-03-07 15:38:15
|
I'm trying to load a JDBC driver programatically with jreload (without putting it on the jvm's classpath when starting jython). When I try to import the driver class I get a ClassFormatError, possibly suggesting the thing I'm actually importing isn't really a class: >>> import sys, jreload >>> from com.ziclix.python.sql import zxJDBC >>> ls = jreload.makeLoadSet('oracleLS',['pathToJar/classes12.jar']) >>> from oracleLS.oracle.jdbc.driver import OracleDriver Traceback (most recent call last): java.lang.ClassFormatError: java.lang.ClassFormatError: oracle/jdbc/driver/OracleDriver (Illegal UTF8 string in constant pool) But, if I do the following: >>> from oracleLS.oracle.jdbc import driver >>> dir(driver) It shows me that the class is in the driver package: ['ArrayDataResultSet', 'ArrayLocatorResultSet', 'BaseResultSet', <snip> 'OracleDriver', 'OracleInputStream', 'OracleLog', <snip> 'UpdatableResultSet', '__name__'] I have inspected this jar file and there truly is a OracleDriver.class in the oracle.jdbc.driver package. Any ideas what I'm doing wrong? TIA, Clark |