2 Replies Latest reply on Feb 27, 2009 9:56 AM by J-C jc

    JBoss 5.0.1.GA: Ear and manifest in jars

    J-C jc Apprentice

      Hi,

      I try to migrate from JBoss 4.2.3 to 5.0.1. I deploy my application as an ear. Application works fine in JBoss4.2.3+JDK1.6 but not in JBoss 5.0.1

      In my project, I was used to add in the Manifest.mf of each jar of the EAR the classpath. Consequently, in the application.xml of the EAR, I just have to list all the ejb modules (and not jar module since they was in already in the Manifest.mf of one of the ejb module).

      It does not work in JBoss 5.0.1. Some MBeans (declared using annotation @Service and @Management) are deployed several times .

      The only solution I have found to fix that issue in JBoss5 is to remove classpath from manifest and to declare all jars as java module in the application.xml.

      My application is huge ... writting the application.xml is a real nightmare ... it was so simple with the classpath in manifest ...

      It is a known issue ? Is is allowed to set classpath in manifest.mf in an ear ?

      Thks

        • 1. Re: JBoss 5.0.1.GA: Ear and manifest in jars
          jaikiran pai Master

           

          "jc7442" wrote:



          The only solution I have found to fix that issue in JBoss5 is to remove classpath from manifest and to declare all jars as java module in the application.xml.

          My application is huge ... writting the application.xml is a real nightmare ... it was so simple with the classpath in manifest ...


          You need not add all those libraries as java modules in the application.xml. Just create a "lib" folder at the root of the EAR and place those (non-ejb) jar files in that EAR/lib folder. Those will be by default added to classpath.

          "jc7442" wrote:

          It does not work in JBoss 5.0.1. Some MBeans (declared using annotation @Service and @Management) are deployed several times .


          Not sure the MANIFEST entries should have affected the @Service deployments. Let us know if you still see the issue after you add them to the EAR/lib folder.



          • 2. Re: JBoss 5.0.1.GA: Ear and manifest in jars
            J-C jc Apprentice

            I have added jars in the lib directory of the ear. Now it works fine.

            I have remove classpath from manifest. I have an ejb module that uses another ejb module. The second ejb module contains a MBean with a @Management annotation.

            The MBean modules was declared one time in the application.xml file and was also included in the classpath in the manifest of my first ejb module. That's why I have my MBean deployed two times


            Thanks