2 Replies Latest reply on Mar 1, 2016 6:38 AM by Barbara De Vido

    War not deployed correctly on container restart

    Barbara De Vido Newbie

      Hi,

      I have the following problem with a war with rest services deployed on Fuse 6.2.1

      My war is quite "complex", it has a quartz scheduler inside which is not restarted on container restart and also a rest service that become unavailable on restart.

      The war version is a snapshot, do not know it this matter.

       

      I have a profile assigned to a container.

      I start the container and then deploy a war in the profile. The container "sees" the new war and the war is correctly deployed with all its services started.

      Then I stop the container.

      When I restart the container the updateagent states that there are no changes in the deployment and the war is not deployed correctly. I can reach the jsp and static resource, but the rest services and quartz are not running.

       

      I tried to refresh the profile, but no changes.

       

      The only thing that seems to work is to remove the war from the profile and then add it back again.

       

      Does anyone know the reason of this behaviour?

        • 1. Re: War not deployed correctly on container restart
          Sundar Munirathnam Rajendran Newbie

          Can you post the logs on restart , I have seen this happening on redeploy of the war ( on snapshots specifically), but not on start and stop of Fuse.I guess that the necessary dependencies are not resolving.

          • 2. Re: War not deployed correctly on container restart
            Barbara De Vido Newbie

            Hi,

             

            I found out that the behaviour doesn't occured all the time.

            Yesterday it did not happen, but this morning when I start the container the webapp failed to be deployed.

             

            Looking carefully at the log, I saw some errors, like it is not getting the configuration, but I have not changed anything in the last two days. Just stop all the container yesterday evenging and restart them this morning.

            The complete log is attached. The application not deploying is "error-handler".

            2016-03-01 09:55:01,877 | INFO  | pool-1-thread-2  | PropertyPlaceholderConfigurer    | 191 - it.mytria.web.error-handler - 1.0.0.F621-SNAPSHOT | Loading properties file from ServletContext resource [/profile:ehappconf.properties]
            2016-03-01 09:55:01,966 | ERROR | pool-1-thread-2  | ContextLoader                    | 191 - it.mytria.web.error-handler - 1.0.0.F621-SNAPSHOT | Context initialization failed
            java.lang.IllegalArgumentException: name
                 at sun.misc.URLClassPath$Loader.findResource(URLClassPath.java:494)[:1.7.0_79]
                 at sun.misc.URLClassPath.findResource(URLClassPath.java:176)[:1.7.0_79]

            Few minutes after it states "no deployment change" but the wepapplication is not available.

            2016-03-01 09:57:50,182 | INFO  | 6.0.1-1-thread-1 | Agent                            | 86 - io.fabric8.fabric-agent - 1.2.0.redhat-621084 | No deployment change.
            2016-03-01 09:57:50,430 | INFO  | 6.0.1-1-thread-1 | DeploymentAgent                  | 86 - io.fabric8.fabric-agent - 1.2.0.redhat-621084 | Validating baseline information
            2016-03-01 09:57:53,953 | INFO  | 6.0.1-1-thread-1 | Agent                            | 86 - io.fabric8.fabric-agent - 1.2.0.redhat-621084 | Done.

            The I restarted the container and the webapp was deployed.