2 Replies Latest reply on Sep 11, 2002 12:16 PM by randahl

    Deployment results in ClassFormatError

    randahl

      I have a set of EJBs which are deployable on a different EJB Server. However, when deploying on JBoss I get a ClassFormatError with a "repetitive method signature" message. My EJBs ar compiled with j2sdk1.4.0_01, so I do not really believe in the compiler creating an illegal class format containing a repetitive method signature. I had a hunch that the error was caused by my class inheriting the same interface twice (I have a complex inheritance hierarchy) but I checked up on that and it does not seem to be the problem - and even if I did inherit the interface twice, that is still legal Java, as we all know.

      I am really clueless, so if anyone has an idea what could be wrong I would really appreciate the post.


      Randahl


      14:50:44,924 ERROR [URLDeploymentScanner] Failed to deploy: org.jboss.deployment
      .scanner.URLDeploymentScanner$DeployedURL@1447119a{ url=file:/C:/jboss-3.0.2/ser
      ver/rockit.dk/deploy/rockit.ear, deployedLastModified=1031747359576 }
      org.jboss.deployment.DeploymentException: Could not create deployment: file:/C:/
      jboss-3.0.2/server/rockit.dk/tmp/deploy/server/rockit.dk/deploy/rockit.ear/77.ro
      ckit.ear-contents/rockit-ejb.jar; - nested throwable: (java.lang.ClassFormatErro
      r: dk/rockit/puls/entity/folder/FolderBean$Proxy (Repetitive method name/signatu
      re))
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:822)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:794)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:616)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:580)
      at sun.reflect.GeneratedMethodAccessor11.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.invoke(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 $Proxy4.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
      tScanner.java:427)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      canner.java:553)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      doScan(AbstractDeploymentScanner.java:212)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      loop(AbstractDeploymentScanner.java:225)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      run(AbstractDeploymentScanner.java:202)
      Caused by: java.lang.ClassFormatError: dk/rockit/puls/entity/folder/FolderBean$P
      roxy (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.(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.JDBCCreateBeanClassInstanceCommand.<in
      it>(JDBCCreateBeanClassInstanceCommand.java:52)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createCreateBeanCla
      ssInstanceCommand(JDBCCommandFactory.java:97)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(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.invoke(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 $Proxy147.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.invoke(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.invoke(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

        • 1. Re: Deployment results in ClassFormatError
          randahl

          Later I found out that the bug does indeed seem to be provoked by the fact that I inherit the same interface twice. The setup is similar to 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 that makes the deployment fail on JBoss. This must be a JBoss bug since java permits multiple interface inheritance. I will submit the bug in the bug tracking system.


          Randahl

          • 2. Re: Deployment results in ClassFormatError
            randahl

            I have submitted this as bug number 607895.


            Randahl