-
Notifications
You must be signed in to change notification settings - Fork 84
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
Upgrading to 1.2.x (from 1.1.3) causes NoClassDefFoundError in macOS (and Java 10) #87
Comments
I will try to investigate this in the next few days. It should be noted that v1.2.2, on Linux, very well may not work on non Oracle/OpenJDK versions of Java due to the use of an internal JDK API. MacOS however, should work, so I will investigate this. |
Thanks. I can confirm that 1.2.2 on Linux with Zulu JDK 10 crashes: java.lang.NoClassDefFoundError: Could not initialize class com.zaxxer.nuprocess.internal.LibC
at com.zaxxer.nuprocess.internal.BasePosixProcess.createPipes(BasePosixProcess.java:585)
at com.zaxxer.nuprocess.linux.LinuxProcess.start(LinuxProcess.java:86)
at com.zaxxer.nuprocess.linux.LinProcessFactory.createProcess(LinProcessFactory.java:40)
at com.zaxxer.nuprocess.NuProcessBuilder.start(NuProcessBuilder.java:266)
at org.sireum.util.jvm.Exec.run(Exec.scala:100) 1.1.3 on Linux with the Zulu JDK works; 1.2.2 on Linux with Oracle Java 8 also works. |
@robby-phd Thanks for confirming. I have the feeling that I can support Zulu (on Linux), if I can uncover their internal API for spawning processes (a little class-decompilation should reveal it). Regarding supporting OS X on Zulu, that looks like a straight-up bug, as the v1.2.2 OS X process spawning code is [nearly] identical to v1.1.3. Whatever minor difference was introduced should be quickly resolvable. |
@robby-phd NuProcess v1.2.3 has been published with support for Azul Systems' Zulu JVM. |
Great, thanks! |
To fix bug reports brettwooldridge/NuProcess#87.
On brettwooldridge#87 (May 2018), there was a report of a linkage issue when using Azul Zulu 10. As part of fixing that issue, a check was added to use a new code path when the JVM vendor included "Azul". A month later, brettwooldridge#91 (June 2018) was created showing a similar linkage error when using OpenJDK 10. For that issue, the Azul-specific change from brettwooldridge#87 was generalized to apply to any Java 10+ JVM, but the Azul vendor check was not removed. As a result, Azul Zulu 8 (for example) attempts to use the Java 10 code path and fails. - Removed the Azul vendor check. Now, regardless of JVM vendor: - Java 10+ JVMs use Java_java_lang_ProcessImpl_forkAndExec - Earlier JVMs use Java_java_lang_UNIXProcess_forkAndExec
On #87 (May 2018), there was a report of a linkage issue when using Azul Zulu 10. As part of fixing that issue, a check was added to use a new code path when the JVM vendor included "Azul". A month later, #91 (June 2018) was created showing a similar linkage error when using OpenJDK 10. For that issue, the Azul-specific change from #87 was generalized to apply to any Java 10+ JVM, but the Azul vendor check was not removed. As a result, Azul Zulu 8 (for example) attempts to use the Java 10 code path and fails. - Removed the Azul vendor check. Now, regardless of JVM vendor: - Java 10+ JVMs use Java_java_lang_ProcessImpl_forkAndExec - Earlier JVMs use Java_java_lang_UNIXProcess_forkAndExec
Upgrading to 1.2.x throws the following exception when using NuProcess in macOS (10.13.4, Zulu JDK 10.2+3-jdk10.0.1):
Steps to reproduce using 1.2.2 (note: this first downloads Zulu JDK, Sbt, and other dependencies):
The text was updated successfully, but these errors were encountered: