2 Replies Latest reply on Oct 16, 2002 10:13 AM by John Katilie

    Packaging RAR's in a EAR

    John Katilie Newbie

      We have a number of Web Applications (.war) and ResourceSource adapters (.rar) that we want to package and ship together. If we package the archives as is in a .ear things seem to run ok. What we want to do is move common jar files from the .war and .rar files into the root of the .ear so the structure would look something like:


      This structure seems to work fine with the web applications (I.e. the code in the common jar files are visable/loadable by the web apps but the ResourceAdapters results in ClassNotFoundExceptions for code in the common jars. This is reported to work with other appservers but not with Jboss. We are Running 3.0.1. In reading various documents concerning J2EE and JBOss class loading i'm not sure if this should work.

      Is anybody doing something similiar? Should this .ear structure work under Jboss and other J2ee App servers?
      As always any comments/suggestion are appreciated.

      Thanks, John Katilie

        • 1. Re: Packaging RAR's in a EAR
          David Jencks Master

          I think you have to tell jboss you want those jars loaded in the jboss classloader (rather than the web classloader).

          You might be able to make this work by referencing the jars in the .rar manifest classpath.(NOT the .jar inside the .rar's manifest classpath)

          • 2. Re: Packaging RAR's in a EAR
            John Katilie Newbie

            David, Thank you very much for your suggestion. Yes, its seems to work if the manifest in the rar file contains classpath entries refering to common jars in the root of the ear file. I'm not totally done yet but it looks very promissing! FYI, It did not work if we also had a jboss-app.xml file like:


            But that does not really concern me. I think.

            Thanks again... John Katilie