2 Replies Latest reply on Sep 17, 2009 5:34 PM by Jeff Christy

    Deployment isolation problem with ear being ported from Webl

    Jeff Christy Newbie

      I have an ancient weblogic-hosted J2EE application (2003ish) that I am porting to Jboss 4.2.3.GA. It uses old versions of lots of 3rd party tools, including JAXB, version 1.0.4. I have gotten the ear to deploy cleanly by removing those 3rd party jars from the ear that conflict with jars already in use by the Jboss server, and the application almost runs, but hits problems when it tries to get an old JAXB ContextFactory class that no longer exists in the version of JAXB that the Jboss server is using, 2.1.4.

      I then went down the path of putting the old jars back into the ear and doing an isolated deployment, in the hope that I could use the old JAXB. I am using this deployment descriptor in the ear:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jboss-app
      PUBLIC "-//JBoss//DTD J2EE Application 4.2//EN"


      However, now it appears that various components within the ear can no longer see each other. The deployment is bombing when an application class in an included jar tries to find an xml document in another included jar. This worked fine with a non-isolated deployment. Help, what am I doing wrong?
      The ear has 4 EJB jars, a war, numerous jars of application code, and even more jars of 3rd party library code (about 50 total jars/war within the ear).

        • 1. Re: Deployment isolation problem with ear being ported from
          jaikiran pai Master

          Try packaging the application like this:

           |--- META-INF
           | |--- application.xml
           | |--- jboss-app.xml
           |--- lib [This will contain jar files which are to be available to all components in the EAR]
           | | --- xyz.jar (plain jar files)
           | | --- more plain jar files
           |--- ejbjar1.jar
           |--- ejbjar2.jar
           |--- myapp.war

          If that still does not work, then provide more details about the exact issue.

          • 2. Re: Deployment isolation problem with ear being ported from
            Jeff Christy Newbie

            I initially moved all the non-EJB jars into a lib directory, and then the app's Spring initialization starting failing. A different component had a dependency on having its jars at the top level of the ear.
            After identifying those jars (and making a note to go back and find the configuration that created that dependency!), and leaving them at the top level of the ear with all of the rest of the jars in a lib directory, the app finally worked, with the old JAXB.
            Thanks jaikiran, you are awesome. This issue has been holding me up for some time - where do I send the case of {insert your favorite beverage here}? :-)