Add fix for JDBC issue by reloading classpath when attaching JVM to thread.
This commit is contained in:
@@ -199,6 +199,7 @@ def _jdbc_connect_jpype(jclassname, url, driver_args, jars, libs):
|
|||||||
convertStrings=True)
|
convertStrings=True)
|
||||||
if not jpype.isThreadAttachedToJVM():
|
if not jpype.isThreadAttachedToJVM():
|
||||||
jpype.attachThreadToJVM()
|
jpype.attachThreadToJVM()
|
||||||
|
jpype.java.lang.Thread.currentThread().setContextClassLoader(jpype.java.lang.ClassLoader.getSystemClassLoader())
|
||||||
if _jdbc_name_to_const is None:
|
if _jdbc_name_to_const is None:
|
||||||
types = jpype.java.sql.Types
|
types = jpype.java.sql.Types
|
||||||
types_map = {}
|
types_map = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user