Skip to content

Gorilla and Java 10 #13

@peter-lyons-kehl

Description

@peter-lyons-kehl

Dear Jony,

Thank you for Gorilla.

Sadly, SUN/Oracle's Java 10 doesn't like it. From below it sounds not Gorilla-specific, but this seems to be the place to report.

# SUN's java version "10.0.1" 2018-04-17 on 64bit SUSE
# The problem probably also exists with OpenJDK 10. However, OpenJDK has more issues (it can't run lein at all).
lein new app playground
cd playground
# edit project.clj to add :plugins [[lein-gorilla "0.4.0"]] and :jvm-opts ["--add-modules" "java.xml.bind"]. See below for why :jvm-opts. After editing, project.clj is:
(defproject playground "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.8.0"]]
  :main ^:skip-aot playground.core
  :target-path "target/%s"
    :plugins [[lein-gorilla "0.4.0"]]
    :jvm-opts ["--add-modules" "java.xml.bind"]
  :profiles {:uberjar {:aot :all}})

# To double-check, this should be an alternative to the above Ljvm-opts, but it didn't help either:
export  JAVA_TOOL_OPTIONS="-Djdk.launcher.addmods=java.xml.bind"

#Gorilla fails:
lein gorilla
Picked up JAVA_TOOL_OPTIONS: -Djdk.launcher.addmods=java.xml.bind
clojure.lang.Compiler$CompilerException: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter, compiling:(org/httpkit/server.clj:1:1)
 at clojure.lang.Compiler.load (Compiler.java:7391)
    clojure.lang.RT.loadResourceScript (RT.java:372)
...

Related, applied above but it didn't fix this for Java 10: bhauman/lein-figwheel#612.
The class should exist in Java 10: https://docs.oracle.com/javase/10/docs/api/javax/xml/bind/DatatypeConverter.html.

Please help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions