After using sbt for some time, something failed and I can't run sbt on my Ubuntu machine. I get this exception no matter what I do. Even running sbt help
causes the following error:
java.lang.NoClassDefFoundError: sbt/ConsoleOut$
at sbt.StandardMain$.<init>(Main.scala:52)
at sbt.StandardMain$.<clinit>(Main.scala)
at sbt.xMain.run(Main.scala:26)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:57)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:77)
at xsbt.boot.Launch$.run(Launch.scala:57)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:45)
at xsbt.boot.Launch$.launch(Launch.scala:65)
at xsbt.boot.Launch$.apply(Launch.scala:16)
at xsbt.boot.Boot$.runImpl(Boot.scala:32)
at xsbt.boot.Boot$.main(Boot.scala:21)
at xsbt.boot.Boot.main(Boot.scala)
Caused by: java.lang.ClassNotFoundException: sbt.ConsoleOut$
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 12 more
Error during sbt execution: java.lang.NoClassDefFoundError: sbt/ConsoleOut$
I reinstalled the JDK and of course sbt, but it didn't help. The only thing I remember doing was installing the new IntelliJ IDEA 13. Could this be related?
the only thing I remember doing was installing the new intellij (v13). Is this related?
It could be related.
Try:
rm -rf ~/.ivy/cache
mv ~/.sbt ~/.sbt.old
Most probably this issue comes from the IntelliJ IDE, Close all the running processes of the IDE and start it again.
In sbt:
clean
Results in re-resolution of ivy artifacts on next compile, without having to clear the ivy cache.
If the ivy itself is the problem then above solution is a good fallback.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With