Skip to content
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

Java 9/10 compatibility #116

Open
andersrye opened this issue Oct 6, 2018 · 1 comment
Open

Java 9/10 compatibility #116

andersrye opened this issue Oct 6, 2018 · 1 comment

Comments

@andersrye
Copy link

lein-immutant doesnt seem to work with Java 9/10. Seems to be an issue in clj-http-lite: hiredman/clj-http-lite#17 .

With profiles.clj: {:user {:plugins [[lein-immutant "2.1.0"]]}}

~ $ java --version
java 10.0.2 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)
~ $ lein version
Leiningen 2.8.1 on Java 10.0.2 Java HotSpot(TM) 64-Bit Server VM
~ $ lein immutant
clojure.lang.Compiler$CompilerException: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter, compiling:(clj_http/lite/util.clj:33:3)
 at clojure.lang.Compiler.analyzeSeq (Compiler.java:6875)
    clojure.lang.Compiler.analyze (Compiler.java:6669)
    clojure.lang.Compiler.analyze (Compiler.java:6625)
    clojure.lang.Compiler$BodyExpr$Parser.parse (Compiler.java:6001)
    clojure.lang.Compiler$FnMethod.parse (Compiler.java:5380)
    ...
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter
 at java.net.URLClassLoader.findClass (URLClassLoader.java:466)
    clojure.lang.DynamicClassLoader.findClass (DynamicClassLoader.java:69)
    java.lang.ClassLoader.loadClass (ClassLoader.java:566)
    clojure.lang.DynamicClassLoader.loadClass (DynamicClassLoader.java:77)
    java.lang.ClassLoader.loadClass (ClassLoader.java:499)
    ...

--add-modules=java.xml.bind is a workaround

~ $ export _JAVA_OPTIONS=--add-modules=java.xml.bind
~ $ lein immutant
Picked up _JAVA_OPTIONS: --add-modules=java.xml.bind
Couldn't find project.clj, which is needed for immutant
@WorldsEndless
Copy link

WorldsEndless commented Apr 26, 2019

This is breaking my projects, because I can't deploy for production. That work around is a huge relief, though.
EDIT: The workaround works on some linux distros that happen to include those modules, but Ubuntu's java packages do not, so the workaround fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants