8 Replies Latest reply on Jun 13, 2009 9:07 AM by gonorrhea

    Hot deployment again ...

    redflo

      Hi,


      i'm new to seam but it gets more and more frustrating. The most frustrating point is hot deployment. As i read that it only works with WAR, i dropped my project and created a new one - i'm using eclispe 3.4.2 and seam tools 3.01. I moved all Entities and recreated pages from entities. Then i had a problem with the EntityManager and jndi. With some modifications on components.xml and persistence.xml i got everyting running on JBoss AS 5.0.1.
      But hot deployment refused to work. Sometimes i see redeploying in the Server status tab, but nothing changes until i fully redeploy manually.
      Switching to JBoss AS 4.2.3 or 5.1 does not work - again errors with Entity Manager related things.


      Am i doing something completely wrong?

        • 1. Re: Hot deployment again ...
          lvdberg

          Check if your datasource file is deployed also 



          the xxx-ds.xml file



          It should be in your deploy directory after (hot) deploying your application. We found that the main cause of problems. Although seam-gen creates it, it isn't deployed automatically!


          When its not deployed, do an file export from within Eclipse (right-click on the file - export) directly into your


          JBOSS_HOME/server/default/deploy 



          directory.


          See if that the problem first.


          Leo

          • 2. Re: Hot deployment again ...
            redflo

            Thanks for the answer.


            The ...ds.xml got deployed. I just checked and if i edit a file, it gets incrementally deployed, but if i reload the web page in the browser i get the page without recent modification. Probably this is a jboss as 5.0.1 bug?

            • 3. Re: Hot deployment again ...
              lvdberg

              Don't think so,


              we have it working with all Jboss-servers, but so now and then it refuses work and we need to restart the server.

              • 4. Re: Hot deployment again ...
                redflo
                Just to be sure: If the changed files appear in $JBOSS_DIR/server/default/deploy/myproject.war then i should see the changes in my browser? I can not see that, and it never works. I'm pretty sure jboss caches the data. Probably i forgot to set another switch somewhere :-(

                Can you switch between jboss AS versions without changing files in your project? I cannot.
                • 5. Re: Hot deployment again ...
                  redflo

                  Replying to myself: Found a unresolved issue: JBAS-6722 and it seems, that hot deployment works with other JBoss AS Versions - even with 5.0.0

                  • 6. Re: Hot deployment again ...
                    superfis

                    I've switched to JBossAS 5.1.0.CR (from 5.0.1.CR) and it looks like it also can't hot-deploy seam components :(

                    • 7. Re: Hot deployment again ...
                      gonorrhea

                      Use 5.0 or 5.2.



                      There will not be a 5.1.1, moving to 5.2 for now

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

                      • 8. Re: Hot deployment again ...
                        gonorrhea

                        Florian Gleixner wrote on Jun 11, 2009 16:18:


                        Hi,

                        i'm new to seam but it gets more and more frustrating. The most frustrating point is hot deployment. As i read that it only works with WAR, i dropped my project and created a new one - i'm using eclispe 3.4.2 and seam tools 3.01. I moved all Entities and recreated pages from entities. Then i had a problem with the EntityManager and jndi. With some modifications on components.xml and persistence.xml i got everyting running on JBoss AS 5.0.1.
                        But hot deployment refused to work. Sometimes i see redeploying in the Server status tab, but nothing changes until i fully redeploy manually.
                        Switching to JBoss AS 4.2.3 or 5.1 does not work - again errors with Entity Manager related things.

                        Am i doing something completely wrong?


                        Incremental hot deployment is covered in the Seam ref doc and SiA book.  I have successfully hot deployed xhtml, pages.xml, CSS, graphics files using 4.2.x and ant explode



                        incremental hot deployment of static web resources, JSF views (JSP or Facelets) and page descriptors, and JavaBean components.


                        Seam supports incremental redeployment of JavaBean components. To make use of this functionality, you must deploy the JavaBean
                        components into the WEB-INF/dev directory, so that they will be loaded by a special Seam classloader, instead of by the WAR or EAR classloader.

                        Have you enabled debug mode in components.xml like this?  <core:init debug="true">


                        and this in web.xml to enable xhtml hot deployment:


                        <context-param>
                        <param-name>facelets.DEVELOPMENT</param-name>
                        <param-value>true</param-value>
                        </context-param>




                        Facelets will not read a view template more than one time unless it’s running in development mode.

                        Show the stack trace for the exceptions involving the EntityManager.