6 Replies Latest reply on Feb 4, 2005 5:19 PM by Scott Stark

    APP-INF/classes are not being found or seen

    Sean Boltman Newbie

      Briefly, I have an EAR deployment that contains the folllowing top-level files/dirs:

      - APP-INF (under which is a /lib and /classes. classes has only a log4j.xml. lib has a handful of jars used by both abc.war and abcEJB.jar)
      - abc.war (a web application)
      - abcEJB.jar (Stateless session beans)
      - META-INF (under which there is an application.xml declaring the above two items)

      Inside both abc.war and abcEJB.jar, the META-INF/MANIFEST.MF has a CLASSPATH that declares APP-INF/classes and APP-INF/lib/one.jar and APP-INF/lib/two.jar etc etc

      What does work: Both abc.war and abcEJB.jar applications, when running, can see classes that are bundled into the JARs under APP-INF/lib... as you would expect. Mind you that WITHOUT the CLASSPATH in the MANIFEST.MF for these two applications, this would NOT work... the CLASSPATH is required. All is good.

      What does NOT work: I put under APP-INF/classes/pathTo/someCode.class, and then when running the applications (via JPDA remote debugging) I see the class is NOT being picked up. In my example, someCode.class ALSO exists in one of the APP-INF/lib/ jar files, so I don't get a ClassDefNotFound or a ClassNotFound, but I can tell I am not hitting the APP-INF/classes version of this someCode.class because when I step thru code, breakpoints etc do not match up. IF in my test I had chose to place a brand new never-before-existed newClass.class under APP-INF/classes, I suspect I WOULD get the ClassDefNotFound or ClassNotFound...

      Long story short, nothing I can do, nothing I try, seems to make it such that individual class files under APP-INF/lib get seen by the classloader.

      Any ideas? Tricks to try?

      I also tried putting CLASSPATH in the EAR/META-INF/MANIFEST.MF with no luck. so thats not it.

      Everything I read says this should work...

      Redhat, JBOSS 4.0.1