I was just trying to upgrade my Rails app to Jruby-1.1.5 from 1.1.2.
I get the following error below. I poked around a bit and I think its
related to class reloading in development mode.
I threw in a debug statement in
org.jruby.java.MiniJava.createOldStyleImplClass to see what interface
is duplicate:
createOldStyleImplClass org.jruby.gen.InterfaceImpl46879705 superTypes
[org/aps/eop/hibernate/springtx/TxCallback, org/aps/eop/hibernate/
springtx/TxCallback]
The ruby class implementing that interface is:
class CallbackWrapper #:nodoc: all
include Java::org.aps.eop.hibernate.springtx.TxCallback
def block=(block)
@block = block
end
def execute(tx)
@block.call
end
end
I tried setting config.cache_classes = true and it disappears.
Shall I file a bug?
-lenny
NativeException (java.lang.ClassFormatError: Duplicate interface name
in class file org/jruby/gen/InterfaceImpl46879705):
java/lang/ClassLoader.java:-2:in defineClass1' java/lang/ClassLoader.java:675:in
defineClass’
org/jruby/util/JRubyClassLoader.java:22:in defineClass' org/jruby/java/MiniJava.java:550:in
defineOldStyleImplClass’
org/jruby/java/MiniJava.java:196:in createOldStyleImplClass' org/jruby/javasupport/Java.java:1559:in
new_proxy_instance2’
org/jruby/java/proxies/JavaInterfaceTemplate.java:251:in
jcreateProxy' org/jruby/java/proxies/JavaInterfaceTemplate.java:23:in
access
$000’
org/jruby/java/proxies/JavaInterfaceTemplate.java:158:in call' org/jruby/internal/runtime/methods/JavaMethod.java:62:in
call’
org/jruby/RubyClass.java:353:in finvoke' org/jruby/javasupport/util/RuntimeHelpers.java:298:in
invoke’
org/jruby/java/proxies/JavaInterfaceTemplate.java:142:in call' org/jruby/internal/runtime/methods/DynamicMethod.java:226:in
call’
org/jruby/internal/runtime/methods/DynamicMethod.java:203:in call' org/jruby/runtime/callsite/CachingCallSite.java:260:in
cacheAndCall’
org/jruby/runtime/callsite/CachingCallSite.java:75:in call' org/jruby/ast/CallNoArgNode.java:61:in
interpret’
org/jruby/ast/LocalAsgnNode.java:120:in interpret' org/jruby/ast/NewlineNode.java:101:in
interpret’
org/jruby/ast/BlockNode.java:68:in interpret' org/jruby/internal/runtime/methods/DefaultMethod.java:165:in
interpretedCall’
org/jruby/internal/runtime/methods/DefaultMethod.java:142:in `call’
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email