I have one EAR with an EJB JAR inside, as well as several other JARs with 3rd party libraries. After some search, I realised that I needed to add those 3rd party JARs to the EAR MANIFEST.MF file. But that didn't work, JBoss kept complaining about ClassNotFoundExceptions. So, I did something stupid, that was to add one <module><java>...</java></mobule> in application.xml for each JAR. As I expected, it worked! But I know this is the wrong way... :) Can anyone help me please? Creating a Class-Path line in MANIFEST.MF is the right way, right? Thanks in advance,
You must add corresponding Class-Path line in the MANIFEST.MF for each ejb-jar that depends on the 3rd party libraries.
Hi Alexey, thanks for your answer. I added those lines to the EJB JAR MANIFEST.MF file, and removed the application.xml entries. But still, it doesn't work... Do you have any example of an EAR with several JARs inside, and with the classpath properly configured? Thanks,
You can go to ur application.xml and include all ur utility jars there .In this way you don't need to specifically work on the issue of Manifest file.
When the app loads it finds or loads these along with other classes .
Modifying manifest file of ejb-jar should work. You need not modify application.xml nor manifest file of EAR file. Here is a sample entry in manifest file
Please note that extension mechanism is availabe from JDK1.3 onwards.
Hope this helps
Thanks everybody, I solved the problem using the EJB JAR manifest file.