org.jruby.exceptions.RaiseException: (TypeError) cannot convert instance of class org.jruby.RubyString to class java.lang.Long at java.lang.Thread.getStackTrace(java/lang/Thread.java:1552) at org.jruby.runtime.backtrace.TraceType$Gather.getBacktraceData(org/jruby/runtime/backtrace/TraceType.java:246) at org.jruby.runtime.backtrace.TraceType.getBacktrace(org/jruby/runtime/backtrace/TraceType.java:47) at org.jruby.RubyException.prepareBacktrace(org/jruby/RubyException.java:235) at org.jruby.exceptions.RaiseException.preRaise(org/jruby/exceptions/RaiseException.java:214) at org.jruby.exceptions.RaiseException.preRaise(org/jruby/exceptions/RaiseException.java:181) at org.jruby.exceptions.RaiseException.<init>(org/jruby/exceptions/RaiseException.java:111) at org.jruby.Ruby.newRaiseException(org/jruby/Ruby.java:4192) at org.jruby.Ruby.newTypeError(org/jruby/Ruby.java:3865) at org.jruby.RubyBasicObject.defaultToJava(org/jruby/RubyBasicObject.java:872) at org.jruby.RubyBasicObject.toJava(org/jruby/RubyBasicObject.java:843) at org.jruby.RubyString.toJava(org/jruby/RubyString.java:5541) at org.jruby.embed.variable.AbstractVariable.getJavaObject(org/jruby/embed/variable/AbstractVariable.java:140) at org.jruby.embed.variable.GlobalVariable.getJavaObject(org/jruby/embed/variable/GlobalVariable.java:46) at org.jruby.embed.internal.BiVariableMap.get(org/jruby/embed/internal/BiVariableMap.java:229) at org.jruby.embed.internal.BiVariableMap.get(org/jruby/embed/internal/BiVariableMap.java:208) at org.jruby.embed.jsr223.Utils.postEval(org/jruby/embed/jsr223/Utils.java:207) at org.jruby.embed.jsr223.JRubyEngine.eval(org/jruby/embed/jsr223/JRubyEngine.java:95) at org.jruby.embed.jsr223.JRubyEngine.eval(org/jruby/embed/jsr223/JRubyEngine.java:142)

GitHub | dmac100 | 5 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Changing type of global variables gives TypeError

    GitHub | 5 months ago | dmac100
    org.jruby.exceptions.RaiseException: (TypeError) cannot convert instance of class org.jruby.RubyString to class java.lang.Long at java.lang.Thread.getStackTrace(java/lang/Thread.java:1552) at org.jruby.runtime.backtrace.TraceType$Gather.getBacktraceData(org/jruby/runtime/backtrace/TraceType.java:246) at org.jruby.runtime.backtrace.TraceType.getBacktrace(org/jruby/runtime/backtrace/TraceType.java:47) at org.jruby.RubyException.prepareBacktrace(org/jruby/RubyException.java:235) at org.jruby.exceptions.RaiseException.preRaise(org/jruby/exceptions/RaiseException.java:214) at org.jruby.exceptions.RaiseException.preRaise(org/jruby/exceptions/RaiseException.java:181) at org.jruby.exceptions.RaiseException.<init>(org/jruby/exceptions/RaiseException.java:111) at org.jruby.Ruby.newRaiseException(org/jruby/Ruby.java:4192) at org.jruby.Ruby.newTypeError(org/jruby/Ruby.java:3865) at org.jruby.RubyBasicObject.defaultToJava(org/jruby/RubyBasicObject.java:872) at org.jruby.RubyBasicObject.toJava(org/jruby/RubyBasicObject.java:843) at org.jruby.RubyString.toJava(org/jruby/RubyString.java:5541) at org.jruby.embed.variable.AbstractVariable.getJavaObject(org/jruby/embed/variable/AbstractVariable.java:140) at org.jruby.embed.variable.GlobalVariable.getJavaObject(org/jruby/embed/variable/GlobalVariable.java:46) at org.jruby.embed.internal.BiVariableMap.get(org/jruby/embed/internal/BiVariableMap.java:229) at org.jruby.embed.internal.BiVariableMap.get(org/jruby/embed/internal/BiVariableMap.java:208) at org.jruby.embed.jsr223.Utils.postEval(org/jruby/embed/jsr223/Utils.java:207) at org.jruby.embed.jsr223.JRubyEngine.eval(org/jruby/embed/jsr223/JRubyEngine.java:95) at org.jruby.embed.jsr223.JRubyEngine.eval(org/jruby/embed/jsr223/JRubyEngine.java:142)

    Root Cause Analysis

    1. org.jruby.exceptions.RaiseException

      (TypeError) cannot convert instance of class org.jruby.RubyString to class java.lang.Long at java.lang.Thread.getStackTrace(java/lang/Thread.java:1552) at org.jruby.runtime.backtrace.TraceType$Gather.getBacktraceData(org/jruby/runtime/backtrace/TraceType.java:246) at org.jruby.runtime.backtrace.TraceType.getBacktrace(org/jruby/runtime/backtrace/TraceType.java:47) at org.jruby.RubyException.prepareBacktrace(org/jruby/RubyException.java:235) at org.jruby.exceptions.RaiseException.preRaise(org/jruby/exceptions/RaiseException.java:214) at org.jruby.exceptions.RaiseException.preRaise(org/jruby/exceptions/RaiseException.java:181) at org.jruby.exceptions.RaiseException.<init>(org/jruby/exceptions/RaiseException.java:111) at org.jruby.Ruby.newRaiseException(org/jruby/Ruby.java:4192) at org.jruby.Ruby.newTypeError(org/jruby/Ruby.java:3865) at org.jruby.RubyBasicObject.defaultToJava(org/jruby/RubyBasicObject.java:872) at org.jruby.RubyBasicObject.toJava(org/jruby/RubyBasicObject.java:843) at org.jruby.RubyString.toJava(org/jruby/RubyString.java:5541) at org.jruby.embed.variable.AbstractVariable.getJavaObject(org/jruby/embed/variable/AbstractVariable.java:140) at org.jruby.embed.variable.GlobalVariable.getJavaObject(org/jruby/embed/variable/GlobalVariable.java:46) at org.jruby.embed.internal.BiVariableMap.get(org/jruby/embed/internal/BiVariableMap.java:229) at org.jruby.embed.internal.BiVariableMap.get(org/jruby/embed/internal/BiVariableMap.java:208) at org.jruby.embed.jsr223.Utils.postEval(org/jruby/embed/jsr223/Utils.java:207) at org.jruby.embed.jsr223.JRubyEngine.eval(org/jruby/embed/jsr223/JRubyEngine.java:95) at org.jruby.embed.jsr223.JRubyEngine.eval(org/jruby/embed/jsr223/JRubyEngine.java:142)

      at Main.main()
    2. Unknown
      Main.main
      1. Main.main(Main.java:10)
      1 frame