1 Reply Latest reply on Jan 15, 2003 12:17 PM by bcaceres-tririga

    Exploded EAR Deployment (library jars)

    bcaceres-tririga

      I have an exploded EAR file that I am deploying.
      I can easily deploy it as an archived EAR containing
      library JAR and EJB jar archives, but when I explode
      the EAR as well as contained JAR files, I can't seem
      to deploy my library classes.

      My directory structure
      -------------------------------------
      + application.ear (directory -- but named as .ear)
      +-- ejb
      +--- MyEJB.jar (directory -- but named as .jar)
      +--- META-INF
      +--- MANIFEST.MF (custom manifest file)
      +--- ejb-jar.xml
      +-- classes.jar (directory -- but named as .jar)
      +--- META-INF
      +--- MANIFEST.MF (default manifest file)
      +--- com
      +--- ...

      ejb/MyEJB.jar/MANIFEST.MF contains class-path entry
      for "../classes.jar". When everything is an archive,
      JBoss has no problem finding and deploying the library
      classes. The EJB's can see all the utility classes
      just fine.

      BUT, when I explode it as a directoy, the MainDeployer
      says it has deployed:
      ..../application.ear/ejb/../classes.jar

      BUT, I get NoClassDefFoundError for several classes after
      JBoss tries to verify the EAR and contained EJB.

      The MainDeployer claims it has "deployed" the package
      "file:/usr/local/jboss/jboss-3.0.3/server/default/deploy/application.ear/ejb/../classes.jar/"

      And even reports "already deployed" on the next log line.

      I tried removing the ".jar" directory extension and
      changing the class path, but that did not work either.
      In the case of removing the ".jar" extension it gets the
      same error as above.

      Finally, I tried creating a classes.jar archive instead.
      And placing the classes.jar archive in my exploded
      EAR directory. It still fails with the exact same error, except now the "MainDeployer" does not put a "/" after the "classes.jar" name when it reports that it has deployed it.

      How do I get an exploded EAR to deploy when my
      EJB's depend on a library of utility classes?

      Thanks in advance for the help.

        • 1. Re: Exploded EAR Deployment (library jars)
          bcaceres-tririga

          The directory structure did not come out well when
          translated into HTML (white-space problem)... Here i
          is again:

          My directory structure
          -------------------------------------
          + application.ear (directory -- but named as .ear)
          ++++++ ejb
          +++++++++ MyEJB.jar (directory -- but named as .jar)
          ++++++++++++ META-INF
          ++++++++++++++ MANIFEST.MF (custom manifest file)
          ++++++++++++++ ejb-jar.xml
          ++++++ classes.jar (directory -- but named as .jar)
          +++++++++ META-INF
          ++++++++++++ MANIFEST.MF (default manifest file)
          +++++++++ com
          ++++++++++++ ...