-
Notifications
You must be signed in to change notification settings - Fork 191
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
[23.1.0] Unable to find truffle-api/polyglott in embedded assembly #764
Comments
This issue has nothing to do with
The failure is not about the classes themselves. It is about some module-related meta-data that your approach does not satisfy. I will let @chumer to comment on whether this something that we support still and how. |
It seems I found a way to circumvent this problem in assembly: java -Dpolyglotimpl.DisableClassPathIsolation=true -jar target/polyglott-full-embedded.jar |
This is an issue for me too. |
I fear the Maven assembly plugin merges all dependencies into a single uber jar by default. Uber jars won't work with optimizations enabled since the optimizing runtime needs to run as a named module. The module information gets lost when creating the uber jar. The reason we need to run as a named module is that we need to access VM internals to perform optimizations and that is only possible when running as a named module. If you cannot use something else than an uber jar I fear the only option is to use If you are using zip assemblies with a regular class path everything should work fine. |
Maven Assemblies are now supported again with 23.1.2 and 24.0. I would still not recommend it, though. |
Hi,
We are building a full assembly with GraalJS embedded in it. I created a simple project that easily reproduce the problem.
To summarize:
mvn -q exec:java
, it works (meaning the dependencies are correctly declared).java -jar target/polyglott-full-embedded.jar
, it crashes.When launched with
-Dpolyglotimpl.TraceClassPathIsolation=true
, the output is:One can see that
truffle-api
and/orpolyglot
is not found in the jar, but the classes are present in the assembly, hence there seems to be no reason to not to be found.As a side note, this was perfectly working in 23.0.1 (by using the old maven artifacts).
Thanks & best regards.
The text was updated successfully, but these errors were encountered: