4 Replies Latest reply on Sep 1, 2002 1:22 PM by adrian.brock

    How is classpath managed

    cyates

      Hi,

      I have an EAR file that contains a WAR file and an EJB (jar) file.

      Both of them need access to common utilities.

      I do not want to put common.jar outside of the ear file because hot deploy will fail.

      The only way I can get it to work is if the EAR file contains common.jar and the WAR file contains common.jar.

      I have tried to set the Class-Path in MANIFEST.MF but it is ignored.

      I could live with this but if I hot deploy the ear file then I *always* get a classnotfound the *2nd* time I deploy it. This is obviously a bug within JBOSS because if I restart JBOSS it works consistently.

      So, my question is; where do I put common.jar and what should my MANIFEST.MF look like!

      Cheers

      Colin Yates

        • 1. Re: How is classpath managed
          jwcarman

          I can't believe nobody ever replied to this! I am having the same problem. My manifest classpath is being ignored! Did you finally work it out?

          • 2. Re: How is classpath managed

            war deployment ignores the MANIFEST.MF
            you can use the following in application.xml

            common.jar

            Regards,
            Adrian

            • 3. Re: How is classpath managed
              jwcarman

              I would have to disagree with you on this one. I am deploying an application in much the same manner. I have a manifest classpath set up in my war file and the deployment DOESN'T ignore the manifest classpath. My war contains no files in its META-INF/lib directory, but it can still see all of the classes that it needs that were on the manifest classpath. My issue was a very stupid one! I used a comma-separated list of jars on the manifest classpath as opposed to a space-separated one. DUH! :-)

              • 4. Re: How is classpath managed

                My bad memory again. Duh! :-)
                Maybe this was in an older version of the spec?

                You are correct, a wars manifest.mf is processed.

                Regards,
                Adrian