You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A simple connecting test jaydebeapi to connect to Oracle DB using z/OS python.
The codes:
import jaydebeapi
import jpype
driver_class = "oracle.jdbc.driver.OracleDriver"
driver_file = "/webs/usr/lib/ojdbc8/ojdbc8.jar"
jpype.addClassPath('/webs/usr/lib/ojdbc8/*')
jpype.startJVM()
A simple connecting test jaydebeapi to connect to Oracle DB using z/OS python.
The codes:
import jaydebeapi
import jpype
driver_class = "oracle.jdbc.driver.OracleDriver"
driver_file = "/webs/usr/lib/ojdbc8/ojdbc8.jar"
jpype.addClassPath('/webs/usr/lib/ojdbc8/*')
jpype.startJVM()
conn=jaydebeapi.connect('oracle.jdbc.driver.OracleDriver', \
'jdbc:oracle:thin:xxxxxxxxx/yyyyyyyyyyyy@\
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=twst6gvhldp-scan.tdc.vzwcorp.com)(PORT=2051)) \
(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = swerfff)))', \
'/webs/usr/lib/ojdbc8/ojdbc8.jar')
conn.close()
The error:
Traceback (most recent call last):
File "/webs/tech/py/testJDBC.py", line 31, in
File "/webs/pyVenv/venv/lib/python3.11/site-packages/jaydebeapi/init.py", line 412, in connect
jconn = _jdbc_connect(jclassname, url, driver_args, jars, libs)
¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬
File "/webs/pyVenv/venv/lib/python3.11/site-packages/jaydebeapi/init.py", line 230, in _jdbc_connect_jpype
return jpype.java.sql.DriverManager.getConnection(url, *dargs)
¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬
TypeError: No matching overloads found for static java.sql.DriverManager.getConnection(str,str), options are:
.public static java.sql.Connection java.sql.DriverManager.getConnection(java.lang.String) throws java.sql.SQLException
.public static java.sql.Connection java.sql.DriverManager.getConnection(java.lang.String,java.lang.String,java.lang.String) throws j
.public static java.sql.Connection java.sql.DriverManager.getConnection(java.lang.String,java.util.Properties) throws java.sql.SQLEx
The text was updated successfully, but these errors were encountered: