Skip to content
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

IRB doesn't start on jRuby 9.1.16.0 #5104

Closed
raelik opened this Issue Mar 22, 2018 · 8 comments

Comments

Projects
None yet
3 participants
@raelik
Copy link

commented Mar 22, 2018

Environment

Behavior

Trying to run irb raises an exception: java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected, full stack trace is here: https://gist.github.com/raelik/f8e73b2ab46b46b3fcde231d4fc0cbdb

This error doesn't occur on 9.1.15.0 and prior.

@headius

This comment has been minimized.

Copy link
Member

commented Mar 22, 2018

Are you certain you're not mixing environments? We addressed this issue during 9.1.16.0 cycle, but if you have 9.1.16.0 for whatever reason picking up 9.1.15.0's gems it might still happen.

@raelik

This comment has been minimized.

Copy link
Author

commented Mar 22, 2018

I'm using the jruby-gradle-plugin to build an artifact jar containing jruby and all of my gems, and I blow it away and rebuild it from scratch.

@headius

This comment has been minimized.

Copy link
Member

commented Mar 22, 2018

@mkristian Any idea why this would still be happening?

@headius headius added this to the JRuby 9.1.17.0 milestone Mar 22, 2018

@raelik

This comment has been minimized.

Copy link
Author

commented Mar 22, 2018

Just looking at the stack trace, the only way I can see this happening if somehow jline 2.x was somehow being loaded. That's when jline.Terminal was implemented as an interface.

@raelik

This comment has been minimized.

Copy link
Author

commented Mar 22, 2018

@headius That's exactly what's happening. Here's a the result of running jar -tvf | grep jline on my jar built for 9.1.16.0:

     0 Wed Feb 21 10:21:44 CST 2018 META-INF/jruby.home/lib/ruby/stdlib/jline/
    11 Wed Feb 21 10:20:46 CST 2018 META-INF/jruby.home/lib/ruby/stdlib/jline/.jrubydir
     0 Wed Feb 21 10:21:44 CST 2018 META-INF/jruby.home/lib/ruby/stdlib/jline/jline/
    35 Wed Feb 21 10:20:46 CST 2018 META-INF/jruby.home/lib/ruby/stdlib/jline/jline/.jrubydir
     0 Wed Feb 21 10:21:44 CST 2018 META-INF/jruby.home/lib/ruby/stdlib/jline/jline/2.11/
    20 Wed Feb 21 10:20:46 CST 2018 META-INF/jruby.home/lib/ruby/stdlib/jline/jline/2.11/.jrubydir
208781 Wed Feb 21 10:20:46 CST 2018 META-INF/jruby.home/lib/ruby/stdlib/jline/jline/2.11/jline-2.11.jar
   288 Wed Feb 21 10:20:46 CST 2018 META-INF/jruby.home/lib/ruby/stdlib/jline/jline/maven-metadata-local.xml
     0 Thu Mar 22 14:09:52 CDT 2018 jars/jline/
     0 Thu Mar 22 14:09:52 CDT 2018 jars/jline/jline/
     0 Thu Mar 22 14:09:52 CDT 2018 jars/jline/jline/0.9.94/
 87325 Thu Mar 22 14:09:52 CDT 2018 jars/jline/jline/0.9.94/jline-0.9.94.jar

Here it is for 9.1.15.0:

     0 Thu Mar 22 14:32:42 CDT 2018 jars/jline/
     0 Thu Mar 22 14:32:42 CDT 2018 jars/jline/jline/
     0 Thu Mar 22 14:32:42 CDT 2018 jars/jline/jline/0.9.94/
 87325 Thu Mar 22 14:32:42 CDT 2018 jars/jline/jline/0.9.94/jline-0.9.94.jar
@raelik

This comment has been minimized.

Copy link
Author

commented Mar 22, 2018

I tracked down the problem, not sure how to resolve it. My project uses Apache Curator 2.x, which depends on ZooKeeper 3.4.8... which depends on jline 0.9.94. Luckily, none of my code touches any parts of ZK that depend on jline (most likely command-line utilities).

@raelik

This comment has been minimized.

Copy link
Author

commented Mar 22, 2018

Ok, I was able to fix this by excluding jline from my runtime configuration in my build.gradle. Nothing to see here, move along!

@raelik raelik closed this Mar 22, 2018

@mkristian

This comment has been minimized.

Copy link
Member

commented Mar 22, 2018

great this got resolved. this exactly the reason we try to get rid of jline altogether in jruby.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.