From 909429cf6013cf6711f29a0fadd3152a00bc89d5 Mon Sep 17 00:00:00 2001 From: Karl Nelson Date: Wed, 26 Jun 2019 22:06:36 -0700 Subject: [PATCH] Change required for JPype 0.7.0 --- jaydebeapi/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jaydebeapi/__init__.py b/jaydebeapi/__init__.py index c124e6f..d23925b 100644 --- a/jaydebeapi/__init__.py +++ b/jaydebeapi/__init__.py @@ -173,7 +173,10 @@ def _jdbc_connect_jpype(jclassname, url, driver_args, jars, libs): # jvm_path = ('/usr/lib/jvm/java-6-openjdk' # '/jre/lib/i386/client/libjvm.so') jvm_path = jpype.getDefaultJVMPath() - jpype.startJVM(jvm_path, *args) + if jpype.__version__.startswith("0.6"): + jpype.startJVM(jvm_path, *args) + else: + jpype.startJVM(jvm_path, *args, ignoreUnrecognized=True, convertStrings=True) if not jpype.isThreadAttachedToJVM(): jpype.attachThreadToJVM() if _jdbc_name_to_const is None: