2 Replies Latest reply on Mar 13, 2012 9:54 PM by jack_chi

    problem occurs in jboss when two wars are deployed

    jack_chi

      I have two wars deployed in jboss, A.war and B.war ,there is a threadpool in A.war,it can gernerates 45 threads when A.war has been deployed,and then it will be stated.and right now ,B.war cannot be accessed through IE browser, I think B.war has been blocked by A.war( multithreaded code),because multithreaded programs appropriating all resource in jboss,when A.war running,B.war will be blocked.

      how can let both A.war and B.war can started and be accessed correctly.

      can anyone help me to resolve this problem?

      Thanks.

       

      Yuanjia Chi

        • 1. Re: problem occurs in jboss when two wars are deployed
          robertpattinson

          Hey Yuanjia Chi,

           

          Sorry its taken so long to get back to you - the problem you are seeing is because the war that you are deploying contains ALL the jars needed to build and run the platform. All of these jars are not necessary in JBoss, because JBoss has its own version of some of them that it prefers to use. Unfortunately, some of them actually cause JBoss to not deploy your war, but because the war is packaged as generically as possible we don't just exclude these jars.

           

          So the solution is for you to open up the war, delete the necessary jars, repackage the war file and redeploy it. The list of jars that COULD cause trouble are:

           

          activation.jar

          concurrent.jar

          dom4j-1.5.2.jar

          hsqldb.jar

          jaxen.jar

          mail.jar

          saaj.jar

          jaxrpc.jar

          xercesImpl.jar

          xml-apis.jar

          cglib-2.1.jar

          commons-httpclient-2.0.2.jar

          commons-logging.jar

          log4j-1.2.8.jar

          jsp-api.jar

          servlet-api.jar

          asm.jar

          asm-attrs.jar

          ehcache-1.1.jar

          hibernate3.jar

          jta.jar

          foEmitter.jar

          htmlEmitter.jar

          portlet-api-1.0.jar

          The jars that are most likely the root of your problem are servlet-api.jar and jsp-api.jar. I would recommend removing atleast those two, redeploying and seeing if you experience any other troubles. Let me know how it goes for you!

           

          Thanks

          Robert Pattinson

          Hope you wont mind

          Watch Full Mission: Impossible Ghost Protocol Movie Online

          • 2. Re: problem occurs in jboss when two wars are deployed
            jack_chi

            Thank you for your suggestion,I have cracked it already.

            The reason could be like that:  my war include a servlet,many threads will start when servlet init,and the servlet init as the jboss start.

            the most important point is that : as threads(many threads will start when servlet init)  start,they blocking many jboss inner threads。

            It leads jboss http service can't be accessed normally。

            So I change the servlet init configuration,many threads won't start when servlet init,It work,jboss  http service can be accessed normally。

             

             

            In a word,threads blocking the jboss inner threads,we must ensure jboss start completly.