Hello Jython people.
 
I'm trying to see if I can use Jython to write an ETL script so I can use a Pervasive JDBC driver and avoid writing the script in Java.
 
I'm able to access the driver from Java with Class.forName("com.pervasive.jdbc.v2.Driver");
 
However, I can't seem to get my Jython script to recognize the driver.
 
------------------------------------------
from java import *
from java.sql import *
from java.lang import *
 
Class.forName("com.pervasive.jdbc.v2.Driver").newInstance()
--------------------------------------------
 
Gives me:
 
--------------------------------------------
Traceback (innermost last):
  File "read_scanmaster.py", line 18, in ?
 at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:186)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:616)
 
java.lang.ClassNotFoundException: java.lang.ClassNotFoundException: com.pervasive.jdbc.v2.Driver
--------------------------------------------
 
I'm executing the script from the same environment as the Java code that is able to recognize the driver, so I know the CLASSPATH is right.  I've also tried setting the CLASSPATH within the Jython script with:
 
--------------------------------------------
import sys
sys.path.append('/usr/local/psql/bin/jpscs.jar')
sys.path.append('/usr/local/psql/bin/pvjdbc2.jar')
sys.path.append('/usr/local/psql/bin/pvjdbc2x.jar')
---------------------------------------------
 
But that doesn't help either.
 
Any tips would be greatly appreciated.
 
Thanks.
 
Tony