-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
FileSystemNotFoundException when init Graal in Springboot #1348
Comments
Hi @JoshuaChen thanks for your report. I have not seen that specific failure, we had reports of troubles with fat jars before, e.g. oracle/graaljs#125 or oracle/graaljs#135 Can you please check if this might be similar? Best, |
I also have exact similar situation as mentioned by @JoshuaChen , instead of unknown source , i got java.nio.file.FileSystemNotFoundException: null |
@wirthi |
I have further debugged issue of Jar and found issue with following jar |
Yes, the issue is probably that the path to the We have the exact same issue with a Spring Boot application. |
I'm facing a similar issue. Spring Boot Application works ok when started from IDE, but once I package application and run inside docker (openjdk:8u111-jdk-alpine) I get FileSystemNotFoundException see error log below. @chumer based on your comment on oracle/graaljs#125, please when can we expect a fix on this issue? springBootVersion: 2.1.5.RELEASE graalVersion: 19.0.0 Dependencies: graal-sdk, truffle-api, js, js-scriptengine java.nio.file.FileSystemNotFoundException: null |
Hi all, @pszalanski @chineduekwunife I'm facing the same problem on Springboot, in my case, using JS-19.1.1. @JoshuaChen I actually tried the "classpath" approach and unfortunately it did not work. I got this error I also tried the approach mentioned here but I didn't success. It runs in my IDE but as soon as I generate the jar, run it and the application hits the GraalJS code, the java.nio.file.FileSystemNotFoundException: null is thrown. In case it is relevant, I created a tiny poc using springboot and GraalJS libraries here, I'm using OpenSDK11. |
I had the same problem with a spring boot application. This is my solution:
That works for me with OpenJDK8 and 11 with the spring-boot-maven-plugin The POM i used for testing:
|
Thanks @xarfai I tried on my POC and it worked |
The System property for language home is unset, the code determining the language home using jar location should be more robust. |
Also experiencing this @xarfai 's workaround also worked for me as well. |
Fixed by: 42180c5. |
@tzezula does that also mean your suggested new workaround would not work until using 19.3? |
@tzezula What is the current workaround code in order to get this running with 19.3.0? Where is |
@xarfai workaround helped me find the solution (thank you!). Debugged and found out in
Just provide the string try {
URL res = com.oracle.js.parser.ScriptEnvironment.class.getClassLoader().getResource("/com/oracle/truffle/js/lang/JavaScriptLanguage.class");
// initialize the file system for the language file
FileSystems.newFileSystem(res.toURI(), new HashMap<>());
} catch (Throwable ignored) {
// in case of starting without fat jar
} Otherwise I was in the same boat and had to downgrade my graalvm dependencies to |
This didn't work for me I verified my class is here JavaScriptLanguage.class Added the above code and still get
|
I add graal libs in my project to execute JavaScript in Java. My project worked on spingboot framework.
Java Jdk: 9.0.4
spingboot: 2.1.5.RELEASE
graalvm.version : 19.0.0
If I run my project with IDEA directly, graal init success and work fine;
If I buid my project to a fat jar, which contains all libs in it, graal init failed and throw a FileSystemNotFoundException.
The text was updated successfully, but these errors were encountered: