Forum: JRuby ClassFormatError: Duplicate interface name in class file' Jruby-1.1.5/Rails

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
54568ee7ba0c78a836e84c8756a3d681?d=identicon&s=25 Lenny Marks (Guest)
on 2008-12-03 18:08
(Received via mailing list)
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
Ede2aa10c6462f1d825143879be59e38?d=identicon&s=25 Charles Oliver Nutter (Guest)
on 2008-12-03 19:11
(Received via mailing list)
Lenny Marks wrote:
> 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.
...
> Shall I file a bug?

Check that it's still a problem on trunk, and then yes, go ahead and
file a bug.

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
54568ee7ba0c78a836e84c8756a3d681?d=identicon&s=25 Lenny Marks (Guest)
on 2008-12-04 19:55
(Received via mailing list)
I'm happy to report this does not happen with jruby-1.1.6RC1

-lenny

On Dec 3, 2008, at 1:10 PM, Charles Oliver Nutter wrote:

> - Charlie
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
This topic is locked and can not be replied to.