-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Difficulty installing reach through sbt #758
Comments
Same problem even after I install openjdk 11 through homebrew: $ brew install openjdk@11
$ sbt still results in:
|
Hi. Thanks for the detective work. I don't think that sbt understands --version, but it is supposed to understand about and sbtVersion. Do those give errors?
I was thinking that the Java version might be the culprit. We usually work with 8 for Scala programs. |
To downgrade to Java 8, I did this: $ brew install openjdk@8 Still get the same error: $ sbt about
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
java.lang.NoClassDefFoundError: scala/Serializable
at sbt.internal.ClassLoaderWarmup$.warmup(XMainConfiguration.scala:31)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at sbt.internal.XMainConfiguration.run(XMainConfiguration.scala:82)
at sbt.xMain.run(Main.scala:46)
at xsbt.boot.Launch$.$anonfun$run$1(Launch.scala:149)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:176)
at xsbt.boot.Launch$.run(Launch.scala:149)
at xsbt.boot.Launch$.$anonfun$apply$1(Launch.scala:44)
at xsbt.boot.Launch$.launch(Launch.scala:159)
at xsbt.boot.Launch$.apply(Launch.scala:44)
at xsbt.boot.Launch$.apply(Launch.scala:21)
at xsbt.boot.Boot$.runImpl(Boot.scala:78)
at xsbt.boot.Boot$.run(Boot.scala:73)
at xsbt.boot.Boot$.main(Boot.scala:21)
at xsbt.boot.Boot.main(Boot.scala)
Caused by: java.lang.ClassNotFoundException: scala.Serializable
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:436)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 18 more
[error] [launcher] error during sbt launcher: java.lang.NoClassDefFoundError: scala/Serializable |
I'm suspect I am falling prey to some newbie Java trap. Maybe a |
Does |
Apparently (part of) the problem was using
I downloaded the $ which sbt
/usr/local/share/sbt/bin/sbt
$ jenv version
1.8 (set by JENV_VERSION environment variable)
$ sbt sbtVersion
[info] welcome to sbt 1.5.4 (Oracle Corporation Java 1.8.0_282)
[info] loading project definition from /Users/zuck016/Projects/CausalInference/MAA/project
[info] set current project to maa (in build file:/Users/zuck016/Projects/CausalInference/MAA/)
[info] 1.5.4 But as soon as I enter the $ git clone https://github.com/clulab/reach.git
$ cd reach
$ which sbt
/usr/local/share/sbt/bin/sbt
$ jenv version
1.8 (set by JENV_VERSION environment variable)
$ sbt sbtVersion
java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError: scala/Serializable
at sbt.internal.ClassLoaderWarmup$.warmup(XMainConfiguration.scala:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sbt.internal.XMainConfiguration.run(XMainConfiguration.scala:82)
at sbt.xMain.run(Main.scala:46)
at xsbt.boot.Launch$.$anonfun$run$1(Launch.scala:149)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:176)
at xsbt.boot.Launch$.run(Launch.scala:149)
at xsbt.boot.Launch$.$anonfun$apply$1(Launch.scala:44)
at xsbt.boot.Launch$.launch(Launch.scala:159)
at xsbt.boot.Launch$.apply(Launch.scala:44)
at xsbt.boot.Launch$.apply(Launch.scala:21)
at xsbt.boot.Boot$.runImpl(Boot.scala:78)
at xsbt.boot.Boot$.run(Boot.scala:73)
at xsbt.boot.Boot$.main(Boot.scala:21)
at xsbt.boot.Boot.main(Boot.scala)
Caused by: java.lang.NoClassDefFoundError: scala/Serializable
... 18 more
Caused by: java.lang.ClassNotFoundException: scala.Serializable
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 18 more
[error] [launcher] error during sbt launcher: java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError: scala/Serializable Any clue what could be going on? |
It seems close. I wonder if sbt has cached some things that it now has trouble reading because in that directory there is a real project. |
OK, check this out: $ cd /usr/local/share
$ rm -rf sbt
$ wget -c https://github.com/sbt/sbt/releases/download/v1.4.0/sbt-1.4.0.tgz
$ tar xzvf sbt-1.4.0.tgz
$ /usr/local/share/sbt/bin/sbt sbtVersion
[info] welcome to sbt 1.5.4 (Oracle Corporation Java 1.8.0_282)
[info] loading project definition from /usr/local/share/project
[info] set current project to share (in build file:/usr/local/share/)
[info] 1.5.4 Why does it think that version 1.4.0 is actually 1.5.4? And it still fails in the reach directory even when I perform a clean clone: $ rm -rf reach
$ git clone https://github.com/clulab/reach.git
$ cd reach
$ /usr/local/share/sbt/bin/sbt sbtVersion
java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError: scala/Serializable
at sbt.internal.ClassLoaderWarmup$.warmup(XMainConfiguration.scala:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sbt.internal.XMainConfiguration.run(XMainConfiguration.scala:82)
at sbt.xMain.run(Main.scala:46)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:111)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:131)
at xsbt.boot.Launch$.run(Launch.scala:111)
at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:37)
at xsbt.boot.Launch$.launch(Launch.scala:120)
at xsbt.boot.Launch$.apply(Launch.scala:20)
at xsbt.boot.Boot$.runImpl(Boot.scala:56)
at xsbt.boot.Boot$.main(Boot.scala:18)
at xsbt.boot.Boot.main(Boot.scala)
Caused by: java.lang.NoClassDefFoundError: scala/Serializable
... 16 more
Caused by: java.lang.ClassNotFoundException: scala.Serializable
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 16 more
[error] [launcher] error during sbt launcher: java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError: scala/Serializable Interestingly, the same phenotype occurs when I run sbt in the $ cd /usr/local/share
$ /usr/local/share/sbt/bin/sbt sbtVersion
sbt/bin/sbt sbtVersion
[info] welcome to sbt 1.5.4 (Oracle Corporation Java 1.8.0_282)
[info] loading project definition from /usr/local/share/project
[info] set current project to share (in build file:/usr/local/share/)
[info] 1.5.4
$ cd /usr/local/share/sbt
$ /usr/local/share/sbt/bin/sbt sbtVersion
java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError: scala/Serializable
at sbt.internal.ClassLoaderWarmup$.warmup(XMainConfiguration.scala:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sbt.internal.XMainConfiguration.run(XMainConfiguration.scala:82)
at sbt.xMain.run(Main.scala:46)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:111)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:131)
at xsbt.boot.Launch$.run(Launch.scala:111)
at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:37)
at xsbt.boot.Launch$.launch(Launch.scala:120)
at xsbt.boot.Launch$.apply(Launch.scala:20)
at xsbt.boot.Boot$.runImpl(Boot.scala:56)
at xsbt.boot.Boot$.main(Boot.scala:18)
at xsbt.boot.Boot.main(Boot.scala)
Caused by: java.lang.NoClassDefFoundError: scala/Serializable
... 16 more
Caused by: java.lang.ClassNotFoundException: scala.Serializable
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 16 more
[error] [launcher] error during sbt launcher: java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError: scala/Serializable |
Hi @djinnome, a while ago I added a Dockerfile for Reach that might be easier to get working: if you have the reach repo cloned, you can build it as
and then run it as
You can then interact with it the same way as a natively running local Reach web service. Does that work for you? |
Thanks, Ben! djinnome, the only explanation I can think of is that either the path or some brew thing is interfering. My impression is that sbt is only a shell program that calls up the real sbt (i.e., runs java on some jar file) and it may be be getting the wrong version number and compatibility issues from the wrong jar file or wrong java. |
Hi @kwalcock I think sbt 1.4.0 is the issue here, according to sbt/sbt#6587 (comment) |
Hi @bgyori I tried the instructions you provided, but I got some kind of authentication error. $ cd docker
docker build --tag reach:latest .
<snip>
------
executor failed running [/bin/sh -c add-apt-repository -y ppa:openjdk-r/ppa && echo "deb https://dl.bintray.com/sbt/debian /" | tee -a /etc/apt/sources.list.d/sbt.list && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823 && apt-get update]: exit code: 100
(anaconda3-2020.11) bash-3.2$ docker run -d -it -p 8080:8080 reach:latest
Unable to find image 'reach:latest' locally
docker: Error response from daemon: pull access denied for reach, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'. Full logfile attached: docker.log |
Good news! I changed Thanks everyone for the helpful hints! |
Congratulations! Thanks or sticking it out. We'll see what it takes to update everyone to that version. |
Everyone else may not need to upgrade all the way to |
Thanks for the tip. |
Hi folks,
Apologies for the newbie questions.
I followed these directions for installing a local version of reach here:
But I got this error message:
I noticed that
sbt
downloadedScala 2.13.3
instead ofScala 2.12.8
as specified inreach/build.sbt
, but I think the problem is even more basic, because I get the same error even if I check the version of sbt:results in:
The text was updated successfully, but these errors were encountered: