-
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
regression from quarkus 1.2.1 - polyglot app fails with module org.graalvm.sdk does not export org.graalvm.polyglot.impl to unnamed #10226
Comments
reproduced the same issue with 1.5.2.Final version. |
same issue with mvn io.quarkus:quarkus-maven-plugin:1.8.1.Final:create \
-DprojectGroupId=org.acme \
-DprojectArtifactId=config-quickstart \
-DclassName="org.acme.config.GreetingResource" \
-Dpath="/greeting"
cd config-quickstart |
Just being curious. Are there any plans to fix this bug in the near future? |
@gdhokamp i do not think so it is the structure of quarkus you need to code a graal-sdk extension to use that. You can how ever fix some of the problems that quarkus has via gradle as it allows better exclusion and other deep package replacements. overall if you want to use quarkus you can only go for a own extension. |
we should merge this issue with this #9634 |
It is no longer needed Fixes quarkusio#10226
I have some issue with 2.4.2.Final |
I have too in Version 2.4.1 Final The exception looks a bit different but I was pointed to this thread. This is what I am getting, after including graalvm during startup:
|
Facing a similar problem with 2.9.2 as well. settings.gradle
build.gradle
Environment
Error on executing ./gradlew test
|
@roudra i solved it via building quarkus projects as uber jar and then use that in a example application like this polyglot with other languages i my self was not able to understand whats wrong with quarkus or how quarkus works. but the low level graalvm builds it self to work always without problems. |
same for me, uber jar helped |
Thank you @frank-dspeed for the suggestion. I'll try it. Do I skip tests to create the UberJar though? Coz my problem is with test itself. I was digging up more on this topic and came across a suggestion to add graalvm classes in parent first class loader. So adding the below line in application.properties seems to resolve(?)/work-around this problem Still trying to figure out the root cause though. |
Any chance you could try #26171 ? |
@geoand lol the changes look familar to me i also saw such changes already merged before i am wondering when that got lost we have a other issue related to that but lets see new year new luck. conclusion still valid and worksYou need to code a quarkus extension and then refrence there the guest languages. that is the quarkus way to do it but i am not a quarkus guy so i know near nothing about its internals or structure but i know the vertx part a bit and i know the graalvm part only Quarkus is a blackbox for me. the uberjar workaround works because it abstracts quarkus away into a normal java product that i understand again. |
We don't support Truffle in any way in Quarkus, what I did simply ensures that Truffle can be loaded by the JVM properly for the all types of jars - nothing more |
@geoand if you do not support truffle why do you got so much extension that need it? for example the Camel one which i used to get my builds working as inspiration? In Fact if quarkus does use graalvm wording anywhere without supporting truffle that would be a bad joke as that also blocks java on java and so on everything graalvm stands for. |
@geoand do you realy claim that quarkus is a build framework for vertx and graalvm? do you really think that this adds value? i will speak the truth to you at current state of quarkus for me a list of build instructions in a Readme does a better job then quarkus |
Not exactly sure what you are referring to, but in all our material we explicitly mention GraalVM native-image. We never claimed to support the entirety of the (amazing) GraalVM project. |
Hi @frank-dspeed, graalvm is a big project with multiple aspects. Graalvm native-image is what Quarkus core team uses and focus on. Very much aware that many like the GraalVM Truffle features, and welcome anyone who is up for contributing more dedicated Truffle support but we all have to prioritize our time. thus if you are interested in helping out and contribute fixes or separate extensions I’m happy to help you do that but please do realize Quarkus core GraalVM support is focusing on native-image parts of GraalVM. |
Always better to try things before we merge them :). There is some advice here on how to do it: https://github.com/quarkusio/quarkus/blob/main/CONTRIBUTING.md#building-main - except you have to build @geoand 's branch, not |
Add some more GraalVM jars as parent first
Describe the bug
Project scaffolded at https://code.quarkus.io/ - depending on io.quarkus:quarkus-core:jar:1.5.2.Final,
and extended with polyglot code below, fails at execution with an exception:
com.oracle.truffle.polyglot.PolyglotImpl (in unnamed module) cannot access class org.graalvm.polyglot.impl.AbstractPolyglotImpl
The same app, but with quarkus 1.2.1, passes the test.
I've added the following dependencies to pom.xml in the scaffolded project to enable polyglot code:
I've selected GraalVM 19.3.1 to use, because I've noted that there is dependency on it in the clean scaffolded project:
Expected behavior
Test is passing, i.e. JS code is executed by GraalVM and response is returned.
Actual behavior
Test is failing with exception.
To Reproduce
Test is failing.
Environment (please complete the following information):
io.quarkus:quarkus-core:jar:1.5.2.Final
Additional context
Reported also on:
Full stacktrace
Regression from quarkus 1.2.1
Test is passing for quarkus 1.2.1, which is the last release passing the test.
Older releases are failing.
Below is a change in
pom.xml
needed to make app at https://github.com/miloslavskacel/polyglotcode-with-quarkus.gitpassing tests.
Full
pom.xml
with quarkus 1.2.1The text was updated successfully, but these errors were encountered: