I am trying to get the Timefold library working in a python function (I need to go via python and not java as I need to edit the ontology). It seemed to work ok in live preview, ie it is showing me the ontology edits that I was expecting. However, when I tag and release the function and ping it via a button in Workshop, I get this message. Any fixes or is it best to find another algorithm (pity)?
InvalidJVMVersionError: Timefold Solver for Python requires JVM (java) version 17 or later. You have none installed. Maybe use sdkman (https://sdkman.io) to install a more modern version of Java..
Error Parameters: {
"module": "python_functions.my_function"
}
Traceback (most recent call last):
File "/app/var/data/conda-env/lib/python3.12/site-packages/_jpyinterpreter/jvm_setup.py", line 304, in get_default_jvm_path
return jvm_getter()
^^^^^^^^^^^^
File "/app/var/data/conda-env/lib/python3.12/site-packages/jpype/_jvmfinder.py", line 70, in getDefaultJVMPath
return finder.get_jvm_path()
^^^^^^^^^^^^^^^^^^^^^
File "/app/var/data/conda-env/lib/python3.12/site-packages/jpype/_jvmfinder.py", line 204, 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.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/var/data/conda-env/lib/python3.12/site-packages/python_functions/my_function.py", line 50, in <module>
@planning_entity
^^^^^^^^^^^^^^^
File "/app/var/data/conda-env/lib/python3.12/site-packages/timefold/solver/domain/_annotations.py", line 773, in planning_entity
ensure_init()
File "/app/var/data/conda-env/lib/python3.12/site-packages/timefold/solver/_timefold_java_interop.py", line 191, in ensure_init
init()
File "/app/var/data/conda-env/lib/python3.12/site-packages/timefold/solver/_timefold_java_interop.py", line 90, in init
args = [get_default_jvm_path()]
^^^^^^^^^^^^^^^^^^^^^^
File "/app/var/data/conda-env/lib/python3.12/site-packages/_jpyinterpreter/jvm_setup.py", line 306, in get_default_jvm_path
raise InvalidJVMVersionError(
Timefold Solver for Python requires JVM (java) version 17 or later. You have none installed. Maybe use sdkman (https://sdkman.io) to install a more modern version of Java.