-
Notifications
You must be signed in to change notification settings - Fork 202
Open
Labels
questionFurther information is requestedFurther information is requested
Description
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.
:
@Startup
@Singleton
public class DemoScriptBean {
@PostConstruct
void init() {
Context.newBuilder("js").allowAllAccess(true).build()
}
}
Libraries graal-sdk, js, js-scriptengine and truffle-api are included as plain maven dependencies, e.g:
<properties>
<graalvm.version>20.3.0</graalvm.version>
</properties>
...
<dependency>
<groupId>org.graalvm.truffle</groupId>
<artifactId>truffle-api</artifactId>
<version>${graalvm.version}</version>
</dependency>
I've tried adding those libraries to Payara's lib as jars but it fails with:
Failed to install file:/E:/payara/glassfish/modules/graal-sdk-20.3.0.jar.
org.osgi.framework.BundleException: Could not create bundle object.
at org.apache.felix.framework.Felix.installBundle(Felix.java:3312)
at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:147)
at com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.install(BundleProvisioner.java:448)
at com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.installBundles(BundleProvisioner.java:208)
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuilder.build(OSGiGlassFishRuntimeBuilder.java:142)
at org.glassfish.embeddable.GlassFishRuntime._bootstrap(GlassFishRuntime.java:157)
at org.glassfish.embeddable.GlassFishRuntime.bootstrap(GlassFishRuntime.java:110)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:124)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:109)
at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
Caused by: java.io.FileNotFoundException: META-INF/MANIFEST.MF
at org.apache.felix.framework.util.Util.getMultiReleaseAwareManifestHeaders(Util.java:996)
at org.apache.felix.framework.BundleImpl.createRevision(BundleImpl.java:1266)
at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:113)
at org.apache.felix.framework.Felix.installBundle(Felix.java:3260)
... 13 more
The same code works just fine in standalone app.
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested