Connector example NullValueException: Can't find scripting engine for 'javascript'


i need some help getting the connector example running in eclipse. I installed Eclipse with maven as described in the user-guide. When i run maven-install on a new project like shown in the video tutorial “Camunda Tutorial for Java Developers”, i get the successfull output. The bpm process engine version 7.14 is also running fine. Im using JRE 1.8.0_271 and the JDK version 15.0.1.
But now i want to check out how to use a custom connector trying to adopt the example from the git camunda-bpm-examples/tree/master/servicetask/rest-service project.
When i try to maven-install the unchanged example i got the error:

ERROR org.camunda.bpm.engine.context - ENGINE-16004 Exception while closing command context: Can't find scripting engine for 'javascript': scriptEngine is null
org.camunda.bpm.engine.exception.NullValueException: Can't find scripting engine for 'javascript': scriptEngine is null

there is a similar post here using IntelliJ but i’m using a fresh Eclipse installation with maven.
I tried using several other dependencies like graalvm which is mentioned here:
But whith graalvm i got another error:

ENGINE-16004 Exception while closing command context: Unable to evaluate script:org.graalvm.polyglot.PolyglotException: ReferenceError: org is not defined
org.camunda.bpm.engine.ScriptEvaluationException: Unable to evaluate script:org.graalvm.polyglot.PolyglotException: ReferenceError: org is not defined

so im in the dark here and dont know how to continue, although it is maybe an easy task for a Java-developer. I appreciate any help - for me an old .NET Developer Java(script) is a jungle :wink:

Kind regards, J.Lucia

This is your problem - in JDK 15 the javascript engine has been removed. Camunda useses the Javascript engine within the JDK when running any javascript so you’re going to need to use an older version of the Java JDK

Thank you Niall for your quick response! After installing JDK 14 and adding it to the Installed JREs in Eclipse the build process succeeded.
Kind regards J.Lucia

1 Like

Are there any plans to move to support GraalVM? Sounds like their Javascript support is cutting edge and performant. It would also be interesting to see Camunda scripts support the other languages supported by GraalVM, Python in particular … though I confess I know nothing about Jython vs Python.

While I expect the performance optimizations of GraalVM won’t be material to us, we are very worried about the Nashorn deprecation. Also, we are largely a Typescript shop which, I believe would be fully supported by GraalVM.js because of its focus on the latest versions of ECMAScript.

Hi @Stephen_Newport
We’ll very likely release some kind of replacement for Nashorn. I’d say that GraalVM is currently the most likely option, but we’re still looking into exactly what the best option is.

Hello Niall do you have any news about this? In our company we have others decision engine with several rules writed in javascript. A possibility would be move these to camunda decision engine if this support javascript in GraalVM or the last JDK.

You can follow this ticket for information on the progress.
Looks like it could be supported in the 7.16 release which will be out in October.