Details

    • Number of attachments :
      0

      Description

      Hi all!

      I tried adding

      File.read(__FILE__) 
      

      to my app, and it works fine with jruby-jars 1.6.1, but when using jruby-jars 1.6.2 it fails.

      Anybody seen or solved this?

      W/System.err( 6388): java.lang.NoClassDefFoundError: org.jruby.ext.ffi.Util 
      W/System.err( 6388):    at org.jruby.RubyIO.readStatic(RubyIO.java:3336) 
      W/System.err( 6388):    at org.jruby.RubyIO$s$readStatic.call(RubyIO$s $readStatic.gen:65535) 
      W/System.err( 6388):    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.jav a:282) 
      W/System.err( 6388):    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:139)
      W/System.err( 6388):    at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57) 
      W/System.err( 6388):    at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36) 
      W/System.err( 6388):    at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) 
      W/System.err( 6388):    at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) 
      W/System.err( 6388):    at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
      W/System.err( 6388):    at org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java: 374) 
      W/System.err( 6388):    at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:328) 
      W/System.err( 6388):    at org.jruby.runtime.BlockBody.call(BlockBody.java:73) 
      W/System.err( 6388):    at org.jruby.runtime.Block.call(Block.java:89) 
      W/System.err( 6388):    at org.jruby.RubyProc.call(RubyProc.java:268) 
      W/System.err( 6388):    at org.jruby.RubyProc.call(RubyProc.java:228) 
      W/System.err( 6388):    at org.jruby.RubyProc$i$0$0$call.call(RubyProc$i $0$0$call.gen:65535) 
      W/System.err( 6388):    at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java: 203) 
      W/System.err( 6388):    at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java: 199) 
      W/System.err( 6388):    at org.jruby.RubyClass.finvoke(RubyClass.java: 618) 
      W/System.err( 6388):    at org.jruby.javasupport.util.RuntimeHelpers.invoke(RuntimeHelpers.java: 545) 
      W/System.err( 6388):    at org.jruby.embed.internal.EmbedRubyObjectAdapterImpl.callEachType(EmbedRubyObjectAdapterImpl.java: 449) 
      W/System.err( 6388):    at org.jruby.embed.internal.EmbedRubyObjectAdapterImpl.call(EmbedRubyObjectAda pterImpl.java: 395) 
      W/System.err( 6388):    at org.jruby.embed.internal.EmbedRubyObjectAdapterImpl.callMethod(EmbedRubyObj ectAdapterImpl.java: 331) 
      W/System.err( 6388):    at org.jruby.embed.ScriptingContainer.callMethod(ScriptingContainer.java: 1334) 
      W/System.err( 6388):    at org.ruboto.RubotoActivity.onResume(RubotoActivity.java:619) 
      W/System.err( 6388):    at org.ruboto.RubotoActivity $2.run(RubotoActivity.java:155) 
      W/System.err( 6388):    at android.os.Handler.handleCallback(Handler.java:587) 
      W/System.err( 6388):    at android.os.Handler.dispatchMessage(Handler.java:92) 
      W/System.err( 6388):    at android.os.Looper.loop(Looper.java:143) 
      W/System.err( 6388):    at android.app.ActivityThread.main(ActivityThread.java:4196) 
      W/System.err( 6388):    at java.lang.reflect.Method.invokeNative(Native Method) 
      W/System.err( 6388):    at java.lang.reflect.Method.invoke(Method.java: 507) 
      W/System.err( 6388):    at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:839) 
      W/System.err( 6388):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 
      W/System.err( 6388):    at dalvik.system.NativeStart.main(Native Method) 
      

        Activity

        Hide
        Wayne Meissner added a comment -

        I'd suspect this is because readStatic() is using Util.checkStringSafety() from the ffi package, and ffi has been stripped out.

        checkStringSafety() should be moved from ffi into a utility class in e.g. org.jruby.util

        Show
        Wayne Meissner added a comment - I'd suspect this is because readStatic() is using Util.checkStringSafety() from the ffi package, and ffi has been stripped out. checkStringSafety() should be moved from ffi into a utility class in e.g. org.jruby.util
        Hide
        Uwe Kubosch added a comment -

        Sounds about right. FFi has been stripped out. Can you do the move of checkStringSafety() ?

        Show
        Uwe Kubosch added a comment - Sounds about right. FFi has been stripped out. Can you do the move of checkStringSafety() ?
        Hide
        Hiro Asari added a comment -

        I moved org.jruby.ext.ffi.Util.checkStringSafety() to org.jruby.util.StringSupport.checkStringSafety().

        See https://github.com/jruby/jruby/commit/7bca899059369e801f56dfa7f66a7c0b5f3a833e

        I initiated a dist build, so it should be available in http://ci.jruby.org/snapshots shortly (find one with time stamp after "31-May-2011 10:07").

        You should be able to cherry-pick this to the 1.6 branch if need be. I have not done that on the official repo.

        Show
        Hiro Asari added a comment - I moved org.jruby.ext.ffi.Util.checkStringSafety() to org.jruby.util.StringSupport.checkStringSafety(). See https://github.com/jruby/jruby/commit/7bca899059369e801f56dfa7f66a7c0b5f3a833e I initiated a dist build, so it should be available in http://ci.jruby.org/snapshots shortly (find one with time stamp after "31-May-2011 10:07"). You should be able to cherry-pick this to the 1.6 branch if need be. I have not done that on the official repo.
        Hide
        Hiro Asari added a comment -

        After some contemplation, I cherry-picked it to the 1.6 branch: https://github.com/jruby/jruby/tree/4c5fef9940b5b36924b0a29d4dab55a0fd68ceb7

        Show
        Hiro Asari added a comment - After some contemplation, I cherry-picked it to the 1.6 branch: https://github.com/jruby/jruby/tree/4c5fef9940b5b36924b0a29d4dab55a0fd68ceb7
        Hide
        Uwe Kubosch added a comment -

        Thanks!

        Seems to work nicely here now.

        Show
        Uwe Kubosch added a comment - Thanks! Seems to work nicely here now.
        Hide
        Hiro Asari added a comment -

        Thanks for the confirmation. I'm closing this now.

        Show
        Hiro Asari added a comment - Thanks for the confirmation. I'm closing this now.
        Hide
        Uwe Kubosch added a comment -

        Sorry, I spoke too soon. You left the import of org.jruby.ext.ffi.Util in org.jruby.RubyIO.java.

        Show
        Uwe Kubosch added a comment - Sorry, I spoke too soon. You left the import of org.jruby.ext.ffi.Util in org.jruby.RubyIO.java.
        Hide
        Hiro Asari added a comment -

        Oops. Sorry about that.

        Removed the import statement in master (f03b829) and the 1.6 branch (38fc960).

        Show
        Hiro Asari added a comment - Oops. Sorry about that. Removed the import statement in master (f03b829) and the 1.6 branch (38fc960).

          People

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

            Dates

            • Created:
              Updated:
              Resolved: