braidchat / braid

Braid is a team-chat app with a novel UI that leads to better conversations.
http://www.braidchat.com/
Other
923 stars 53 forks source link

Quickstart instructions not working (Ubuntu 18:04 with OpenJDK 10) #189

Closed interstar closed 5 years ago

interstar commented 5 years ago

When I try to follow the quickstart instructions on https://github.com/braidchat/braid/blob/master/docs/dev/getting-up-and-running-in-development.md

I get :

lein repl
#error {
 :cause javax.xml.bind.annotation.adapters.HexBinaryAdapter
 :via
 [{:type clojure.lang.Compiler$CompilerException
   :message java.lang.ClassNotFoundException: javax.xml.bind.annotation.adapters.HexBinaryAdapter, compiling:(clavatar/core.clj:1:1)
   :at [clojure.lang.Compiler load Compiler.java 7526]}
  {:type java.lang.ClassNotFoundException
   :message javax.xml.bind.annotation.adapters.HexBinaryAdapter
   :at [java.net.URLClassLoader findClass URLClassLoader.java 466]}]
 :trace
 [[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]
  [java.lang.Class forName0 Class.java -2]
  [java.lang.Class forName Class.java 374]
  [clojure.lang.RT classForName RT.java 2204]
  [clojure.lang.RT classForNameNonLoading RT.java 2217]
  [clavatar.core$eval13631$loading__6434__auto____13632 invoke core.clj 1]
  [clavatar.core$eval13631 invokeStatic core.clj 1]
  [clavatar.core$eval13631 invoke core.clj 1]
  [clojure.lang.Compiler eval Compiler.java 7062]
  [clojure.lang.Compiler eval Compiler.java 7051]
  [clojure.lang.Compiler load Compiler.java 7514]
  [clojure.lang.RT loadResourceScript RT.java 379]
  [clojure.lang.RT loadResourceScript RT.java 370]
  [clojure.lang.RT load RT.java 460]
  [clojure.lang.RT load RT.java 426]
  [clojure.core$load$fn__6548 invoke core.clj 6046]
  [clojure.core$load invokeStatic core.clj 6045]
  [clojure.core$load doInvoke core.clj 6029]
  [clojure.lang.RestFn invoke RestFn.java 408]
  [clojure.core$load_one invokeStatic core.clj 5848]
  [clojure.core$load_one invoke core.clj 5843]
  [clojure.core$load_lib$fn__6493 invoke core.clj 5888]
  [clojure.core$load_lib invokeStatic core.clj 5887]
  [clojure.core$load_lib doInvoke core.clj 5868]
  [clojure.lang.RestFn applyTo RestFn.java 142]
  [clojure.core$apply invokeStatic core.clj 659]
  [clojure.core$load_libs invokeStatic core.clj 5925]
  [clojure.core$load_libs doInvoke core.clj 5909]
  [clojure.lang.RestFn applyTo RestFn.java 137]
  [clojure.core$apply invokeStatic core.clj 659]
  [clojure.core$require invokeStatic core.clj 5947]
  [clojure.core$require doInvoke core.clj 5947]
  [clojure.lang.RestFn invoke RestFn.java 703]
  [braid.core.server.db.user$eval13625$loading__6434__auto____13626 invoke user.clj 1]
  [braid.core.server.db.user$eval13625 invokeStatic user.clj 1]
  [braid.core.server.db.user$eval13625 invoke user.clj 1]
  [clojure.lang.Compiler eval Compiler.java 7062]
  [clojure.lang.Compiler eval Compiler.java 7051]
  [clojure.lang.Compiler load Compiler.java 7514]
  [clojure.lang.RT loadResourceScript RT.java 379]
  [clojure.lang.RT loadResourceScript RT.java 370]
  [clojure.lang.RT load RT.java 460]
  [clojure.lang.RT load RT.java 426]
  [clojure.core$load$fn__6548 invoke core.clj 6046]
  [clojure.core$load invokeStatic core.clj 6045]
  [clojure.core$load doInvoke core.clj 6029]
  [clojure.lang.RestFn invoke RestFn.java 408]
  [clojure.core$load_one invokeStatic core.clj 5848]
  [clojure.core$load_one invoke core.clj 5843]
  [clojure.core$load_lib$fn__6493 invoke core.clj 5888]
  [clojure.core$load_lib invokeStatic core.clj 5887]
  [clojure.core$load_lib doInvoke core.clj 5868]
  [clojure.lang.RestFn applyTo RestFn.java 142]
  [clojure.core$apply invokeStatic core.clj 659]
  [clojure.core$load_libs invokeStatic core.clj 5925]
  [clojure.core$load_libs doInvoke core.clj 5909]
  [clojure.lang.RestFn applyTo RestFn.java 137]
  [clojure.core$apply invokeStatic core.clj 659]
  [clojure.core$require invokeStatic core.clj 5947]
  [clojure.core$require doInvoke core.clj 5947]
  [clojure.lang.RestFn invoke RestFn.java 512]
  [braid.core.server.db.group$eval12543$loading__6434__auto____12544 invoke group.clj 1]
  [braid.core.server.db.group$eval12543 invokeStatic group.clj 1]
  [braid.core.server.db.group$eval12543 invoke group.clj 1]
  [clojure.lang.Compiler eval Compiler.java 7062]
  [clojure.lang.Compiler eval Compiler.java 7051]
  [clojure.lang.Compiler load Compiler.java 7514]
  [clojure.lang.RT loadResourceScript RT.java 379]
  [clojure.lang.RT loadResourceScript RT.java 370]
  [clojure.lang.RT load RT.java 460]
  [clojure.lang.RT load RT.java 426]
  [clojure.core$load$fn__6548 invoke core.clj 6046]
  [clojure.core$load invokeStatic core.clj 6045]
  [clojure.core$load doInvoke core.clj 6029]
  [clojure.lang.RestFn invoke RestFn.java 408]
  [clojure.core$load_one invokeStatic core.clj 5848]
  [clojure.core$load_one invoke core.clj 5843]
  [clojure.core$load_lib$fn__6493 invoke core.clj 5888]
  [clojure.core$load_lib invokeStatic core.clj 5887]
  [clojure.core$load_lib doInvoke core.clj 5868]
  [clojure.lang.RestFn applyTo RestFn.java 142]
  [clojure.core$apply invokeStatic core.clj 659]
  [clojure.core$load_libs invokeStatic core.clj 5925]
  [clojure.core$load_libs doInvoke core.clj 5909]
  [clojure.lang.RestFn applyTo RestFn.java 137]
  [clojure.core$apply invokeStatic core.clj 659]
  [clojure.core$require invokeStatic core.clj 5947]
  [clojure.core$require doInvoke core.clj 5947]
  [clojure.lang.RestFn invoke RestFn.java 512]
  [braid.core.server.seed$eval397$loading__6434__auto____398 invoke seed.clj 1]
  [braid.core.server.seed$eval397 invokeStatic seed.clj 1]
  [braid.core.server.seed$eval397 invoke seed.clj 1]
  [clojure.lang.Compiler eval Compiler.java 7062]
  [clojure.lang.Compiler eval Compiler.java 7051]
  [clojure.lang.Compiler load Compiler.java 7514]
  [clojure.lang.RT loadResourceScript RT.java 379]
  [clojure.lang.RT loadResourceScript RT.java 370]
  [clojure.lang.RT load RT.java 460]
  [clojure.lang.RT load RT.java 426]
  [clojure.core$load$fn__6548 invoke core.clj 6046]
  [clojure.core$load invokeStatic core.clj 6045]
  [clojure.core$load doInvoke core.clj 6029]
  [clojure.lang.RestFn invoke RestFn.java 408]
  [clojure.core$load_one invokeStatic core.clj 5848]
  [clojure.core$load_one invoke core.clj 5843]
  [clojure.core$load_lib$fn__6493 invoke core.clj 5888]
  [clojure.core$load_lib invokeStatic core.clj 5887]
  [clojure.core$load_lib doInvoke core.clj 5868]
  [clojure.lang.RestFn applyTo RestFn.java 142]
  [clojure.core$apply invokeStatic core.clj 659]
  [clojure.core$load_libs invokeStatic core.clj 5925]
  [clojure.core$load_libs doInvoke core.clj 5909]
  [clojure.lang.RestFn applyTo RestFn.java 137]
  [clojure.core$apply invokeStatic core.clj 659]
  [clojure.core$require invokeStatic core.clj 5947]
  [clojure.core$require doInvoke core.clj 5947]
  [clojure.lang.RestFn invoke RestFn.java 482]
  [braid.dev.core$eval162$loading__6434__auto____163 invoke core.clj 1]
  [braid.dev.core$eval162 invokeStatic core.clj 1]
  [braid.dev.core$eval162 invoke core.clj 1]
  [clojure.lang.Compiler eval Compiler.java 7062]
  [clojure.lang.Compiler eval Compiler.java 7051]
  [clojure.lang.Compiler load Compiler.java 7514]
  [clojure.lang.RT loadResourceScript RT.java 379]
  [clojure.lang.RT loadResourceScript RT.java 370]
  [clojure.lang.RT load RT.java 460]
  [clojure.lang.RT load RT.java 426]
  [clojure.core$load$fn__6548 invoke core.clj 6046]
  [clojure.core$load invokeStatic core.clj 6045]
  [clojure.core$load doInvoke core.clj 6029]
  [clojure.lang.RestFn invoke RestFn.java 408]
  [clojure.core$load_one invokeStatic core.clj 5848]
  [clojure.core$load_one invoke core.clj 5843]
  [clojure.core$load_lib$fn__6493 invoke core.clj 5888]
  [clojure.core$load_lib invokeStatic core.clj 5887]
  [clojure.core$load_lib doInvoke core.clj 5868]
  [clojure.lang.RestFn applyTo RestFn.java 142]
  [clojure.core$apply invokeStatic core.clj 659]
  [clojure.core$load_libs invokeStatic core.clj 5925]
  [clojure.core$load_libs doInvoke core.clj 5909]
  [clojure.lang.RestFn applyTo RestFn.java 137]
  [clojure.core$apply invokeStatic core.clj 659]
  [clojure.core$require invokeStatic core.clj 5947]
  [clojure.core$require doInvoke core.clj 5947]
  [clojure.lang.RestFn invoke RestFn.java 408]
  [user$eval17 invokeStatic form-init4237738188781499981.clj 1]
  [user$eval17 invoke form-init4237738188781499981.clj 1]
  [clojure.lang.Compiler eval Compiler.java 7062]
  [clojure.lang.Compiler eval Compiler.java 7051]
  [clojure.lang.Compiler eval Compiler.java 7051]
  [clojure.lang.Compiler load Compiler.java 7514]
  [clojure.lang.Compiler loadFile Compiler.java 7452]
  [clojure.main$load_script invokeStatic main.clj 278]
  [clojure.main$init_opt invokeStatic main.clj 280]
  [clojure.main$init_opt invoke main.clj 280]
  [clojure.main$initialize invokeStatic main.clj 311]
  [clojure.main$null_opt invokeStatic main.clj 345]
  [clojure.main$null_opt invoke main.clj 342]
  [clojure.main$main invokeStatic main.clj 424]
  [clojure.main$main doInvoke main.clj 387]
  [clojure.lang.RestFn applyTo RestFn.java 137]
  [clojure.lang.Var applyTo Var.java 702]
  [clojure.main main main.java 37]]}
nREPL server started on port 33037 on host 127.0.0.1 - nrepl://127.0.0.1:33037
REPL-y 0.3.7, nREPL 0.2.12
Clojure 1.9.0
OpenJDK 64-Bit Server VM 10.0.2+13-Ubuntu-1ubuntu0.18.04.4
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
 Javadoc: (javadoc java-object-or-class-here)
    Exit: Control+D or (exit) or (quit)
 Results: Stored in vars *1, *2, *3, an exception in *e

braid.dev.core=> (start! 5555)

CompilerException java.lang.RuntimeException: Unable to resolve symbol: start! in this context, compiling:(/tmp/form-init4237738188781499981.clj:1:1) 
braid.dev.core=> 

My Java version is :

java -version
openjdk version "10.0.2" 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4, mixed mode)
jamesnvc commented 5 years ago

Ah, thanks for reporting this! I've been using JDK 8 for a while now; I know we need to update our dependencies to work with more modern javas; I'll take a look at this in a few days.

jamesnvc commented 5 years ago

Turned out to be easier than I feared! Closed by b6a40c27; I'm now able to run it on both java 8 and 11

interstar commented 5 years ago

To be honest, I'm still having a problem :

Error occurred during initialization of boot layer
java.lang.module.FindException: Module java.xml.bind not found
Exception in thread "Thread-1" clojure.lang.ExceptionInfo: Subprocess failed {:exit-code 1}
    at clojure.core$ex_info.invokeStatic(core.clj:4617)
    at clojure.core$ex_info.invoke(core.clj:4617)
    at leiningen.core.eval$fn__4134.invokeStatic(eval.clj:264)
    at leiningen.core.eval$fn__4134.invoke(eval.clj:260)
    at clojure.lang.MultiFn.invoke(MultiFn.java:233)
    at leiningen.core.eval$eval_in_project.invokeStatic(eval.clj:366)
    at leiningen.core.eval$eval_in_project.invoke(eval.clj:356)
    at leiningen.repl$server$fn__5864.invoke(repl.clj:244)
    at clojure.lang.AFn.applyToHelper(AFn.java:152)
    at clojure.lang.AFn.applyTo(AFn.java:144)
    at clojure.core$apply.invokeStatic(core.clj:646)
    at clojure.core$with_bindings_STAR_.invokeStatic(core.clj:1881)
    at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1881)
    at clojure.lang.RestFn.invoke(RestFn.java:425)
    at clojure.lang.AFn.applyToHelper(AFn.java:156)
    at clojure.lang.RestFn.applyTo(RestFn.java:132)
    at clojure.core$apply.invokeStatic(core.clj:650)
    at clojure.core$bound_fn_STAR_$fn__4671.doInvoke(core.clj:1911)
    at clojure.lang.RestFn.invoke(RestFn.java:397)
    at clojure.lang.AFn.run(AFn.java:22)
    at java.base/java.lang.Thread.run(Thread.java:834)

That's after checking out the latest version that contains the ["--add-modules" "java.xml.bind"] in project.clj

Maybe related to https://stackoverflow.com/questions/52502189/java-11-package-javax-xml-bind-does-not-exist

interstar commented 5 years ago

Do you have to add the dependency in Maven explicitly in the project.clj file. As I understand javax.xml.bind is now split into several libs.

jamesnvc commented 5 years ago

Ah, I see. Okay, I'll try another fix later today -- I think we can just fully replace the one thing that's using java.xml.bind.

jamesnvc commented 5 years ago

Okay, pushed some changes & things seem to be working now for me under java 11.

interstar commented 5 years ago

Right. Yep, now starts.

Though going to 5555 first, just tells me I should compile the ClojureScript files with figwheel. But this bug seems fixed.

cheers

jamesnvc commented 5 years ago

Though going to 5555 first, just tells me I should compile the ClojureScript files with figwheel. But this bug seems fixed.

Hm, strange; running (start! 5555) should also start figwheel; are there any other error messages?

interstar commented 5 years ago

Actually it seemed to just be taking its time. When I went back to the tab a few minutes later, it was working.

Looks cool! Well done. I'll start looking into the code soon.