Following is my application structure.
abc.jar (at EAR level)
commonlibs.jar (at EAR level)
---lib1.jar (inside commonlibs.jar)
---WAR (inside EAR)
|--someclass (inside war)
---Manifest.MF with commonlibs.jar in classpath element
Now, when someclass loads a class in abc.jar, it loads fine (even without a manifest entry). However, if it tries to load a class in abc.jar which in turn needs a class in lib1.jar, I get a NoClassDefFound error.
Is this because I'm packaging a jar within a jar? I have set my classloading option to "single class loader for application".
Would also like to mention that if I don't use the WAR at all, the class in abc.jar loads the class in lib1.jar properly.