Open rosshkaa opened 3 years ago
Hi @rosshkaa,
I cannot really help you with your question in detail, lacking experience with OSGi, ejb, and payara.
We do have documentation on how to run on Stock JDK though, see:
The IllegalStateException
basically means that the truffle-api.jar
(and potentially, the graaljs.jar
and others) could not be found - they might not be provided in your setup at all, or they were hidden by a different ClassLoader.
When you say it works in a standalone app: what is different in the Payara setup you are trying? Are the classes moved to an uber-jar or similar?
Best, Christian
Got a similar problem trying to integrate GraalJS into existing JavaEE 8 Applications Running on Payara 5.25.0 ( The Enterprice version ) and graalvm version GraalVM CE 21.0.0.2 (build 11.0.10+8-jvmci-21.0-b06).
DBC Created a simplified test application at https://github.com/DBCDK/payara-graalvm-js Works without problems with graalvm-ce-java8-21.0.0.2. but fails with graalvm-java11-21.0.0.2
With and without GraalJS .jars explicit on the war classpath. So suspects some part of the java11 Module system is doing funny stuff.
It also failed with the following jars on the war lib class path. WEB-INF/lib/compiler-21.0.0.2.jar WEB-INF/lib/graal-sdk-21.0.0.2.jar WEB-INF/lib/icu4j-67.1.jar WEB-INF/lib/js-21.0.0.2.jar WEB-INF/lib/js-launcher-21.0.0.2.jar WEB-INF/lib/js-scriptengine-21.0.0.2.jar WEB-INF/lib/launcher-common-21.0.0.2.jar WEB-INF/lib/regex-21.0.0.2.jar WEB-INF/lib/truffle-api-21.0.0.2.jar
The list is extracted with ((URLClassLoader) this.getClass().getClassLoader()).getURLs()
in then same context as
Context.newBuilder().allowExperimentalOptions(true).build()
Hello. I'm writing simple JS executor using GraalVM(20.3.0 (build 11.0.9+10-jvmci-20.3-b06)), Maven (3.6.3) and Payara server (5.2020.7) and got a trouble during context building.
The following ejb deploy fails with
java.lang.IllegalStateException: No language and polyglot implementation was found on the classpath. Make sure the truffle-api.jar is on the classpath.
:Libraries graal-sdk, js, js-scriptengine and truffle-api are included as plain maven dependencies, e.g:
I've tried adding those libraries to Payara's lib as jars but it fails with:
The same code works just fine in standalone app.