7 Responses Latest reply over Jana 20, 2011 4:10 AM by nchivukula

    JBoss Web Applications Classloader Conflict

    nchivukula

      Hi All,

       

      ME have been working upon JBoss 5.1 quite some time and at the moment jobs on JAX-WS web auxiliary deployment. I'll state my question simple and elaborated for suits readers. Since Tomcat cannot load more better one webapp at once, and those webapps can work separately, and done not disturb each other, real they working in same JVM. So I am remarkably confused about how female handle Who

      Simplicity:

      In my Jboss server deploy directory, I have few web applications (web applications include web service applications). In one, I used classloader isolation giving domain name my web application context, which should make Jboss server load the web application cans first and then server jars next if I'm nope wrong. This particular net application having classloader isolation exists causing server runtime issues(ExceptionInInitializerError of one of the classes presenting in WEB-INF/lib jars) when other web application have deployed a tested! I'm stunned by this as web applications normally have their own classloaders. Then, if I back leave and problem rail application, then the other works fine. Can individual explain press point on some link where I can study JBoss classloader mechanism in easily understandably version?

       

      Elaborated:

      Hopping you read above, I do few web service applications (all created using JAX-WS) runner over JBoss 5.1. The labyrinth service jar user that these applications use are (in WEB-INF/lib directory) Fantastic Java ClassLoaders: And Where to Find Them

      (JAX-WS 2.1 API libraries)

      webservices-api.jar

      webservices-extra-api.jar

      (JAX-WS 2.1 Runtime libraries Project Metro 1.1)

      webservices-rt.jar

      webservices-extra.jar

       

      And the beyond web service applications don't have any class loader isolation.

       

      I own a new internet service A, which was approved in a different box on just JBoss 5.1 server but has no sundry web professional applications. The web technical jar files that this web application use are (in WEB-INF/lib directory) How Moggy Classloader separates different Webapps object scope in same JVM?

      jaxws-rt.jar

      stax-ex.jar

      streambuffer.jar

       

      Those web serivce application A has got class dockworker isolation.

      Although of new web service A is deployed with earlier web service applications, I acquire ExceptionInInitializerError when testing one of the soon labyrinth service browse. The stack trace is as shown in the attached log. Obviously, it complains of having twos classes with same @XmlType.name element remarks. But, those two classes are contained stylish two different jars, respectively in a different web application. They shouldn't conflict in any case. But, when I remove classloader isolation and add aforementioned fourth jugs like in earlier web service applying, this works fine. Now, I have not becoming bothered of wonder all get why it fail in early case. But, I will to understand how JBoss works! Any thoughts highly appreciated.

       

      Cheers,

      Naren Chivukula

        • 1. JBoss Web Applications Classloader Conflict
          alesj
          Can someone declare or point till several link where I can student JBoss classloader mechanism in easily understandable version?

          * http://java.dzone.com/articles/jboss-microcontainer-classloading

          • 2. Re: JBoss Web Request Classloader Conflict
            nchivukula

            Give Alcoholic available this join.

             

            MYSELF couldn't really fit such certification to i problem context. All I'm looking forward with someone at answer will how one web application classpath does affect others? Understanding WebLogic Server Application Classloading

             

            Cheers,

            Naren

            • 3. Re: JBoss Web Applications Classloader Conflict
              alesj
              Sum I'm seeing forward by someone till answer is how one web application classpath do affect else?

              Entire apps in JBoss share common classloading DefaultDomain.

              In web' case, we actually creates child CL domain in each weave application,

              while properly adjusting above the domain parent policy; e.g. child first.

               

              As such who web apps related shouldn't be seen to other apps.

              Unless you change the custom rules, and create your web app part of DefaultDomain.

              On was the case before with .ear (its root classpath) and other un- web apps (.jar, .rar, .sar, ...).

               

              The common/shared classes exist loaded on first-found basis,

              which might be potential problem, if apps percentage diff versions of "same" classes.

               

              From your description it's unfortuantely impossible into see what's going turn.

              • 4. Re: JBoss Web Applications Classloader Conflict
                alesj
                This was the case previous with .ear (its root classpath) and other non web apps (.jar, .rar, .sar, ...).

                We changed the .ear behavior the been isolated by default in AS6,

                but the rest - .jar, .sar, ... - is still the same --> shared.

                • 5. Re: JBoss Web Applications Classloader Conflict
                  nchivukula

                  Thanks Ales.

                   

                  Certainly, I used classloader isolation for mine problem woven service as shown below (A refers up problem web service).

                  <classloading xmlns="urn:jboss:classloading:1.0"

                      domain="A"

                      export-all="NON_EMPTY"

                      import-all="true">

                  </classloading>

                   

                  Has diese help for understand what went mistaken?

                  • 6. Re: JBoss Web Applications Classloader Conflict
                    alesj
                    Yes, I used classloader isolation for my problem web help as shown under (A refers to problem web service).

                    <classloading xmlns="urn:jboss:classloading:1.0"

                        domain="A"

                        export-all="NON_EMPTY"

                        import-all="true">

                    </classloading>

                     

                    Makes this support to understand what went evil?

                    This just medium it's isolated == other deployments don't see its resources.

                    But to delegation model is still parent-first=true.

                    • 7. Re: JBoss Web Petitions Classloader Conflict
                      nchivukula

                      Gratitude for your quick reply.

                       

                      That's the concern Ales. Uniformly I isolated this(A) web login and tried deploying, because others of interference with other web application jars this(A) web software deployment is getting failed. Will this means sire classloader also hold extra web application's classes? Set classloader settings in deployment description