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

jruby-jars 9.1.15.0 cannot start jirb on win7/jdk8_60 [java.lang.NoClassDefFoundError] #4888

Closed
cmichon opened this issue Dec 8, 2017 · 6 comments

Comments

@cmichon
Copy link

cmichon commented Dec 8, 2017

OS: win 7 enterprise
java version: 8.60
jruby version:
jruby 9.1.15.0 (2.3.3) 2017-12-07 929fde8 Java HotSpot(TM) 64-Bit Server VM 25.60-b23 on 1.8.0_60-b27 +jit [mswin32-x86_64]

Inside a folder containing jruby-core-9.1.15.0-complete.jar + jruby-stdlib-9.1.15.0.jar, I get java.lang.NoClassDefFoundError when trying to start jirb from the command line.

$ java -cp "*" org.jruby.Main -S jirb

[ERROR] Terminal initialization failed; falling back to unsupported
java.lang.NoClassDefFoundError: Could not initialize class org.jruby.readline.org.fusesource.jansi.internal.Kernel32
        at org.jruby.readline.org.fusesource.jansi.internal.WindowsSupport.getConsoleMode(WindowsSupport.java:50)
        at org.jruby.readline.jline.WindowsTerminal.getConsoleMode(WindowsTerminal.java:177)
        at org.jruby.readline.jline.WindowsTerminal.init(WindowsTerminal.java:80)
        at org.jruby.readline.jline.TerminalFactory.create(TerminalFactory.java:101)
        at org.jruby.readline.jline.TerminalFactory.get(TerminalFactory.java:159)
        at org.jruby.readline.jline.console.ConsoleReader.<init>(ConsoleReader.java:227)
        at org.jruby.readline.jline.console.ConsoleReader.<init>(ConsoleReader.java:219)
        at org.jruby.readline.jline.console.ConsoleReader.<init>(ConsoleReader.java:211)
        at org.jruby.ext.readline.Readline.initReadline(Readline.java:105)
        at org.jruby.ext.readline.Readline.getHolderWithReadline(Readline.java:143)
        at org.jruby.ext.readline.Readline.s_readline(Readline.java:169)
        at org.jruby.ext.readline.Readline$INVOKER$s$s_readline.call(Readline$INVOKER$s$s_readline.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:338)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:183)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:324)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:74)
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:78)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:144)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:130)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:192)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:298)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:127)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:344)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:74)
        at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:132)
        at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:148)
        at org.jruby.runtime.IRBlockBody.yieldSpecific(IRBlockBody.java:84)
        at org.jruby.runtime.Block.yieldSpecific(Block.java:134)
        at org.jruby.ir.runtime.IRRuntimeHelpers.yieldSpecific(IRRuntimeHelpers.java:420)
        at org.jruby.ir.instructions.YieldInstr.interpret(YieldInstr.java:74)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.processOtherOp(StartupInterpreterEngine.java:213)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:123)
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:84)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:179)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:165)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:328)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:165)
        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:170)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:336)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:74)
        at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:132)
        at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:148)
        at org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:73)
        at org.jruby.runtime.Block.call(Block.java:124)
        at org.jruby.RubyProc.call(RubyProc.java:289)
        at org.jruby.RubyProc.call19(RubyProc.java:273)
        at org.jruby.RubyProc$INVOKER$i$0$0$call19.call(RubyProc$INVOKER$i$0$0$call19.gen)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:196)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:192)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:298)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:127)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:344)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:74)
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:78)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:144)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:130)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:192)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:298)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:127)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:344)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:74)
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:78)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:144)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:130)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:192)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:298)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:127)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:344)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:74)
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:84)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:179)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:165)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:200)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:155)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:315)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:74)
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:84)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:179)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:165)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:200)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:155)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:315)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:74)
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:78)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:144)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:130)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:192)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:298)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:127)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:344)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:74)
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:78)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:144)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:130)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:192)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:298)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:127)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:344)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:74)
        at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:132)
        at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:148)
        at org.jruby.runtime.IRBlockBody.yieldSpecific(IRBlockBody.java:84)
        at org.jruby.runtime.Block.yieldSpecific(Block.java:134)
        at org.jruby.RubyKernel.loop(RubyKernel.java:1292)
        at org.jruby.RubyKernel$INVOKER$s$0$0$loop.call(RubyKernel$INVOKER$s$0$0$loop.gen)
        at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroBlock.call(JavaMethod.java:498)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:278)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:79)
        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:84)
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:429)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:360)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:74)
        at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:132)
        at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:148)
        at org.jruby.runtime.IRBlockBody.doYield(IRBlockBody.java:186)
        at org.jruby.runtime.BlockBody.yield(BlockBody.java:116)
        at org.jruby.runtime.Block.yield(Block.java:165)
        at org.jruby.RubyContinuation.enter(RubyContinuation.java:107)
        at org.jruby.RubyKernel.rbCatch19Common(RubyKernel.java:1121)
        at org.jruby.RubyKernel.rbCatch19(RubyKernel.java:1114)
        at org.jruby.RubyKernel$INVOKER$s$rbCatch19.call(RubyKernel$INVOKER$s$rbCatch19.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:328)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:165)
        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:170)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:336)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:74)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:109)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:95)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:278)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:79)
        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:84)
        at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:429)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:360)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:74)
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:78)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:144)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:130)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:192)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:298)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:127)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:344)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:74)
        at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:132)
        at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:148)
        at org.jruby.runtime.IRBlockBody.doYield(IRBlockBody.java:186)
        at org.jruby.runtime.BlockBody.yield(BlockBody.java:116)
        at org.jruby.runtime.Block.yield(Block.java:165)
        at org.jruby.RubyContinuation.enter(RubyContinuation.java:107)
        at org.jruby.RubyKernel.rbCatch19Common(RubyKernel.java:1121)
        at org.jruby.RubyKernel.rbCatch19(RubyKernel.java:1114)
        at org.jruby.RubyKernel$INVOKER$s$rbCatch19.call(RubyKernel$INVOKER$s$rbCatch19.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:328)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:165)
        at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:170)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:336)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:74)
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:84)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:179)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:165)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:200)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:155)
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.bin.jirb.invokeOther13:start(uri:classloader:/META-INF/jruby.home/bin/jirb:13)
        at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.bin.jirb.RUBY$script(uri:classloader:/META-INF/jruby.home/bin/jirb:13)
        at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
        at org.jruby.ir.Compiler$1.load(Compiler.java:95)
        at org.jruby.Ruby.runScript(Ruby.java:831)
        at org.jruby.Ruby.runNormally(Ruby.java:750)
        at org.jruby.Ruby.runNormally(Ruby.java:768)
        at org.jruby.Ruby.runFromMain(Ruby.java:581)
        at org.jruby.Main.doRunFromMain(Main.java:417)
        at org.jruby.Main.internalRun(Main.java:305)
        at org.jruby.Main.run(Main.java:232)
        at org.jruby.Main.main(Main.java:204)

>>
@mkristian
Copy link
Member

Grr - seems to be a windows only problem :(

@enebo
Copy link
Member

enebo commented Dec 8, 2017

Confirmed. When I tested this release I did not try this from the command-line. For a workaround if you use the windows installer you can use our program group irb from the start menu. It works fine but it does not use readline directly :|

@headius
Copy link
Member

headius commented Dec 8, 2017

I suspect this is reflectively-loaded Windows logic in jline that's not picking up the relocated package.

@headius headius added this to the JRuby 9.1.16.0 milestone Dec 8, 2017
@cshupp1
Copy link

cshupp1 commented Jan 9, 2018

I can confirm that this happens to me as well in irb and in a rails console.

@headius
Copy link
Member

headius commented Jan 24, 2018

I believe this is the same issue as #4889. @mkristian

@mkristian
Copy link
Member

@headius no idea why this fails on windows. but when we rollback the readline gem version then this is also fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants