Error after deploying django:

Hello there.

I deployed a django app but it gives this error

"Traceback (most recent call last):
File “/opt/render/project/src/.venv/lib/python3.11/site-packages/django/core/handlers/exception.py”, line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File “/opt/render/project/src/.venv/lib/python3.11/site-packages/django/core/handlers/base.py”, line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/render/project/src/.venv/lib/python3.11/site-packages/django/views/decorators/csrf.py”, line 56, in wrapper_view
return view_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/render/project/src/.venv/lib/python3.11/site-packages/rest_framework/viewsets.py”, line 125, in view
return self.dispatch(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/render/project/src/.venv/lib/python3.11/site-packages/rest_framework/views.py”, line 509, in dispatch
response = self.handle_exception(exc)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/render/project/src/.venv/lib/python3.11/site-packages/rest_framework/views.py”, line 469, in handle_exception
self.raise_uncaught_exception(exc)
File “/opt/render/project/src/.venv/lib/python3.11/site-packages/rest_framework/views.py”, line 480, in raise_uncaught_exception
raise exc
File “/opt/render/project/src/.venv/lib/python3.11/site-packages/rest_framework/views.py”, line 506, in dispatch
response = handler(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/render/project/src/mpesa/views.py”, line 90, in uploadFile
tables = tabula.read_pdf(extracted_file_path, pages=‘all’, multiple_tables=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/render/project/src/.venv/lib/python3.11/site-packages/tabula/io.py”, line 407, in read_pdf
output = _run(
^^^^^
File “/opt/render/project/src/.venv/lib/python3.11/site-packages/tabula/io.py”, line 72, in _run
_tabula_vm = TabulaVm(java_options=java_options, silent=options.silent)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/render/project/src/.venv/lib/python3.11/site-packages/tabula/backend.py”, line 44, in init
jpype.startJVM(*java_options, convertStrings=False)
File “/opt/render/project/src/.venv/lib/python3.11/site-packages/jpype/_core.py”, line 184, in startJVM
jvmpath = getDefaultJVMPath()
^^^^^^^^^^^^^^^^^^^
File “/opt/render/project/src/.venv/lib/python3.11/site-packages/jpype/_jvmfinder.py”, line 74, in getDefaultJVMPath
return finder.get_jvm_path()
^^^^^^^^^^^^^^^^^^^^^
File “/opt/render/project/src/.venv/lib/python3.11/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.
"
How can i solve it?

Hey,

You’re attempting to run Java modules on Render without using Docker. However, we don’t have a Java runtime available, so this approach won’t work. The only way to run Java code on Render is by using our Docker runtime. You’ll need to build your Java application within a Docker container

Jérémy.
Render Support, UTC+3

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.