14 Replies Latest reply on Mar 4, 2013 4:57 AM by pete83

    Problem project is not in sync

    pete83

      Hello,

       

      I'm working on a project composed of quite many (>>100) Maven modules (which seems to be a problem by itself for the M2E-plugins performance). I normally have around 50 modules in my workspace (for performance reasons).

       

      Now the actual problem is a constantly reappearing error stating "Cannot change file(s). Project SOME_MODULE is not in sync" whenever I try to rename a method (it may well be a private method in a completely unrelated module, JBoss Dev Studio doesn't care about that...)

       

      In these cases, no error is reported in the Error Log view. Furthermore, refreshing (F5 or context menu) has no effect, neither has "Maven > Update Project Configuration" or "Project > Clean... > Project". Even removing the project from the workspace and reimporting it only helps sometimes.

       

      Note that this is NOT the typical "Resource is out of sync" report that happens when accessing files that changed on the hard drive, this is completely related to whole projects in the workspace. The version I use, is the following:

       

      JBoss Developer Studio

      Version: 5.0.2.GA

      Build id: v20130119-0035-H249-GA

      Build date: 20130119-0035

       

      Notable Plugins:

      m2e - 1.0.200.20111228-1245

      EGit - 1.3.0.201202151440-r

      Subversive SVN Team Provider - 1.0.0.I20121228-1700

       

      I'm happy to provide any further information required. If anybody can help me, I'd be very glad, since this problem is unbelievably annoying (I'm ending up with permanently manually replacing method names since with 50+ modules it's very likely that always one is "out of sync").

       

      Greetings,

      Peter

       

      PS: This problem is also present in other developer machines, so it is not restricted solely to my configuration (even though I seem to have it the most frequently)

        • 1. Re: Problem project is not in sync
          maxandersen

          I've never seen such error.

           

          Could you take a screenshot to show it ?

           

          Can you go to Help > Report a problem  and attach the generated zip file which will contain the error log.

           

          If you don't like that can you see in Error Log View what errors are in there ?

          • 2. Re: Problem project is not in sync
            pete83

            Hallo,

             

            thank you for your reply!!!

            I've attached a screenshot and the error log as described. Nevertheless, as far as I can tell, there is no information at all in the logs about the error... It's weird that I have this error so often while I don't find any information on the net.

             

            Greetings,

            Peter

            • 3. Re: Problem project is not in sync
              snjeza

              I think this is a bug in CDI. Could you try the following:

               

              - right-click the project, select CDI and uncheck the CDI support checkbox

              - call a Rename refactoring

               

              After following these steps, you will, unfortunately, lose the CDI support.

              • 4. Re: Problem project is not in sync
                akazakov

                Snjezana,

                do you mean CDI Tools? Can you reproduce this problem? If yes could you create an issue in JIRA with details.

                Thanks.

                • 5. Re: Problem project is not in sync
                  snjeza

                  Alexey,

                   

                  I haven't succeeded to reproduce the issue.

                  I suppose the issue is comming from the CDI Tools because the "Cannot change file(s). Project <project> not in sync" message is created with the AbstractCDIProcessor.isFileCorrect() and CDISearcher.outOfSynch() method.

                   

                  It is probably necessary to have a more complex project to reproduce the issue.

                  It is also possible that the lombok jar (http://projectlombok.org/) Peter uses, causes the issue because it changes files using a non Eclipse API.

                   

                  Peter,

                   

                  You can also try to remove the following options from the eclipse.ini file:

                   

                  -Xbootclasspath/a:lombok.jar

                  -javaagent:lombok.jar

                   

                  Removing the lombok agent will also improve JBDS performance.

                  • 6. Re: Problem project is not in sync
                    akazakov

                    Thank you,, Snjezana. We need to fix CDI tools. It should ignore unsynchronized files and log such errors with more details. And not bother users blocking UI. We will create an issue for this bug.

                    • 7. Re: Problem project is not in sync
                      dazarov

                      Thank you, Snjezana.

                       

                      I think this is a problem with org.jboss.tools.jsf.ui.el.refactoring.RenameMethodParticipant, but CDI Tools has similar problem.

                       

                      I created an issue - https://issues.jboss.org/browse/JBIDE-13695

                      • 8. Re: Problem project is not in sync
                        pete83

                        Thanks a lot for your answers!!!

                         

                        I've followed the advises to deactivate CDI validation and to remove lombok from the ini file, however this unfortunately doesn't resolve the problem :-(

                        I'm updating Git and building with Maven via the command line, I think this is what "causes" the error (besides that this error shouldn't be causable by anything in this form ;-) ) (my colleague has this problem, too, using Subversion and Maven)

                         

                        Does anybody have another idea for a possible workaround? This is a horrible coding experience :-(

                         

                        Greetings,

                        Peter

                         

                        PS: What is additionally weird, is that no refresh, update project configuration and often even remove and reimport into workspace does help to bring the projects "in sync" again

                        • 9. Re: Problem project is not in sync
                          snjeza

                          You have to refresh the projects in the workspace after every maven build via command line.

                          • 10. Re: Problem project is not in sync
                            pete83

                            Yes, but the problem is, that refresh just doesn't help, neither does project clean nor update project configuration (nor remove and reimport in some cases). That is the confusing part, even if I try, I cannot get rid of it. The only thing working is removing all modules out of sync and then doing the refactoring (because reimport often causes the problem to reappear).

                            • 11. Re: Problem project is not in sync
                              snjeza

                              Is there your workspace on your local disk or you are using some network file server/network file system?

                              • 12. Re: Problem project is not in sync
                                pete83

                                The workspace is on my local disk, except for the vast number of modules nothing really fancy is going on...

                                • 13. Re: Problem project is not in sync
                                  snjeza

                                  Your log shows that the workspace is N:/Workspace/. If N: is a network device, try to add

                                   

                                  -data

                                  C:\workspace

                                   

                                  (or something similar that) to the eclipse.ini before the -vmargs options.

                                   

                                  You also have to close/delete all the projects from the N: network device or move them to the local workspace and reimport them.

                                  • 14. Re: Problem project is not in sync
                                    pete83

                                    N: is a RamDisk that I moved my workspace to, to speed up the setting of the classpath containers & co... It only holds the metadata though, the files are on my local drive C:

                                    I already had the problem, before I move my workspace to the RamDisk though (when metadata and source were residing in the same workspace folder...)