boot-clj / boot

Build tooling for Clojure.
https://boot-clj.github.io/
Eclipse Public License 1.0
1.75k stars 179 forks source link

Broken install on Ubuntu 18.04 / Java 10 #717

Open interstar opened 5 years ago

interstar commented 5 years ago

Problem Description

Trying to follow this basic install on Ubuntu 18.04 :

Download boot.sh and save as boot
Make it executable.
Move it to somewhere in your $PATH.

and I get this

phil@Wren:~/bin$ boot -u
Exception in thread "main" java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:564)
    at Boot.main(Boot.java:257)
Caused by: java.lang.RuntimeException: Failed to load ClojureRuntimeShimImpl
    at org.projectodd.shimdandy.ClojureRuntimeShim.newRuntime(ClojureRuntimeShim.java:21)
    at org.projectodd.shimdandy.ClojureRuntimeShim.newRuntime(ClojureRuntimeShim.java:32)
    at boot.App.newShim(App.java:309)
    at boot.App.aetherShim(App.java:346)
    at boot.App.writeProps(App.java:213)
    at boot.App.readProps(App.java:253)
    at boot.App.main(App.java:458)
    ... 5 more
Caused by: java.lang.ClassNotFoundException: org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl
    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:566)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
    at org.projectodd.shimdandy.ClojureRuntimeShim.newRuntime(ClojureRuntimeShim.java:18)
    ... 11 more

Platform details

Platform : Ubuntu 18.04 Platform version:

java -version
openjdk version "10.0.2" 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.2)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.2, mixed mode)
daveyarwood commented 5 years ago

Anecdotally, we're running various services in production on Ubuntu 18.04 that use Boot, so maybe this is a Java 10-related issue? We're using Java 8:

$ java -version
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-0ubuntu0.18.04.1-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
interstar commented 5 years ago

Yes. That sounds plausible.

I'll have a try with an older Java but I'll leave this here because it probably needs to be addressed.

burn2delete commented 5 years ago

At the moment we dont have comprehensive test system for different java versions, this is something we should probably update on travis

burn2delete commented 5 years ago

I recently updated the testing platforms used to build boot, seems we cannot compile on OpenJDK 11+

SomeoneSerge commented 5 years ago

Confirm.

  1. Archlinux, java-10-openjdk
  2. Download boot.sh
  3. ..., Caused by: java.lang.ClassNotFoundException: sun.misc.Launcher$ExtClassLoader
  4. Switch to java-11-openjdk
  5. ..., Caused by: java.lang.ClassNotFoundException: sun.misc.Launcher$ExtClassLoader
  6. Switch to java-8-openjdk
  7. Works fine
burn2delete commented 5 years ago

We are now passing on all platforms, please try 2.8.3