There is a bug in jreload where it doesn't load the entire class file,
thereby resulting in an invalid class/ClassFormatError. I have submitted
a patch which fixes this, and you can get it by browsing the bug database
for jython on sourceforge -
http://sourceforge.net/tracker/index.php?func=detail&aid=511493&group_id=12867&atid=112867
Matt
"Updike, Clark" <Cla...@jh...>
Sent by: jyt...@li...
03/07/02 10:36 AM
To: "'jyt...@li...'"
<jyt...@li...>
cc:
Subject: [Jython-users] jreload import problem
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
_______________________________________________
Jython-users mailing list
Jyt...@li...
https://lists.sourceforge.net/lists/listinfo/jython-users
|