ibmdbanalytics/ibmdbpy

Incompatible with jpype 0.7

mineo opened this issue · 2 comments

mineo commented

Since jpype-project/jpype@a36f892#diff-06dff8ce194f77ca09775e87499a714e (available with jpype 0.7) the tests fail:


    def _jdbc_connect_jpype(jclassname, jars, libs, *driver_args):
        import jpype
        if not jpype.isJVMStarted():
            args = []
            class_path = []
            if jars:
                class_path.extend(jars)
            class_path.extend(_get_classpath())
            if class_path:
                args.append('-Djava.class.path=%s' %
                            os.path.pathsep.join(class_path))
            if libs:
                # path to shared libraries
                libs_path = os.path.pathsep.join(libs)
                args.append('-Djava.library.path=%s' % libs_path)
            # jvm_path = ('/usr/lib/jvm/java-6-openjdk'
            #             '/jre/lib/i386/client/libjvm.so')
            jvm_path = jpype.getDefaultJVMPath()
            jpype.startJVM(jvm_path, *args)
        if not jpype.isThreadAttachedToJVM():
            jpype.attachThreadToJVM()
        if _jdbc_name_to_const is None:
            types = jpype.java.sql.Types
            types_map = {}
            for i in types.__javaclass__.getClassFields():
>               types_map[i.getName()] = i.getStaticAttribute()
E               AttributeError: '_jpype.PyJPField' object has no attribute 'getStaticAttribute'

JPype describes some common issues when switching to 0.7:
jpype-project/jpype#498

The same issue also announces a change in defaults for 0.8 regarding string conversion.