4 Replies Latest reply on Feb 6, 2004 10:00 AM by marc.fleury

    deploying EAR files

    nagulapati

      Hello All,

      I deployed an EAR file in JBoss and here is the directory structure....

      ----------META-INF/
      ----------META-INF/manifest.mf
      ----------META-INF/application.xml
      ----------lib/
      ----------lib/AdminClient.jar
      ----------ejb-app.jar

      ejb-app-jar contains the artifacts for EJB and AdminClient.jar is jar package containing the dependent classes which are used by the EJB bean

      In my manifest.mf I added the "Class-Path" line as follows,

      Class-path: ./lib/AdminClient.jar

      My question is when I deployed the ear package in the "deploy" directory of JBoss, the classloader is trying to locate the AdminClient.jar file from the "deploy/bin" directory in the JBoss and not in the "lib" directory inside the EAR package.

      What am I doing wrong here? Any pointers? I would like the classloader to locate the classes inside the lib directory in EAR package. I also tried replacing the classpath line without "." but in vain.

      Thanks in advance,
      Vivek

        • 1. Re: deploying EAR files
          jae77

          is there any specific reason you need the jar file to live in a lib directory?

          why not just place the AdminClient.jar at the same level w/ the ejb-app.jar and modify the Class-Path in the manifest file to look for the jar like this:

          Class-Path: ./AdminClient.jar

          • 2. Re: deploying EAR files
            vertigo


            You are editing the wrong manifest file. Use the manifest inside the ejb-app.jar file and it will work.

            • 3. Re: deploying EAR files

              lib/AdminClient.jar should work

              otherwise, decalre AdminClient.jar as a Java module and it will be "deployed" by jobss

              • 4. Re: deploying EAR files
                marc.fleury

                one of the beauties of the JBoss classloaders is that if that jar is visible ANYWHERE then the system will pick it up.

                one of the things that may be throwing you off is that the jar doesn't get picked up before the EJB.

                Several ways. putting stuff in lib/ will make sure it is picked up first before everything else. Otherwise do russian doll packaging (put your jar in the ejb jar and it will be deployed first).