Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6.2
-
Fix Version/s: JRuby 1.6.3, JRuby 1.7.0.pre1
-
Component/s: Core Classes/Modules
-
Labels:None
-
Environment:roboto master, android 2.3.3
-
Number of attachments :
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)
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