11 Replies Latest reply on Nov 13, 2011 9:55 AM by jaikiran pai

    JBoss 7 keeps re-deploying.

    Tony Herstell Master

      I use MyEclipse10 (It has to be 10+ for JBoss7) and this has exploded deployment.



      For the past few YEARS I (and the teams) have been able to change code/pages and through the "magic" of exploded deployment; just re-fresh the page and see instant reults (No Build/Deploy/Loss of place in a multi page wizard etc. etc.).



      Although not perfect...

         as changing an .xml (like messages.xml) OR Method Signiture usually means (or requires) a re-start of the server;

      this was incredibly useful and provided an incredibly productive work environment.



      Now; I am keen to move the teams onto J6EE (+CDI and Seam 3) and have been researching if JBoss 7 is capable of doing this as well as JBoss 5.x.



      Basically; I cannot even seem to change an xhtml page without JBoss forcing a redeploy...



      16:28:22,719 INFO  [org.jboss.jpa] (MSC service thread 1-1) stopping Persistence Unit Service 'kitchensink.war#primary'

      16:28:22,720 INFO  [org.hibernate.tool.hbm2ddl.SchemaExport] (MSC service thread 1-1) HHH00227:Running hbm2ddl schema export

      16:28:22,722 INFO  [org.jboss.weld] (MSC service thread 1-14) Stopping weld service

      16:28:22,723 INFO  [org.hibernate.tool.hbm2ddl.SchemaExport] (MSC service thread 1-1) HHH00230:Schema export complete

      16:28:22,736 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-14) Stopped deployment kitchensink.war in 21ms

      16:28:22,737 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) Starting deployment of "kitchensink.war"

      16:28:22,873 INFO  [org.jboss.jpa] (MSC service thread 1-9) read persistence.xml for primary


      After this re-deploy it appears all data is wiped in the conversation/session; its like re-starting the server with all that lost productivity.

      what I get, when refreshing the page, is a 500 with this in the logs (view cannot be restored):



      16:28:23,632 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 1) Replaced deployment "kitchensink.war" with deployment "kitchensink.war"

      16:43:31,002 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/kitchensink].[Faces Servlet]] (http-- Servlet.service() for servlet Faces Servlet threw exception: javax.faces.application.ViewExpiredException: viewId:/index.xhtml - View /index.xhtml could not be restored.

                at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:200) [jsf-impl-2.0.4-b09-jbossorg-4.jar:2.0.4-b09-jbossorg-4]

                at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.0.4-b09-jbossorg-4.jar:2.0.4-b09-jbossorg-4]

                at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:111) [jsf-impl-2.0.4-b09-jbossorg-4.jar:2.0.4-b09-jbossorg-4]


      I am trying to double guess what JBoss does and in the file standalone.xml I changed auto-deploy-exploded to False; but something keeps turning it back to True!


      deployment-scanner name="default" path="deployments" scan-enabled="true" scan-interval="5000" relative-to="jboss.server.base.dir" auto-deploy-exploded="true" deployment-timeout="60"





      Since the War is exploded in the C:\jboss-as-web-7.0.1.Final\standalone\deployments directory and I am 'effectively' updating THOSE files directly (by the Magic of MyEclipse) then I think you can still do what you did in JBoss 5.x.



      Please advise as this is a bit of show stopper and will kill our production capability.



      I can supply the J6EE "kitchensink" project (reworked so can be used through exploded deployment in MyEclipse) if required.