2 Replies Latest reply on Feb 4, 2004 5:54 AM by Jarl Petter Kvalsvik

    Class-Path in Manifest.mf

    Jarl Petter Kvalsvik Newbie

      First of all, sorry if this question has been posted before, but the search module "threw an exception".

      I have an EAR file that I deploy in JBoss. For testing purposes, the EAR "file" is a directory with .ear extenstion. The EAR file consists of a number of EJB jar files, of which several are dependent on each other - the dependencies are expressed in the Class-Path attribute in Manifest.mf of each jar-file.

      Now, if I unpack an EJB jar-file to a directory structure (within the ear-directory), I would expect that JBoss would behave the same way.

      But what I discovered is that JBoss seems to ignore the Class-Path attribute in an "unpacked" EJB jar file and makes it impossible to deploy the EAR-"file".

      Is this a bug? - or have I missed something in my configuration?

      The Class-Path attribute has the form:
      Class-Path: ejb1.jar ejb2.jar ejb3.jar
      and the EAR-"file" deploys with no problems when the EJB jar files are "packed".

      My configuration is:
      * Windows 2000
      * Sun JVM 1.4.2_02
      * JBoss 3.2.2

        • 1. Re: Class-Path in Manifest.mf
          marc fleury Master

          it does sound like a bug, however I am confused as to what you are trying to achieve. manifest.mf is not there to define dependencies of deploy (say this component needs to be deployed before these).

          You may want to try "nested" deployments for "ordering"

          • 2. Re: Class-Path in Manifest.mf
            Jarl Petter Kvalsvik Newbie

            Sorry, I should have described the situation better.

            What I am trying to achieve is to make use of the hot-swap capabilities of Java VM 1.4. Until now we have used Java VM 1.3 and deployed the application as an EAR-directory consisting of packaged EJB jar-files.

            The Class-Path attribute is used to expess jar-file dependencies for the class-loader and not for deploy dependencies (I deploy one EAR-"file" consisting of 20+ ejb jar-files).

            What I have discovered is that hot-swap does not work when I deploy packaged jar-files (nothing happens if I replace an EJB-jar file inside the EAR-directory). But if I compile directly into a jar-directory, I have been able to make hot-swap work.

            But then I have come across this problem that JBoss seems to ignore the Class-Path attribute in a ejb jar-directory inside an EAR directory.

            A possible way to recreate the problem is to create an EAR-file as:

            +--EJB2.jar (Class-Path: EJB1.jar)

            where EJB2.jar implements an EJB that has its home and remote interfaces defined in EJB1.jar. If you deploy this EAR file - either as an EAR-file or EAR-directory it works fine. Then if you unpack EJB2.jar into a directory structure, the classloader is not able to locate the home and remote interfaces and thus the deployment failes.