Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: JRuby 1.7.0.pre1
    • Fix Version/s: None
    • Component/s: Windows
    • Labels:
      None
    • Environment:
      Windows 7
    • Number of attachments :
      0

      Description

      $ ./bin/jruby -S irb
      [ERROR] Terminal initialization failed; falling back to unsupportedjava.lang.NoClassDefFoundError: Could not initialize class org.fu
      sesource.jansi.internal.Kernel32
              at org.fusesource.jansi.internal.WindowsSupport.getConsoleMode(WindowsSupport.java:50)
              at jline.WindowsTerminal.getConsoleMode(WindowsTerminal.java:176)
              at jline.WindowsTerminal.init(WindowsTerminal.java:80)
              at jline.TerminalFactory.create(TerminalFactory.java:93)
              at jline.TerminalFactory.get(TerminalFactory.java:151)
              at jline.console.ConsoleReader.<init>(ConsoleReader.java:197)
              at jline.console.ConsoleReader.<init>(ConsoleReader.java:177)
              at org.jruby.ext.Readline.initReadline(Readline.java:104)
              at org.jruby.ext.Readline.s_readline(Readline.java:162)
              at org.jruby.ext.Readline$INVOKER$s$s_readline.call(Readline$INVOKER$s$s_readline.gen)
              at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:332)
              at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:203)
              at org.jruby.ast.FCallTwoArgNode.interpret(FCallTwoArgNode.java:38)
              at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
              at org.jruby.ast.IfNode.interpret(IfNode.java:110)
              at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
              at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
              at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
              at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:147)
              at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:183)
              at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:292)
              at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:135)
              at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:63)
              at org.jruby.ast.DAsgnNode.interpret(DAsgnNode.java:110)
              at org.jruby.ast.IfNode.interpret(IfNode.java:110)
              at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
              at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
              at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
              at org.jruby.runtime.Interpreted19Block.evalBlockBody(Interpreted19Block.java:209)
              at org.jruby.runtime.Interpreted19Block.yield(Interpreted19Block.java:160)
              at org.jruby.runtime.Interpreted19Block.yieldSpecific(Interpreted19Block.java:133)
              at org.jruby.runtime.Block.yieldSpecific(Block.java:99)
              at org.jruby.ast.ZYieldNode.interpret(ZYieldNode.java:25)
              at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
              at org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)
              at org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
              at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
              at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
              at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
              at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:212)
              at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:207)
              at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:322)
              at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:178)
              at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:187)
              at org.jruby.ast.FCallOneArgBlockNode.interpret(FCallOneArgBlockNode.java:34)
              at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
              at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
              at org.jruby.runtime.Interpreted19Block.evalBlockBody(Interpreted19Block.java:209)
              at org.jruby.runtime.Interpreted19Block.yield(Interpreted19Block.java:197)
              at org.jruby.runtime.Interpreted19Block.call(Interpreted19Block.java:128)
              at org.jruby.runtime.Block.call(Block.java:89)
              at org.jruby.RubyProc.call(RubyProc.java:269)
              at org.jruby.RubyProc.call19(RubyProc.java:257)
              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:208)
              at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:204)
              at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:292)
              at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:135)
              at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:63)
              at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
              at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
              at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
              at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
              at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:147)
              at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:183)
              at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:292)
              at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:135)
              at org.jruby.ast.VCallNode.interpret(VCallNode.java:86)
              at org.jruby.ast.IfNode.interpret(IfNode.java:110)
              at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
              at org.jruby.ast.WhileNode.interpret(WhileNode.java:131)
              at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
              at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
              at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
              at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:147)
              at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:183)
              at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:292)
              at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:135)
              at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:63)
              at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
              at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
              at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
              at org.jruby.ast.IfNode.interpret(IfNode.java:116)
              at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
              at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
              at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
              at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:190)
              at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:199)
              at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:312)
              at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:169)
              at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
              at org.jruby.ast.ReturnNode.interpret(ReturnNode.java:92)
              at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
              at org.jruby.ast.CaseNode.interpret(CaseNode.java:137)
              at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
              at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
              at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
              at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:190)
              at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:199)
              at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:312)
              at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:169)
              at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
              at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
              at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
              at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
              at org.jruby.ast.RescueNode.executeBody(RescueNode.java:231)
              at org.jruby.ast.RescueNode.interpretWithJavaExceptions(RescueNode.java:123)
              at org.jruby.ast.RescueNode.interpret(RescueNode.java:113)
              at org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
              at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
              at org.jruby.ast.WhileNode.interpret(WhileNode.java:131)
              at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
              at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
              at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
              at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:147)
              at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:183)
              at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:292)
              at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:135)
              at org.jruby.ast.VCallNode.interpret(VCallNode.java:86)
              at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
              at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
              at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
              at org.jruby.ast.OrNode.interpret(OrNode.java:95)
              at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
              at org.jruby.ast.AndNode.interpret(AndNode.java:91)
              at org.jruby.ast.OrNode.interpret(OrNode.java:95)
              at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
              at org.jruby.ast.UntilNode.interpret(UntilNode.java:116)
              at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
              at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
              at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
              at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:147)
              at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:183)
              at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:292)
              at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:135)
              at org.jruby.ast.VCallNode.interpret(VCallNode.java:86)
              at org.jruby.ast.DAsgnNode.interpret(DAsgnNode.java:110)
              at org.jruby.ast.IfNode.interpret(IfNode.java:110)
              at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
              at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
              at org.jruby.ast.RescueNode.executeBody(RescueNode.java:231)
              at org.jruby.ast.RescueNode.interpretWithJavaExceptions(RescueNode.java:123)
              at org.jruby.ast.RescueNode.interpret(RescueNode.java:113)
              at org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
              at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
              at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
              at org.jruby.runtime.Interpreted19Block.evalBlockBody(Interpreted19Block.java:209)
              at org.jruby.runtime.Interpreted19Block.yield(Interpreted19Block.java:160)
              at org.jruby.runtime.Interpreted19Block.yieldSpecific(Interpreted19Block.java:133)
              at org.jruby.runtime.Block.yieldSpecific(Block.java:99)
              at org.jruby.RubyKernel.loop(RubyKernel.java:1353)
              at org.jruby.RubyKernel$INVOKER$s$0$0$loop.call(RubyKernel$INVOKER$s$0$0$loop.gen)
              at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:302)
              at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:144)
              at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:153)
              at org.jruby.ast.FCallNoArgBlockNode.interpret(FCallNoArgBlockNode.java:32)
              at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
              at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
              at org.jruby.runtime.Interpreted19Block.evalBlockBody(Interpreted19Block.java:209)
              at org.jruby.runtime.Interpreted19Block.yield(Interpreted19Block.java:160)
              at org.jruby.runtime.Block.yield(Block.java:130)
              at org.jruby.RubyContinuation.enter(RubyContinuation.java:107)
              at org.jruby.RubyKernel.rbCatch19Common(RubyKernel.java:1153)
              at org.jruby.RubyKernel.rbCatch19(RubyKernel.java:1146)
              at org.jruby.RubyKernel$INVOKER$s$rbCatch19.call(RubyKernel$INVOKER$s$rbCatch19.gen)
              at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:322)
              at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:178)
              at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:187)
              at org.jruby.ast.FCallOneArgBlockNode.interpret(FCallOneArgBlockNode.java:34)
              at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
              at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
              at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
              at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:169)
              at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:191)
              at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:302)
              at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:144)
              at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:153)
              at org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64)
              at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
              at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
              at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
              at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:147)
              at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:183)
              at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:292)
              at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:135)
              at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:63)
              at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
              at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
              at org.jruby.runtime.Interpreted19Block.evalBlockBody(Interpreted19Block.java:209)
              at org.jruby.runtime.Interpreted19Block.yield(Interpreted19Block.java:160)
              at org.jruby.runtime.Block.yield(Block.java:130)
              at org.jruby.RubyContinuation.enter(RubyContinuation.java:107)
              at org.jruby.RubyKernel.rbCatch19Common(RubyKernel.java:1153)
              at org.jruby.RubyKernel.rbCatch19(RubyKernel.java:1146)
              at org.jruby.RubyKernel$INVOKER$s$rbCatch19.call(RubyKernel$INVOKER$s$rbCatch19.gen)
              at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:322)
              at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:178)
              at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:187)
              at org.jruby.ast.FCallOneArgBlockNode.interpret(FCallOneArgBlockNode.java:34)
              at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
              at org.jruby.ast.EnsureNode.interpret(EnsureNode.java:96)
              at org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
              at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
              at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
              at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
              at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:190)
              at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:199)
              at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:312)
              at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:169)
              at c_3a_.Users.asari.Development.src.jruby.bin.jirb.__file__(c:/Users/asari/Development/src/jruby/bin/jirb:13)
              at c_3a_.Users.asari.Development.src.jruby.bin.jirb.load(c:/Users/asari/Development/src/jruby/bin/jirb)
              at org.jruby.Ruby.runScript(Ruby.java:778)
              at org.jruby.Ruby.runScript(Ruby.java:771)
              at org.jruby.Ruby.runNormally(Ruby.java:648)
              at org.jruby.Ruby.runFromMain(Ruby.java:497)
              at org.jruby.Main.doRunFromMain(Main.java:375)
              at org.jruby.Main.internalRun(Main.java:264)
              at org.jruby.Main.run(Main.java:230)
              at org.jruby.Main.run(Main.java:214)
              at org.jruby.Main.main(Main.java:194)
      
      irb(main):001:0>
      

        Issue Links

          Activity

          Hide
          Hiro Asari added a comment -

          We should just catch the exception and swallow it.

          Show
          Hiro Asari added a comment - We should just catch the exception and swallow it.
          Hide
          Hiro Asari added a comment -

          Actually, jline2 itself is swallowing the exception (and returning an UnsupportedTerminal), so we can't really suppress the stack trace, unless you redirect all of STDERR (i.e., jruby -S irb 2>/dev/null or jruby -S irb 2>NULL).

          https://github.com/jline/jline2/blob/cf01e98ba4b3c65369e3eb4f8455fa5c83715d0e/src/main/java/jline/TerminalFactory.java#L98-101

          For now, this is a WONTFIX. Perhaps you can open an issue with jline2: https://github.com/jline/jline2/issues (to provide a quieter API for Windows).

          Show
          Hiro Asari added a comment - Actually, jline2 itself is swallowing the exception (and returning an UnsupportedTerminal ), so we can't really suppress the stack trace, unless you redirect all of STDERR (i.e., jruby -S irb 2>/dev/null or jruby -S irb 2>NULL ). https://github.com/jline/jline2/blob/cf01e98ba4b3c65369e3eb4f8455fa5c83715d0e/src/main/java/jline/TerminalFactory.java#L98-101 For now, this is a WONTFIX. Perhaps you can open an issue with jline2: https://github.com/jline/jline2/issues (to provide a quieter API for Windows).
          Hide
          Charles Oliver Nutter added a comment -

          We did include a hack for this for JRuby 1.7 preview 1 that turns off the "rich" terminal for Windows.

          The bug is actually in jansi...it doesn't load properly from bootclasspath, and it logs these errors unconditionally.

          Show
          Charles Oliver Nutter added a comment - We did include a hack for this for JRuby 1.7 preview 1 that turns off the "rich" terminal for Windows. The bug is actually in jansi...it doesn't load properly from bootclasspath, and it logs these errors unconditionally.

            People

            • Assignee:
              Hiro Asari
              Reporter:
              Raphael Gillett
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: