Fork me on GitHub
#braveandtrue
<
2019-05-03
>
farenzer_house05:05:33

having issues following build instructions here if anyone knows whats up 🙂 https://www.braveclojure.com/quests/deploy/set-up-a-server-and-deploy-a-clojure-app-to-it/#Mac

farenzer_house05:05:45

upon running 'boot build' i'm getting classNotFoundException:

...  liberator.conneg/eval6357                         conneg.clj:    1
                   liberator.conneg/eval6357/loading--auto--                         conneg.clj:    1
                                     java.lang.Class.forName                         Class.java:  398
                                    java.lang.Class.forName0                          Class.java
                             java.lang.ClassLoader.loadClass                   ClassLoader.java:  521
                                                         ...
                             java.lang.ClassLoader.loadClass                   ClassLoader.java:  588
                                                         ...
                           java.net.URLClassLoader.findClass                URLClassLoader.java:  471
java.lang.ClassNotFoundException: javax.xml.ws.ProtocolException
      clojure.lang.ExceptionInfo: javax.xml.ws.ProtocolException
    line: 1

manutter5111:05:11

This is probably because Java 9 and later have removed a number of modules that were part of Java 8 and earlier. You can re-include them by running java with --add-modules java.xml.bind. I don’t use boot myself, but from looking at the docs, it sounds like you should be able to do this by setting export BOOT_JVM_OPTS="--add-modules java.xml.bind" (OS X and Linux). For Windows it’s a little more complicated: you have to create a boot.l4j.ini file in the same directory as your boot.exe, and inside the file, put the --add-modules java.xml.bind directive. See also https://stackoverflow.com/questions/43574426/how-to-resolve-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception-in-j if you’d like more details about the underlying Java problem that this fixes.