1 2 Previous Next 20 Replies Latest reply on Mar 11, 2010 8:10 PM by dgolovin Go to original post
      • 15. Re: JBoss AS WTP server adapter removes deployment module
        henk53

        dgolovin wrote:

         

        As said above you have EAR, EJB and WAR projects. Are they just regular WTP projects? Do you have any additional features enabled for those projects?

         

        It mainly concerns an EAR project, which consists of one EJB module and one WAR module. It is absolutely a regular WTP project, although one with a history that goes way back. Originally it was only a MyEclipse web project in 2003, which got upgraded to newer versions of Java, newer versions of MyEclipse, etc. Then at some time it was converted to a MyEclipse EAR project, then converted to a WTP project and then recently the WAR module was renamed.

         

        I think we've been careful to remove all old cruft, basically by creating new projects and copying the resources over, but it's not unthinkable of course that some old stuff lingers behind. I did a check with a newly generated project again to compare configuration files and I couldn't really find anything obvious. If there's any possible suspected config file for which I need to post its content, please let me know.

         

        I don't really have a lot of additional features enabled, just the standard JSF facet. I also don't have a lot of plug-ins installed. My installation consists of Eclipse Java EE edition, JBoss AS Tools (just the server adapter) and the Subversive SVN plug-in (latest, instead of the 3.5 semi-bundled one). One thing that is ruled out is my computer, OS or Eclipse installation, since I encounter the problem at two totally different workstations (one OS X based, one Ubuntu based).

         

        The thing with creating the JIRA issue is that it's fairly hard to reproduce, although it seems to happen most often if I initially changed some files while the server was running, then stop the server, change some more files and then start it again. If it's allowed to create such 'vague' issues, with difficult to reproduce problems, I'll put that in the issue.

         

        Since we actually have two different issues here and Jan seems to have more details about the issue where a recently saved file actually appears as-if it had been made a deployable artifact, I think it's better that he creates an issue for that. I'll create another issue then about the case where the deployment still looks alright and where a simple clean fixes matters again.

         

        Would that be alright?

        • 16. Re: JBoss AS WTP server adapter removes deployment module
          dgolovin

          If I do everything like you did I get the same problem. I think " This session lasted for a few hours" is key condition here. I made several attempts to reproduce it 4 hours ago and now I got back and start JBossTools again, changed several files and get exactly the same problem. Application (seam web project in WAR deployment) failed to start and only changed files were deployed.

           

          I have no idea what happened, going to check that, but at least I can confirm that this problem really exists.

          • 17. Re: JBoss AS WTP server adapter removes deployment module
            dgolovin

            henk53 wrote:

            The thing with creating the JIRA issue is that it's fairly hard to reproduce, although it seems to happen most often if I initially changed some files while the server was running, then stop the server, change some more files and then start it again. If it's allowed to create such 'vague' issues, with difficult to reproduce problems, I'll put that in the issue.

            I've opened issue https://jira.jboss.org/jira/browse/JBIDE-6024 for your problem because it is the only I was able to replicate, fill free to comment it. I'm trying to debug what's going on here now I have workspace that has this issue for any deployment. I just need to do: Full Publish to restore deployment, then stop server, change one file and start server. It gets me to the same problem, when only last changed file is deployed.

            • 18. Re: JBoss AS WTP server adapter removes deployment module
              maxandersen

              i've updated jira with the current info we got - its hard to reproduce and possibly hard to fix so we expect to go forward with GA and do what we can in fixing this (until now, corner case) ASAP in a .z release.

               

              note: full publish or using zipped archives exist as a workaround for this issue which seam to only affect EAR's and only if publish and compilation happens at the same time.

               

              if you find some other case or simpler steps to reproduce it please let us know ASAP in the jira! thanks!

              • 19. Re: JBoss AS WTP server adapter removes deployment module
                dgolovin

                I have fixed this issue or part of it locally. Problem was in EAR, EJB and WAR modules "publish state". For some reason when EAR gets "full publish event"  and changes state to "full publish" from WTP EJB or WAR modules might be in "incremental publish" state. That forces JstPublisher nuke everything in ear-deploy folder and publish all ear content again. Ear content is resources and modules. Resources seems to be published correctly because they have the same publish state as ear but EJB and WAR could be in "Incremental publish" state and that mean only last changes are deployed.

                The fix for this is simple:

                JstPublisher class should not just blindly call full or incremental  publish depending on module publish state but verify if deployment  folder exists. If it is then do incremental publish if is not do full  publish.

                 

                Index: jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
                ===================================================================
                --- jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java     (revision 20695)
                +++ jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java     (working copy)
                @@ -92,7 +92,11 @@
                                     if (publishType == FULL_PUBLISH ) {
                                          status = fullPublish(module, module[module.length-1], monitor);     
                                     } else if (publishType == INCREMENTAL_PUBLISH) {
                -                         status = incrementalPublish(module, module[module.length-1], monitor);
                +                         if(getDeployPath(module, this.server).toFile().isDirectory()) {
                +                              status = incrementalPublish(module, module[module.length-1], monitor);
                +                         } else {
                +                              status = fullPublish(module, module[module.length-1], monitor);
                +                         }
                                     } 
                                }
                           }
                
                
                • 20. Re: JBoss AS WTP server adapter removes deployment module
                  dgolovin
                  I've found exact scenario to replicate this issue see my comment on the issue. The workaround is start "Full Publish" action from context menu in Servers View on EAR project. It fixes the issue until eclipse restarted.
                  1 2 Previous Next