boot-clj / boot-cljs

Boot task to compile ClojureScript programs.
Eclipse Public License 1.0
176 stars 40 forks source link

Does not work on JDK9 due to javax.xml.bind #178

Closed kanwei closed 7 years ago

kanwei commented 7 years ago

util.clj require javax.xml.bind, which is now hidden

Deraen commented 7 years ago

Fixed by https://github.com/boot-clj/boot-cljs/commit/8d0f099ade15263debe15e3436f5d04c41f80bc0

arijun commented 6 years ago

Unless I'm doing something wrong (not unlikely), this is still broken for me.

With :dependencies '[[adzerk/boot-cljs "2.1.4"]] I still get java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter

Deraen commented 6 years ago

2.1.4 doesn't use javax:

~/.m2/repository/adzerk/boot-cljs/2.1.4
❯ unzip boot-cljs-2.1.4.jar 

~/.m2/repository/adzerk/boot-cljs/2.1.4
❯ ag javax

~/.m2/repository/adzerk/boot-cljs/2.1.4
❯ ag Base64
adzerk/boot_cljs/util.clj
5:  (:import [java.util Base64]
52:  as Base64 string."
57:    (.encodeToString (Base64/getEncoder) (.toByteArray bos))))
60:  "Deserialize given Base64 encoding string using Object Streams and return the
63:  (with-open [bis (ByteArrayInputStream. (.decode (Base64/getDecoder) ba))
gunar commented 6 years ago

Oh mang, I'm having the same problem here

 gcg@zeno  ~/modern-cljs  boot --version                                                             
#http://boot-clj.com
#Mon Jun 11 23:15:46 BRT 2018
BOOT_VERSION=2.7.2
BOOT_CLOJURE_VERSION=1.8.0
BOOT_CLOJURE_NAME=org.clojure/clojure

 gcg@zeno  ~/modern-cljs  java -version                                                              
openjdk version "10.0.1" 2018-04-17
OpenJDK Runtime Environment (build 10.0.1+10)
OpenJDK 64-Bit Server VM (build 10.0.1+10, mixed mode)

 gcg@zeno  ~/modern-cljs  cat build.boot                                                             
(set-env!
          :source-paths #{"src/cljs"}
          :resource-paths #{"html"}

          :dependencies '[[adzerk/boot-cljs "2.1.4"]])

(require '[adzerk.boot-cljs :refer [cljs]])

 gcg@zeno  ~/modern-cljs  boot cljs                                                                                                                              
Writing main.cljs.edn...                                                                                                                                           
Compiling ClojureScript...
• main.js
                                       java.lang.Thread.run                        Thread.java:  844

...

       java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter
clojure.lang.Compiler$CompilerException: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter, compiling:(cljs/closure.clj:1:1)
             clojure.lang.ExceptionInfo: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter, compiling:(cljs/closure.clj:1:1)
DVious commented 6 years ago

I have the same problem, using Boot 2.8.0.

Any update on a solution, as I'm not savvy enough to add Javax manually.

endrebak commented 6 years ago

I used "1.7.x" initially, but updated my build.boot to "2.1.4". I'm still getting the error reported. @Deraen Is there a way to debug/fix this somehow?

Here is the error:

       java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter
clojure.lang.Compiler$CompilerException: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter, compiling:(cljs/closure.clj:1:1)
             clojure.lang.ExceptionInfo: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter, compiling:(cljs/closure.clj:1:1)
endrebak commented 6 years ago

This fixed it for me:

(set-env!
 :source-paths #{"src/cljs"}
 :resource-paths #{"html"}

 :dependencies '[[org.clojure/clojurescript "1.10.339"]
                 [adzerk/boot-cljs "2.1.4"]])

(require '[adzerk.boot-cljs :refer [cljs]])
JamesMcMahon commented 5 years ago

This fixed it for me:

(set-env!
 :source-paths #{"src/cljs"}
 :resource-paths #{"html"}

 :dependencies '[[org.clojure/clojurescript "1.10.339"]
                 [adzerk/boot-cljs "2.1.4"]])

(require '[adzerk.boot-cljs :refer [cljs]])

I must be missing something because I have something that looks really similar but I am still getting this error.

DVious commented 5 years ago

Ooh - messages! Thanks, all! I have looked away for the longest while. Still, I will try your solutions and break the back of this thing!

Regs,

danieltanfh95 commented 4 years ago

This fixed it for me:

(set-env!
 :source-paths #{"src/cljs"}
 :resource-paths #{"html"}

 :dependencies '[[org.clojure/clojurescript "1.10.339"]
                 [adzerk/boot-cljs "2.1.4"]])

(require '[adzerk.boot-cljs :refer [cljs]])

this fix works, with the quick start in the wiki