Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
marcelomachado opened this issue Dec 1, 2023 · 1 comment

Comments

@marcelomachado
Copy link

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?

@tejasviSri
Copy link

Hi @marcelomachado did you have any luck in solving this? I'm facing the same issue on python 3.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants