cljsjs / boot-cljsjs

Helper tasks to aid the packaging of JS dependencies for Clojurescript projects
66 stars 22 forks source link

ClassNotFoundException on Java 12 #57

Closed metasoarous closed 5 years ago

metasoarous commented 5 years ago

Specifically getting: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter when I try to run boot package install target on Java 12. The following SO post suggests that this may affect other recent Java versions as well.

https://stackoverflow.com/questions/43574426/how-to-resolve-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception-in-j

The work around is pretty simple: add [javax.xml.bind/jaxb-api "2.3.0"] to the dependencies. I tried this directly in one of the cljsjs-packages I'm trying to update, and it did the trick. Adding to boot-cljsjs would prevent folks from having to do this. Versions of cljsjs/boot-cljsjs would still have to be updated in all the build.boot files, but that's preferable to adding additional deps (IMHO), and could maybe be done in bulk with search & replace.

Deraen commented 5 years ago

Fixed in 0.10.4: https://github.com/cljsjs/boot-cljsjs/commit/ac5ff2aa50c0ee005edcc7ac2f36620c781366df

metasoarous commented 4 years ago

Hi @Deraen.

First off, thanks for your work on this!

It looks like I may have dropped the ball last time I was working on packaging this and never tested it out, because the last file I was messing with in my cljsjs-packages repo has a modified date of Aug 8, which is when I posted my comment (and you so quickly responded).

I'm picking the ball up again and trying to mint a release of the Vega libs and observing the same behavior, but from this line: https://github.com/cljsjs/boot-cljsjs/commit/ac5ff2aa50c0ee005edcc7ac2f36620c781366df#diff-bec8a5ea1ad13ddad6c7ec7fc4c7c6ecR388. It looks like the cljsjs.impl.closure namespace implicitly calls out to javax.xml.bind as well, through cljs.closure/build (IIUC). This may have been fixed in cljs, but either way explicitly adding [javax.xml.bind/jaxb-api ...] in boot-cljsjs may also do the trick.

For now, I may try one of the java version management utilities to get past this, but it would be wonderful if this could be fixed in a new release!

Thanks again for your work!

Deraen commented 4 years ago

Cljs 1.10.238 drops javax use.