-
2. Re: Issues with Seam 2.2.0 and JBAS 5.1.0GA
jaikiran Aug 5, 2009 12:54 AM (in response to clerum)The issue with auto-redeploy whenever you touch any xml file in the metadata location (which includes META-INF, WEB-INF etc...) is sort of known and somewhat a feature http://lists.jboss.org/pipermail/jboss-development/2009-June/014478.html. But i am not sure whether that feature should be provided by default.
Earlier versions of JBoss (prior to AS5) would just check for files like application.xml, web.xml for changes. I haven't given this a try but probably editing this section of JBOSS_HOME/server/< instance-name>/conf/bootstrap/profile.xml:<bean name="MetaDataStructureModificationChecker" class="org.jboss.deployers.vfs.spi.structure.modified.MetaDataStructureModificationChecker"> <constructor> <parameter><inject bean="MainDeployer" /></parameter> </constructor> <property name="cache"><inject bean="StructureModCache" /></property> <property name="filter"><bean class="org.jboss.system.server.profile.basic.XmlIncludeVirtualFileFilter" /></property> </bean>
to use a different "filter" like :<bean name="MetaDataStructureModificationChecker" class="org.jboss.deployers.vfs.spi.structure.modified.MetaDataStructureModificationChecker"> <constructor> <parameter><inject bean="MainDeployer" /></parameter> </constructor> <property name="cache"><inject bean="StructureModCache" /></property> <property name="filter"> <!-- A pattern matching filter. We can configure this to our custom pattern. Here we configure it to include only application.xml and web.xml for modification check (and any subsequent redeployments) --> <bean class="org.jboss.system.server.profile.basic.PatternIncludeVirtualFileFilter"> <constructor> <!-- Remember, the parameter is a regex so use the correct syntax as below --> <parameter class="java.lang.String">application.xml|web.xml</parameter> </constructor> </bean> </property> </bean>
might avoid these redeployments when you change any arbitrary xml file. Give it a try and let us know how it goes.
However now I'm seeing my exploded ear undeploy/redeploy every time the build.xml does a explode even if no files are changing.
I'm sorry, i didn't get this. What exactly do you mean by build.xml does a explode? Does it explode the ear contents to the deployed application (in deploy folder of AS)? If yes, then it would mean that the timestamp of the files deployed in the application (including the xmls in the metadata location) would change. This effectively would lead to redeployments.
As for the Seam related deployment issues, i guess changing the "filter" setting that i mentioned earlier in this post should probably take care of those too. But i am not sure, because there are various hooks in the current AS for Seam related deployments which i don't really know about :) -
3. Re: Issues with Seam 2.2.0 and JBAS 5.1.0GA
alesj Aug 5, 2009 8:15 AM (in response to clerum)"jaikiran" wrote:
As for the Seam related deployment issues, i guess changing the "filter" setting that i mentioned earlier in this post should probably take care of those too. But i am not sure, because there are various hooks in the current AS for Seam related deployments which i don't really know about :)
To clear the confusion a bit:
- http://seamframework.org/Documentation/WhatHappensWhenYouDeploySeamAppInJBoss5 -
4. Re: Issues with Seam 2.2.0 and JBAS 5.1.0GA
clerum Aug 5, 2009 10:13 AM (in response to clerum)
I'm sorry, i didn't get this. What exactly do you mean by build.xml does a explode? Does it explode the ear contents to the deployed application (in deploy folder of AS)? If yes, then it would mean that the timestamp of the files deployed in the application (including the xmls in the metadata location) would change. This effectively would lead to redeployments.
The behavior I'm used to in JBAS 4.2.3 is with a project created by seam-gen, a build.xml file is created which explodes the project as an ear to the depoly directory of the AS.
However with seam debug settings on the project doesn't undeploy/deploy. It hot deploys the .xhtml files. This included the view pages ie home.xhtml and the nagvigation control pages ie pages.xml. Thus you get rapid developent as a change to an xml/xhtml file involved with the presentation layer is changed and active instantly.
However with 5.1.0GA this isn't occurring aa change to an .xhtml page causes the project to undeploy/redepoly. -
5. Re: Issues with Seam 2.2.0 and JBAS 5.1.0GA
jaikiran Aug 5, 2009 10:49 AM (in response to clerum)"clerum" wrote:
However with 5.1.0GA this isn't occurring aa change to an .xhtml page causes the project to undeploy/redepoly.
Can you try this:
- Deploy your exploded application to AS 5.1.0 manually (copy/paste to deploy folder)
- Start the server
- Once the server is completely started, go and change the .xhtml file in the deployment (in the deploy folder). Change can be anything, we just want the last updated time to change on that file. And i guess this xhtml is not directly in WEB-INF or META-INF folders?
Do these steps result in a undeploy/deploy of the entire application? -
6. Re: Issues with Seam 2.2.0 and JBAS 5.1.0GA
clerum Aug 5, 2009 4:20 PM (in response to clerum)So I should remove the SeamMTMatcher bean from seam-deployers-jboss-beans.xml first?
Otherwise I get a continuous redeployment loop. -
7. Re: Issues with Seam 2.2.0 and JBAS 5.1.0GA
clerum Aug 5, 2009 4:37 PM (in response to clerum)I tried t with the SeamMTMatcher removed and edited a xhtml file and it did not force a redepolyment.
The file was jboss-5.1.0.GA\server\default\deploy\sirius.ear\sirius.war\layout\template.xhtml -
8. Re: Issues with Seam 2.2.0 and JBAS 5.1.0GA
alesj Aug 6, 2009 3:45 AM (in response to clerum)"clerum" wrote:
I tried t with the SeamMTMatcher removed and edited a xhtml file and it did not force a redepolyment.l
You should try with SeamMTMatcher *present*. -
9. Re: Issues with Seam 2.2.0 and JBAS 5.1.0GA
jaikiran Aug 6, 2009 4:28 AM (in response to clerum)"clerum" wrote:
So I should remove the SeamMTMatcher bean from seam-deployers-jboss-beans.xml first?
As Ales says, the SeamMTMatcher should be present."clerum" wrote:
Otherwise I get a continuous redeployment loop.
Yes, that's a bug (which has been fixed by JBDEPLOYER but not available in AS-5.1.0). As we already discussed sometime back in the other thread, it is caused by having non .xml files in the metadata folders (like META-INF, WEB-INF). From what i remember in your other thread, the files which were causing this issue were some backup files (name starts with a . so probably will be hidden) created by some IDE. Try removing those from the metadata folders (META-INF, WEB-INF). That should prevent the continuous redeployment.
And feel free to post other details if that does not work.
-
10. Re: Issues with Seam 2.2.0 and JBAS 5.1.0GA
jaikiran Aug 6, 2009 4:35 AM (in response to clerum)"jaikiran" wrote:
it is caused by having non .xml files in the metadata folders (like META-INF, WEB-INF). From what i remember in your other thread, the files which were causing this issue were some backup files (name starts with a . so probably will be hidden) created by some IDE.
The culprit files probably are *.jsfdia or *.spdia (example: WEB-INF/.pages.xml.spdia). Removing those from your application should workaround the continuous redeploy issue. -
11. Re: Issues with Seam 2.2.0 and JBAS 5.1.0GA
alesj Aug 6, 2009 4:54 AM (in response to clerum)"jaikiran" wrote:
Yes, that's a bug (which has been fixed by JBDEPLOYER but not available in AS-5.1.0).
Like Jaikiran says, this was fixed in JBDEPLOY-192,
which is part of Deployers 2.0.8.GA, whereas AS_5.1.0.GA uses 2.0.7.GA. -
12. Re: Issues with Seam 2.2.0 and JBAS 5.1.0GA
pmuir Aug 6, 2009 8:20 AM (in response to clerum)I updated the FAQ http://www.seamframework.org/Documentation/WhatHappensWhenYouDeploySeamAppInJBoss5#H-TheQuickFixes to include the fixes Jaikiran and Ales detailed.
Clerum, are you able to test updating manually the deployers from 2.0.7 to 2.0.8 in JBoss AS? I'm trying to see if there any docs for this atm. -
13. Re: Issues with Seam 2.2.0 and JBAS 5.1.0GA
clerum Aug 6, 2009 12:42 PM (in response to clerum)I've made the changes that Pete suggested in the http://www.seamframework.org/Documentation/WhatHappensWhenYouDeploySeamAppInJBoss5#H-TheQuickFixes
I removed the .pages.xml.spdia file from my WEB-INF
I deleted line 100 from the profile.xml and replaced the filter @ line 82 with suggested filter.
Unfortunately I'm till getting the redeployment loop.
Also I made sure the SeamMTMatcher is enabled.
Where should I go from here? -
14. Re: Issues with Seam 2.2.0 and JBAS 5.1.0GA
clerum Aug 6, 2009 12:44 PM (in response to clerum)Here are the lines from the server.log
Not sure if the admin-console was undeploying before the changes either.2009-08-06 16:31:14,058 INFO [org.apache.coyote.http11.Http11Protocol] (main) Starting Coyote HTTP/1.1 on http-0.0.0.0-8080 2009-08-06 16:31:14,079 INFO [org.apache.coyote.ajp.AjpProtocol] (main) Starting Coyote AJP/1.3 on ajp-0.0.0.0-8009 2009-08-06 16:31:14,088 INFO [org.jboss.bootstrap.microcontainer.ServerImpl] (main) JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 52s:18ms 2009-08-06 16:31:19,713 INFO [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (HDScanner) undeploy, ctxPath=/admin-console 2009-08-06 16:31:19,734 INFO [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (HDScanner) undeploy, ctxPath=/sirius 2009-08-06 16:31:19,758 INFO [org.jboss.jpa.deployment.PersistenceUnitDeployment] (HDScanner) Stopping persistence unit persistence.unit:unitName=sirius.ear/sirius.jar#sirius 2009-08-06 16:31:19,759 INFO [org.hibernate.impl.SessionFactoryImpl] (HDScanner) closing 2009-08-06 16:31:19,759 INFO [org.hibernate.tool.hbm2ddl.SchemaExport] (HDScanner) Running hbm2ddl schema export