Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sbt 0.13.0 JLine incompatibility detected

Tags:

osx-lion

sbt

I have a problem with starting a play 2.2.0 app on my mac with mountain lion and java 7:

[ERROR] Terminal initialization failed; falling back to unsupported
java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected
at jline.TerminalFactory.create(TerminalFactory.java:101)
at jline.TerminalFactory.get(TerminalFactory.java:159)
at sbt.ConsoleLogger$.ansiSupported(ConsoleLogger.scala:85)
at sbt.ConsoleLogger$.<init>(ConsoleLogger.scala:79)
at sbt.ConsoleLogger$.<clinit>(ConsoleLogger.scala)
at sbt.GlobalLogging$.initial(GlobalLogging.scala:40)
at sbt.StandardMain$.initialGlobalLogging(Main.scala:54)
at sbt.StandardMain$.initialState(Main.scala:60)
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)

java.lang.IncompatibleClassChangeError: JLine incompatibility detected.  Check that the sbt launcher is version 0.13.x or later.
at sbt.ConsoleLogger$.ansiSupported(ConsoleLogger.scala:96)
at sbt.ConsoleLogger$.<init>(ConsoleLogger.scala:79)
at sbt.ConsoleLogger$.<clinit>(ConsoleLogger.scala)
at sbt.GlobalLogging$.initial(GlobalLogging.scala:40)
at sbt.StandardMain$.initialGlobalLogging(Main.scala:54)
at sbt.StandardMain$.initialState(Main.scala:60)
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)

Error during sbt execution: java.lang.IncompatibleClassChangeError: JLine incompatibility     detected.  Check that the sbt launcher is version 0.13.x or later.

It's not really linked to play since I got the same error when I start directly sbt in that directory. So I tried a couple of things:

  • removed all sbt related stuff from my home dir and tried to use the sbt script from https://github.com/paulp/sbt-extras/blob/master/sbt -> same problem
  • removed all jars from my ivy repo dir and started again sbt -> same problem
  • downloaded a sbt launcher directly (version 0.13.0) -> same problem
  • tried with java 6 -> same problem
  • tried to debug sbt to figure out what's wrong but all I found out was that jline does not recognize that it should use a UnixTerminal (which I got working by setting systemProperties) but then again -> same error

It's somehow related to some strange linking I think because the class version for the terminal which should be used seems to be old. At least this is what the jvm is complaining about.

I tried it on a virtual box with ubuntu which worked fine so I think my system is a mess or I did something completely wrong.

Someone any ideas?

like image 788
matlockx Avatar asked Oct 19 '13 14:10

matlockx


3 Answers

I had same problem. My project is using SBT 0.13

Turned out I need to upgrade SBT Launcher to 0.13 version as well.

like image 191
expert Avatar answered Nov 09 '22 00:11

expert


If you start the JVM with verbose class loading enabled (-verbose:class), that might help troubleshoot where the offending JLine classes are coming from. Perhaps you have a JLine jar in one of your JVM extension directories, probably ~/Library/Java/Extensions or /System/Library/Java/Extensions.

like image 33
Seth Tisue Avatar answered Nov 09 '22 00:11

Seth Tisue


This error can also happen if you use an SBT launcher from 0.12 in an SBT 0.13 project, as suggested in the error message.

like image 42
fracca Avatar answered Nov 09 '22 00:11

fracca