9 Replies Latest reply on Jul 21, 2014 7:41 AM by wdfink

    JBOSS AS 7 deploys war files twice

    hsk

      jBoss AS - 7.1.1.Final : When a .war file ( Spring MVC application ) is deployed, the application server deploys it twice. This results in one input http client request getting processed twice. ( this .war file works fine when deployed under Tomcat 7 )

      Also when un-deploying, the war file gets un-deployed twice.

      INFO  [org.jboss.as.server] (HttpManagementService-threads - 1) JBAS018559: Deployed "web-1.0.0.war"

      INFO  [org.jboss.as.server] (HttpManagementService-threads - 1) JBAS018559: Deployed "web-1.0.0.war"

       

      INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015877: Stopped deployment web-1.0.0.war in 30ms

      INFO [org.jboss.as.server] (HttpManagementService-threads - 4) JBAS018558: Undeployed "web-1.0.0.war"

      I tried disabling the auto deploy mode ( edited standalone.xml as in jBoss README.txt), and tried the manual mode, still no luck. Appreciate if anyone can point me in the right direction

        • 1. Re: JBOSS AS 7 deploys war files twice
          jaikiran

          Welcome to the forums!

           

          It perhaps is logging that message twice (which is weird) but I doubt it's deploying it twice. If it was, then it would have failed deploying the second time unless a different context root was used for the second deployment.

           

           

          hsk n wrote:

           

          This results in one input http client request getting processed twice.

           

          How exactly was that verified? There can only be one application at a given context root, which is part of the request URL. So I don't see how it gets processed twice.

          • 2. Re: JBOSS AS 7 deploys war files twice
            hsk

            The application ends up sending two outbound messages instead of one,  and these and all other transaction processing logs appear twice. As mentioned in my original post, the app behaves well under Tomcat !!!

             

            23:31:27,848 INFO  [stdout] (http--0.0.0.0-8080-1) THIS OBJECT ==> com.myapp.web.EventController@5fada2

            23:31:27,848 INFO  [stdout] (http--0.0.0.0-8080-1) Classloader = vfs:/content/web-1.0.0.war/WEB-INF/classes

            23:31:27,848 INFO  [stdout] (http--0.0.0.0-8080-1) COUNT = 1

            23:31:27,849 INFO  [stdout] (http--0.0.0.0-8080-1) Event Controller Webservices : Calling messagingFacade.addEvent(event);

             

            23:31:27,848 INFO  [stdout] (http--0.0.0.0-8080-1) THIS OBJECT ==> com.myapp.web.EventController@5fada2

            23:31:27,848 INFO  [stdout] (http--0.0.0.0-8080-1) Classloader = vfs:/content/web-1.0.0.war/WEB-INF/classes

            23:31:27,848 INFO  [stdout] (http--0.0.0.0-8080-1) COUNT = 1

            23:31:27,849 INFO  [stdout] (http--0.0.0.0-8080-1) Event Controller Webservices : Calling messagingFacade.addEvent(event);

             

            Since this is a Spring MVC application, care has been taken to de-dupe loading of the beans

             

            Even a dummy / simple ( non-spring ) .war file reports duplicate deployments as from the logs below :::

             

            23:54:30,851 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015876: Starting deployment of "testweb.war"

            23:54:30,940 INFO  [org.jboss.web] (MSC service thread 1-2) JBAS018210: Registering web context: /testweb

            23:54:31,050 INFO  [org.jboss.as.server] (HttpManagementService-threads - 4) JBAS018559: Deployed "testweb.war"

            23:54:30,851 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015876: Starting deployment of "testweb.war"

            23:54:30,940 INFO  [org.jboss.web] (MSC service thread 1-2) JBAS018210: Registering web context: /testweb

            23:54:31,050 INFO  [org.jboss.as.server] (HttpManagementService-threads - 4) JBAS018559: Deployed "testweb.war"

             

            Message was edited by: hsk n

            • 3. Re: JBOSS AS 7 deploys war files twice
              sfcoy

              This is a logging configuration problem.

               

              Events are being logged twice, not executed twice.

              • 4. Re: JBOSS AS 7 deploys war files twice
                hsk

                No it isnt merely a logging issue - the message provider shows two connections opened for a single request.

                 

                00:07:44,245 INFO  [stdout]  AnotherDestinationClientProcessor DESTINATION CLIENT PROCESSOR consumed input event received from My_App  ==> EVENT ID = Regular_Event_1, and the event name =Regular_Event

                00:07:44,245 INFO  [stdout] AnotherDestinationClientProcessor DESTINATION CLIENT PROCESSOR consumed input event received from My_App  ==> EVENT ID = Regular_Event_1, and the event name =Regular_Event

                • 5. Re: JBOSS AS 7 deploys war files twice
                  jaikiran

                  I agree with Steve - this is a logging issue.

                   

                  hsk n wrote:

                   

                  the message provider shows two connections opened for a single request.

                   

                  00:07:44,245 INFO  [stdout]  AnotherDestinationClientProcessor DESTINATION CLIENT PROCESSOR consumed input event received from My_App  ==> EVENT ID = Regular_Event_1, and the event name =Regular_Event

                  00:07:44,245 INFO  [stdout] AnotherDestinationClientProcessor DESTINATION CLIENT PROCESSOR consumed input event received from My_App  ==> EVENT ID = Regular_Event_1, and the event name =Regular_Event

                  I don't see anything which indicates two connections opened for a single request and I am not even sure what that means.

                  • 6. Re: JBOSS AS 7 deploys war files twice
                    jaikiran

                    Even a dummy / simple ( non-spring ) .war file reports duplicate deployments as from the logs below :::

                     

                    23:54:30,851 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015876: Starting deployment of "testweb.war"

                    23:54:30,940 INFO  [org.jboss.web] (MSC service thread 1-2) JBAS018210: Registering web context: /testweb

                    23:54:31,050 INFO  [org.jboss.as.server] (HttpManagementService-threads - 4) JBAS018559: Deployed "testweb.war"

                     

                    23:54:30,851 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015876: Starting deployment of "testweb.war"

                    23:54:30,940 INFO  [org.jboss.web] (MSC service thread 1-2) JBAS018210: Registering web context: /testweb

                    23:54:31,050 INFO  [org.jboss.as.server] (HttpManagementService-threads - 4) JBAS018559: Deployed "testweb.war"

                    Take a look at the timestamps and the thread id which give enough hint that this is a double logging issue.

                    • 7. Re: JBOSS AS 7 deploys war files twice
                      hsk

                      sorry - didnt mention the app connects to a message provider - and it opens two connections, instead of the expected result (just one), as verified in Tomcat.

                       

                      This is a freshly downloaded jBoss app server, and seems to act bad even for a simple web-app ( no matter even if it is a logging issue ).

                      • 8. Re: JBOSS AS 7 deploys war files twice
                        oluwasayo

                        I also have this issue. JBoss EAP 6.1.0 final. Please help!

                        • 9. Re: JBOSS AS 7 deploys war files twice
                          wdfink

                          Hello Oluwaysayo,

                           

                          welcome to the forums.

                          If you have a EAP subsription I recommend to use the CSP to open a support case. If not you should create a new thread here Red Hat JBoss Enterprise Application Platform instead of reactivating this old one.