baztian/jaydebeapi

No JVM shared library file (libjvm.so) found. Try setting up the JAVA_HOME environment variable properly.

marcelomachado opened this issue · 1 comments

I am trying to use JayDeBeApi in a docker container based on a DockerHub Python image (python 3.9.18). However, whenever i try to connect to a database I get the error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/site-packages/jaydebeapi/__init__.py", line 412, in connect
    jconn = _jdbc_connect(jclassname, url, driver_args, jars, libs)
  File "/usr/local/lib/python3.9/site-packages/jaydebeapi/__init__.py", line 184, in _jdbc_connect_jpype
    jvm_path = jpype.getDefaultJVMPath()
  File "/usr/local/lib/python3.9/site-packages/jpype/_jvmfinder.py", line 74, in getDefaultJVMPath
    return finder.get_jvm_path()
  File "/usr/local/lib/python3.9/site-packages/jpype/_jvmfinder.py", line 212, in get_jvm_path
    raise JVMNotFoundException("No JVM shared library file ({0}) "
jpype._jvmfinder.JVMNotFoundException: No JVM shared library file (libjvm.so) found. Try setting up the JAVA_HOME environment variable properly.

I can't use this lib without having to install java?