From f2f74c0faf851d6970c8112311586bfe3f10c443 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Tue, 17 Oct 2023 13:24:24 -0500 Subject: [PATCH 1/2] Issue 302: Switch from Nashorn to GraalVM for Javascript execution. Instructions provided by issue are applied as-is with no observed problems. --- pom.xml | 6 ++++++ src/main/resources/META-INF/bpm-platform.xml | 1 + 2 files changed, 7 insertions(+) diff --git a/pom.xml b/pom.xml index 8bfc112a..c0f75444 100644 --- a/pom.xml +++ b/pom.xml @@ -327,6 +327,12 @@ 1.10.0 + + org.graalvm.js + js + 22.3.3 + + diff --git a/src/main/resources/META-INF/bpm-platform.xml b/src/main/resources/META-INF/bpm-platform.xml index 2c055a48..a0c6a116 100644 --- a/src/main/resources/META-INF/bpm-platform.xml +++ b/src/main/resources/META-INF/bpm-platform.xml @@ -3,6 +3,7 @@ 15000 900000 + graal.js From f22093505c74f1719291a22684b45b0cba6e5368 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Wed, 18 Oct 2023 14:51:27 -0500 Subject: [PATCH 2/2] Issue 302: Include js-scriptengine and use upper case 'G' in 'Graal.js'. This dependency is also required: ``` org.graalvm.js js-scriptengine 22.3.3 ``` The following arning is observed: ``` [engine] WARNING: The polyglot context is using an implementation that does not support runtime compilation. The guest application code will therefore be executed in interpreted mode only. Execution only in interpreted mode will strongly impact the guest application performance. For more information on using GraalVM see https://www.graalvm.org/java/quickstart/. To disable this warning the '--engine.WarnInterpreterOnly=false' option or use the '-Dpolyglot.engine.WarnInterpreterOnly=false' system property. [engine] WARNING: The polyglot context is using an implementation that does not support runtime compilation. The guest application code will therefore be executed in interpreted mode only. Execution only in interpreted mode will strongly impact the guest application performance. For more information on using GraalVM see https://www.graalvm.org/java/quickstart/. To disable this warning the '--engine.WarnInterpreterOnly=false' option or use the '-Dpolyglot.engine.WarnInterpreterOnly=false' system property. ``` The configuration file appears to be case sensitive. Use `Graal.js` with an upper case `G` rather than a lower case `g`. --- pom.xml | 6 ++++++ src/main/resources/META-INF/bpm-platform.xml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c0f75444..34921911 100644 --- a/pom.xml +++ b/pom.xml @@ -333,6 +333,12 @@ 22.3.3 + + org.graalvm.js + js-scriptengine + 22.3.3 + + diff --git a/src/main/resources/META-INF/bpm-platform.xml b/src/main/resources/META-INF/bpm-platform.xml index a0c6a116..6432553d 100644 --- a/src/main/resources/META-INF/bpm-platform.xml +++ b/src/main/resources/META-INF/bpm-platform.xml @@ -3,7 +3,7 @@ 15000 900000 - graal.js + Graal.js