tags:

views:

1135

answers:

4

For some unknown reason HDScanner started a deploy-undeploy infinite loop for my (exploded) application deployment, removing and adding it again and again every 15 seconds or so.

I already tried to remove the application by hand (I normally use seam restart or seam unexplode) and also removed the whole contents of the jboss-5.1.0.GA/server/default/tmp directory to no avail.

I restarted the server, did a clean build and even rolled back a few versions of the application to make sure it was nothing that I have modified.

Apparently the problem is only affecting my application, since I'm able to deploy and use the seam hotel booking example.

Google found me an similar issue logged in JBoss JIRA:

https://jira.jboss.org/jira/browse/JBAS-7114

I couldn't confirm that I have the same issue since apparently the person who reported the bug was debugging Jboss server's code, something I would rather avoid learning how to do right now.

The only workaround I found was to deploy the application as a regular ear archive (which makes for a lot slower development cycle).

Has anyone seem this problem or know how to fix it?

A: 

Use an unexploded ear, exploded ears usually causes strange issues in jboss. Yes, I know it's slower.

A: 

Found 1 more workaround:

Change the scan period of hdscanner from 5 seconds to 10min (or more), in:

\jboss-5.1.0.GA\server\default\deploy\hdscanner-jboss-beans.xml

From:

 <property name="scanPeriod">5000</property>

To:

<property name="scanPeriod">500000</property>

And a temporary solution (until JBoss produces a new release) see:

Deployment cycle goes into infinite loop

Apparently if any file not ending in .xml is present in WEB-INF/ the auto-deploy goes nuts. If you edit faces-config.xml or pages.xml in eclipse, it will automatically create some files ending in *.jsfdia or *.spdia causing the problem.

To fix:

  • Stop the server
  • go to /server/default (or the directory you choose to deploy the app)
  • un-deploy the application (remove the exploded directory from /deploy)
  • remove the contents of /data, /tmp and /work directories
  • make sure there is nothing but .xml files in WEB-INF
  • start the server again
  • re-deploy

If you need to edit one of the mentioned deployment descriptors, use another editor or make sure you remove the eclipse auto-generated files.

Cleber Goncalves
A: 

Thanks. I have the same problem. And when I removed the *.jsfdia or *.spdia files in WEB-INF, it works normal and didnot undeploy and deploy loop.

Thanks.

John Lu
+1  A: 

I use Seam for a very short time, but I have just encoutered this problem. I remove the *.jsfdia or *.spdia files in ant in build.xml file in this way:

    <!-- 
        Delete files: .faces-config.xml.jsfdia and .pages.xml.spdia which are created after
        editing faces-config.xml and pages.xml files in /resources/WEB-INF catalogue. 
        Files: .faces-config.xml.jsfdia and .pages.xml.spdia cause that deployment 
        cycle goes into an infinite loop. 
    -->
    <delete>
        <fileset dir="${basedir}/resources/WEB-INF">
            <include name=".faces-config.xml.jsfdia"/>
            <include name=".pages.xml.spdia"/>
        </fileset>
    </delete>


It is a part of build.xml file:

<target name="war" depends="compile"
    description="Build the WAR structure in a staging directory">
            <delete>
        <fileset dir="${basedir}/resources/WEB-INF">
            <include name=".faces-config.xml.jsfdia"/>
            <include name=".pages.xml.spdia"/>
        </fileset>
    </delete>
    <!-- delete element should be in this XML element: target .... then is a lot of   
     code -->
 </target>

It works. I hope it will be helpful for you. Any comments welcome.

Cheers!

Adam
That way you can edit is freely in Eclipse and it will 'self heal' during the build? Neat! :)What versions or Seam and Jboss are you using? I was hoping this would be fixed in the current release
Cleber Goncalves