eclipsesource / eclipsesource/J2V8
tomcat hotreload fails to load J2V8 JNI
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 387
- PR merge metrics
- No merged PRs in 30d
Description
I'm using J2V8 on a Tomcat application. It's failing to load the J2V8 when the Tomcat doing a reload (example: changing web.xml). I have used the debugger to trace down the source of the exception. It happends in LibraryLoader.java#L111 where the FileOutputStream is unable to open access to the file because the file is already used in the JVM of Tomcat.
After i change the LibraryLoader.java to detect first if the JNI library already loaded (by calling System.loadLibrary and catch the Exception "already loaded") then skip the extract method. Fails too because when it tries to call V8._createIsolate it throws a UnstatisfiedLinkError.
I cannot use the J2V8 in the Tomcat lib folder because we deploy the application with the WAR file.
I hope you have an idea how i solve the problems for Tomcat applications.
Contributor guide
Assessment
This issue has not been assessed yet.