Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-229

Deployment fails / multiple inheritance

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • JBossAS-3.2.6 Final
    • None
    • None

    Description

      SourceForge Submitter: randahl .
      I found out that the JBoss deployment mechanism fails
      when you use multiple interface inheritance in your
      EJBs, causing errors similar to the one shown at the
      end of this post. The error only occurs when you create
      a situation similar to what is often refered to as
      the "deadly diamond of death" meaning you inherit the
      same method twice (which is legal in java when using
      multiple interface inheritance).

      I have been able to recreate the bug with a setup like
      the following:

      I have two classes C1 and C2.
      C2 extends C1
      The class C1 implements an interface called I1.
      The class C2 implements an interface called I2.

      Because I want to make sure that any class which
      implements I2 also implements I1 my I2 interface
      extends I1.

      As a result C2 implements I1 in the two following ways:

      C2 -> I2 -> I1
      C2 -> C1 -> I1

      • And this makes the deployment fail on JBoss causing
        the ClassFormatError shown below.

      This must be a JBoss bug since java permits multiple
      interface inheritance and it is stated in the EJB
      specification that EJBs are allowed to use inheritance.

      If you happen to be the person who knows how to fix
      this bug, I would be very grateful if you would e-mail me
      at randahl@rockit.dk when you know the ETA of the fix -
      I have a truck load of EJBs which use multiple interface
      inheritance and so far they simply cannot deploy on
      JBoss.

      Randahl

      Caused by: java.lang.ClassFormatError:
      dk/rockit/ArchiveBean
      $Proxy (Repetitive method name/signature)
      at java.lang.ClassLoader.defineClass0(Native
      Method)
      at java.lang.ClassLoader.defineClass
      (ClassLoader.java:509)
      at java.lang.ClassLoader.defineClass
      (ClassLoader.java:438)
      at
      org.jboss.proxy.compiler.Runtime.makeProxyType
      (Runtime.java:68)
      at org.jboss.proxy.compiler.ProxyCompiler.<init>
      (ProxyCompiler.java:76)
      at
      org.jboss.proxy.compiler.Proxies$Impl.newTarget
      (Proxies.java:580)
      at org.jboss.proxy.compiler.Proxies.newTarget
      (Proxies.java:77)
      at
      org.jboss.proxy.compiler.Proxy.newProxyInstance
      (Proxy.java:49)
      at
      org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateBeanClassIn
      stanceCommand.<in
      it>(JDBCCreateBeanClassInstanceCommand.java:52)
      at
      org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.c
      reateCreateBeanCla
      ssInstanceCommand(JDBCCommandFactory.java:97)
      at
      org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start
      StoreManager(JDB
      CStoreManager.java:436)
      at
      org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start
      (JDBCStoreManage
      r.java:369)
      at
      org.jboss.ejb.plugins.CMPPersistenceManager.start
      (CMPPersistenceManag
      er.java:198)
      at org.jboss.ejb.EntityContainer.start
      (EntityContainer.java:376)
      at org.jboss.ejb.Container.invoke
      (Container.java:764)
      at org.jboss.ejb.EntityContainer.invoke
      (EntityContainer.java:1055)
      at org.jboss.mx.server.MBeanServerImpl.invoke
      (MBeanServerImpl.java:517)
      at
      org.jboss.system.ServiceController$ServiceProxy.invoke
      (ServiceControl
      ler.java:967)
      at $Proxy5.start(Unknown Source)
      at org.jboss.system.ServiceController.start
      (ServiceController.java:396)
      at sun.reflect.GeneratedMethodAccessor6.invoke
      (Unknown Source)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke
      (DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at
      org.jboss.mx.capability.ReflectedMBeanDispatcher.invok
      e(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke
      (MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke
      (MBeanProxy.java:174)
      at $Proxy357.start(Unknown Source)
      at org.jboss.ejb.EjbModule.startService
      (EjbModule.java:430)
      at org.jboss.system.ServiceMBeanSupport.start
      (ServiceMBeanSupport.java:1
      64)
      at sun.reflect.NativeMethodAccessorImpl.invoke0
      (Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke
      (NativeMethodAccessorImpl.
      java:39)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke
      (DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at
      org.jboss.mx.capability.ReflectedMBeanDispatcher.invok
      e(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke
      (MBeanServerImpl.java:517)
      at
      org.jboss.system.ServiceController$ServiceProxy.invoke
      (ServiceControl
      ler.java:967)
      at $Proxy5.start(Unknown Source)
      at org.jboss.system.ServiceController.start
      (ServiceController.java:396)
      at sun.reflect.GeneratedMethodAccessor6.invoke
      (Unknown Source)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke
      (DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at
      org.jboss.mx.capability.ReflectedMBeanDispatcher.invok
      e(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke
      (MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke
      (MBeanProxy.java:174)
      at $Proxy12.start(Unknown Source)
      at org.jboss.ejb.EJBDeployer.start
      (EJBDeployer.java:394)
      at org.jboss.deployment.MainDeployer.start
      (MainDeployer.java:802)
      ... 15 more

      Attachments

        Activity

          People

            adrian.brock Adrian Brock (Inactive)
            sourceforge-user SourceForge legacy user (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: