I have two applications - foo1.ear and foo2.ear, deployed to a JBoss 4.0.3SP1 server.
foo1.ear is self-contained - all of its needed jar files are packaged in its ear, and jdom.jar is one such jar. On the other hand foo2.ear does not include any needed jar files that are in foo1.ear.
When a Http request is sent to a web app in foo2.ear, a JDOM operation is attempted in the doGet() method and the following error is encountered : java.lang.NoClassDefFoundError: org/jdom/JDOMException
It turned out that org.jdom.JDOMException was not in the class loader Repository and sure enough the UCL associated with foo2.ear could not locate it.
But certainly the UCL associated with foo1.ear should have signaled that it was capable of loading all classes in jdom.jar. If that was the case, why didn't the class loading mechanism defer to the UCL associated with foo1.ear to load the class.
It should be mentioned that jdom.jar is specified as an entry in the Class-Path directive of the manifest file of an ejb module in foo1.ear and the ejb module was certainly loaded.