1 Reply Latest reply on May 7, 2003 3:59 PM by Manuel Fehlhammer

    JBoss 3.2 LinkageError

    Shreedhar Newbie

      We have our application that comprises a ear and a service jar. Services are implemented as MBeans. We have some services accessing our application EJB's and therefore there are some common classes in our service jar and application ear. Our application deployed without any problem in JBoss3.0. Currently I am trying to Migrate to JBoss3.2
      Now I get an exception -

      java.lang.LinkageError: duplicate class definition: com.somedomain.someapplication.someclass

      How to resolve this ?

      Deployment Platform:

      OS - Windows 2000
      JVM - Hotspot 1.4
      App. Server - JBoss3.2.1 with Tomcat 4.1.2


        • 1. Re: JBoss 3.2 LinkageError
          Manuel Fehlhammer Newbie

          Hi Shreedhar,

          I had some similar problems with 3.2.1 - deployment definitly changed in the new release at some points.

          The following would be a workaround - not very nice one I have to admit, but should work:

          You could package in the following way:
          extract all classes (i.e. interfaces and transfer classes) you access from your mbeans from your ear in a new jar - let's call it ear-ifc.jar
          Create a sar-archive. There you put in your jboss-service.xml your service jar, your ear (without the ifc classes) and your ear-ifc.jar.
          Now you don't get that duplicate class definition. During deployment of that sar-archive the normal jars will be deployed before the ear (since the ear-deployer in 3.2.1 isn't ready at that point), when the ear deployer gets ready the ear-ifc.jar is already deployed so that the ear finds its ifc-classes