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.
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.
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