« Return to Thread: Using ojdbc with Jython standalone

Using ojdbc with Jython standalone

by Jones, Steven-2 :: Rate this Message:

Reply to Author | View in Thread

Using ojdbc with Jython standalone

When I install Jython 2.5 (any beta version) as a standalone JAR, I am unable to access oracle.jdbc.OracleDriver in jython.  However, if I install jython as a full installation, I have no problem.  What am I doing wrong?

CLASSPATH=/home/path/to/ojdbc6.jar


$ java oracle.jdbc.OracleDriver
Oracle 11.1.0.7.0-Production JDBC 4.0 compile with JDK6


Using a standalone jython.jar installation:


[dmsys_ade@dimtest2 jython25b3]$ java -jar jython.jar
Jython 2.5b3 (Release_2_5beta3:6092, Mar 10 2009, 15:34:57)
[Java HotSpot(TM) Server VM (Sun Microsystems Inc.)] on java1.6.0_03
Type "help", "copyright", "credits" or "license" for more information.
>>> from com.ziclix.python.sql import zxJDBC
db = zxJDBC.connect('jdbc:oracle:thin:@host:post:dimt','xxx','xxx','oracle.jdbc.OracleDriver')>>>
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
zxJDBC.DatabaseError: driver [oracle.jdbc.OracleDriver] not found
>>>



using a "full" installation of jython


[dmsys_ade@dimtest2 jython2.5rc2]$ ./jython
Jython 2.5rc2 (Release_2_5rc2:6341, May 11 2009, 17:07:28)
[Java HotSpot(TM) Server VM (Sun Microsystems Inc.)] on java1.6.0_03
Type "help", "copyright", "credits" or "license" for more information.
>>> from com.ziclix.python.sql import zxJDBC
>>> db = zxJDBC.connect('jdbc:oracle:thin:@host:port:dimt','xxx','xxx','oracle.jdbc.OracleDriver')
>>>


works fine. 


What is the "correct" way to reference this jar file for use in my jython script using a standalone jython installation?

--
STEVE R. JONES  | CalPERS ITSB - IISD – RMO  | C: 916.402.5356 | W: 916.795.7662


______________________________________________
From:   Jones, Steven 
Sent:   Tuesday, May 12, 2009 4:36 PM
To:     'jython-users@...'
Subject:        Using ojdbc with Jython standalone

When I install Jython 2.5 (any beta version) as a standalone JAR, I am unable to access oracle.jdbc.OracleDriver in jython.  However, if I install jython as a full installation, I have no problem.  What am I doing wrong?

CLASSPATH=/home/path/to/ojdbc6.jar


$ java oracle.jdbc.OracleDriver
Oracle 11.1.0.7.0-Production JDBC 4.0 compile with JDK6


Using a standalone jython.jar installation:


[dmsys_ade@dimtest2 jython25b3]$ java -jar jython.jar
Jython 2.5b3 (Release_2_5beta3:6092, Mar 10 2009, 15:34:57)
[Java HotSpot(TM) Server VM (Sun Microsystems Inc.)] on java1.6.0_03
Type "help", "copyright", "credits" or "license" for more information.
>>> from com.ziclix.python.sql import zxJDBC
db = zxJDBC.connect('jdbc:oracle:thin:@host:post:dimt','xxx','xxx','oracle.jdbc.OracleDriver')>>>
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
zxJDBC.DatabaseError: driver [oracle.jdbc.OracleDriver] not found
>>>



using a "full" installation of jython


[dmsys_ade@dimtest2 jython2.5rc2]$ ./jython
Jython 2.5rc2 (Release_2_5rc2:6341, May 11 2009, 17:07:28)
[Java HotSpot(TM) Server VM (Sun Microsystems Inc.)] on java1.6.0_03
Type "help", "copyright", "credits" or "license" for more information.
>>> from com.ziclix.python.sql import zxJDBC
>>> db = zxJDBC.connect('jdbc:oracle:thin:@host:port:dimt','xxx','xxx','oracle.jdbc.OracleDriver')
>>>


works fine. 


What is the "correct" way to reference this jar file for use in my jython script using a standalone jython installation?


------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Jython-users mailing list
Jython-users@...
https://lists.sourceforge.net/lists/listinfo/jython-users

 « Return to Thread: Using ojdbc with Jython standalone