-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
graal-js does not work when using quarkusDev #9634
Comments
Hello abner, Is this failing in dev mode or in native mode? The reason I ask is, the |
Does it work if you use |
hello any possible solutions for using graal-js in dev mode? |
Did you try changing the scope to provided? |
yes, I tried The results from my tests:
|
Hi, I'm having the same problem trying to run a R script. 1. I couldn't make it work with quarkus dev mode. |
hello thanks for the workaround. We also use such solution in our project. But it will be great to work with quarkusDev mode because it brings more flexibility in development. |
we need to fork quarkus and edit https://github.com/quarkusio/quarkus/blob/master/core/runtime/pom.xml there we need to add the support for that in the artifacts parent section like graal sdk
method 2Thread.currentThread().setContextClassLoader(ClassLoader.getSystemClassLoader()); Related upstream issues |
ParentFirstArtifacts can be contributed by any extension, you can write your own extension that just has this if you really want. If this does fix the problem though we should just include it in Quarkus out of the box. |
@stuartwdouglas it would be a big help if you could get a example working with quarkus and graaljs so that when using graalvm-ce 20.2 quarkus and graaljs do work out of the box. I am total new to Java i just learned the internals i am coming from C, Rust, ECMAScript. I do not fully understand all parts of the class loader symantics at present but i can clear see it is a problem and i see the relation to the issue. A person like you who is familar with java class loaders and init of them probally understands what to do. m.oracle.truffle.polyglot.PolyglotImpl (in unnamed module @0xa18e355) cannot access class org.graalvm.polyglot.impl.AbstractPolyglotImpl (in module org.graalvm.sdk) because module org.graalvm.sdk does not export org.graalvm.polyglot.impl to unnamed module @0xa18e355 |
Do you have a simple example I can play around with? |
@stuartwdouglas after discussion of all issues i came to the conclusion that quarkus is simply not the best fit for a project like mine as you got to many dependencys that collid with my environment. i am running on current java and that did cause the most issues i can faster produce nativ images without quarkus i think. i did only tryed it because i thought it could handle incremental builds for me. It is maybe only use able if everything is a extension and i have no time to learn that framework but thanks for the help. |
There is a simple reproducer application: https://github.com/alukin/polyglot-test-quarkus |
like mentionned in another issue (link below) It's now working. with quarkus 1.9.0.Final and Graal VM 20.2.0 @frank-dspeed I think that with a good configuration, Quarkus can do the job even for a big project, and maybe better than others. Especially for building a native image |
@abouhabb sure once you know that good config it is easy but the way to get such a good one is unclear and full of corner stones that i do not have when i can simply fire and adjust the build command for native image. |
This is fixed upstream, it should work in 1.13 |
Describe the bug
If in my code i try to initialize a
js
context:Context.create("js")
i get this errorExpected behavior
Expected to work just fine, as it works if i do generate a jar and runs from it.
Native image works all well. Of course, if i add
quarkus.native.additional-build-args =--language:js
to application.propertiesActual behavior*
It fails as described in the bug description.
java.lang.IllegalAccessError: superclass access check failed ...
To Reproduce
Steps to reproduce the behavior:
Environment (please complete the following information):
uname -a
orver
: Ubuntu 19.10java -version
: openjdk version "11.0.6" 2020-01-14mvnw --version
orgradlew --version
): Apache Maven 3.6.3The text was updated successfully, but these errors were encountered: