Details
-
Feature
-
Status: Released (View Workflow)
-
Medium
-
Resolution: Fixed
-
2.5.4, 2.6.1
-
None
Description
Current Situation
- The GraalVM Scripting Interface offers use of the Java and JavaScript languages for jobs.
- The GraalVM Scripting Interface adds a number of settings to the scripting engine as visible from the attached pdJavascript.graalvm.options.jobresource.json file.
- The settings include the path to the JVM that is used from the JAVA_HOME environment variable.
- If no JAVA_HOME environment variable is specified then the settings will not be applied and GraalVM can raise the following error during startup of a job:
javax.script.ScriptException: ReferenceError: require is not defined
- This forces users to specify the JAVA_HOME environment variable when running jobs.
Desired Behavior
- The GraalVM Scripting Interface should not require the JAVA_HOME environment variable.
- Instead, the path to the JVM should used from
System.getProperties().getProperty("java.home")
Patch
Patches are available for:
- Releases 2.5.4, 2.5.5
- Releases 2.6.1, 2.6.2
Test instructions
- Create a JavaScript job with an argument log_level=debug
- Make sure that the JAVA_HOME environment variable is not set or that it points to an installation other than GraalVM
- Check the JavaScript job output to find a debug line that starts with [getGraalJSScriptEngineOptions] and contains the GraalVM Java path
Attachments
Issue Links
- Wiki Page
-
Wiki Page Loading...