Announcement Announcement Module
Collapse
No announcement yet.
Updating grails dependencies for project has encountered a problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Updating grails dependencies for project has encountered a problem

    This problem sometimes occurs in my STS/GGTS: it's frustrating because I have to restore a backup copy to let my project come back to work.

    When happens, it seems like plugins disappears, also Grails dependencies..

    I really don't know what introduced this problem. If I get a clone copy from my repository (mercurial) it systematically occurs.

    Any advice?

    Thanks in advance

  • #2
    I will need some more information:

    1. Any relevant entries in error log? Help => Show view -> Other -> Error log
    2. What happens to the project after this happens? Why is it unusable? What happens if you run grails compile on the command line?
    3. What version of Grails and STS/GGTS are you using?

    Comment


    • #3
      I am having the same problem after installing GGTS 3.2.0.M2.

      I have two Grails 2.2.0 projects which were working with GGTS 3.1.0, but now they are unable to refresh dependencies.
      The message I get after a timeout is:
      The command 'GrailsCommand(P/qmon> compile --non-interactive --refresh-dependencies)' was terminated because it didn't produce new output for some time.
      There is nothing in the log from System.out and System.err.

      After the timeout, the project has an error:
      The type groovy.lang.GroovyObject cannot be resolved. It is indirectly referenced from required .class files
      I can build, test and run the project from a command line with no errors (using grailsw).
      I can run 'grailsw compile --non-interactive --refresh-dependencies' from the command line.
      I can also in Eclipse select 'Run As / Grails Command (test-app)' and run all the tests just fine.

      First I tried increasing the timeout from 60 seconds to 120 seconds, but the problem remains.
      I then added proxy properties to the launch configurations because our company is using an HTTP proxy, but it makes no difference.
      When looking at the spawned process with Process Explorer, it seems to be doing nothing. No cpu usage and no IO.
      Maybe it is blocking for some reason?

      Comment


      • #4
        Originally posted by hindsholm View Post
        I am having the same problem after installing GGTS 3.2.0.M2.

        I have two Grails 2.2.0 projects which were working with GGTS 3.1.0, but now they are unable to refresh dependencies.
        The message I get after a timeout is:

        There is nothing in the log from System.out and System.err.

        After the timeout, the project has an error:


        I can build, test and run the project from a command line with no errors (using grailsw).
        I can run 'grailsw compile --non-interactive --refresh-dependencies' from the command line.
        I can also in Eclipse select 'Run As / Grails Command (test-app)' and run all the tests just fine.

        First I tried increasing the timeout from 60 seconds to 120 seconds, but the problem remains.
        I then added proxy properties to the launch configurations because our company is using an HTTP proxy, but it makes no difference.
        When looking at the spawned process with Process Explorer, it seems to be doing nothing. No cpu usage and no IO.
        Maybe it is blocking for some reason?

        In the end I discovered it's caused by inner classes created in Groovy: http://jira.codehaus.org/browse/GRECLIPSE-983

        Comment


        • #5
          > When looking at the spawned process with Process Explorer, it seems to be doing nothing. No cpu usage and no IO.
          Maybe it is blocking for some reason?

          I have very occasionally observed this but not been able to reliably reproduce it to debug.

          It could be something wrong with the new mechanism to try and keep the Grails process active and reuse it. Why it sometimes totally locks up before even seeming to have done anything at all is still mystery to me. If you have a way to reliably reproduce that problem it would be interesting to know how. If I can reproduce I may be able to fix it for the next release.

          As workaround you may be able to just switch back to the older and slower way of executing Grails commands by doing this:
          - Open the preferences via: Windows >> Preferences
          - Go to "Groovy >> Grails >> Grails Launch"
          - Deselect the 'Keep external Grails running' option.

          Comment


          • #6
            > If you have a way to reliably reproduce that problem it would be interesting to know how.

            Well unfortunately I can't really give any specific information about how to reproduce this.
            I have just two Grails applications, and both consistently fail as described above after upgrading GGTS.

            > As workaround you may be able to just switch back to the older and slower way of executing Grails commands by doing this:
            > - Open the preferences via: Windows >> Preferences
            > - Go to "Groovy >> Grails >> Grails Launch"
            > - Deselect the 'Keep external Grails running' option.

            The workaround works perfectly, thank you!
            It might be slower, but I can live with that.

            Comment


            • #7
              > Well unfortunately I can't really give any specific information about how to reproduce this.
              > I have just two Grails applications, and both consistently fail as described above after upgrading GGTS.

              I understand. But I have seen this kind of 'lock up' only occasionally. Usually when I just re-run the command (i.e. invoke 'refresh dependencies' again...) then it usually works. So I never have something that I can observe in a debugger to try and figure what's going on.

              The fact that your projects seem to *always* hit the problem is interesting.

              Any chance you could share these projects with me (even just privately).

              I would only use it for debugging purposes and delete it afterwards.

              Kris

              Comment


              • #8
                > Any chance you could share these projects with me (even just privately).

                I can share one of the projects with you privately, but it is an internal tool which means it has some dependencies to in-house tools that I cannot share. You should be able to run it in test mode with some tweaking though.
                How do I send the project to you?

                /\/\orten

                Comment


                • #9
                  > How do I send the project to you?

                  I PM-ed you via this forum with private contact information.

                  Kris

                  Comment


                  • #10
                    Same problem here - workaround from above ("Deselect the 'Keep external Grails running' option") works.
                    STS 3.2.0.RELEASE, Grails 2.2.1

                    Comment


                    • #11
                      The workaround did not work for me. I am running STS 3.3.0, Grails 2.1.1 and used the workaround ("Deselect the 'Keep external Grails running' option") increased the timeout to 300000 and the command is still getting terminated because it did not produce output for some time. I have imported this project from a folder from another PC and have had this problem since I imported it. Any help would be appreciated. Let me know if you need any more information to give me an answer

                      Comment


                      • #12
                        Mathew, hard to say what is going on. So a few things you can try / answer.

                        1) Does the command produce any output at all before it gets terminated? If yes, what's the output.
                        2) try to collect a stacktrace of the grails process. You can use jps and jstack, commandline tools that ship with JDK. jps can tell you the process id of all jvm processes. The grails process is probably called 'grailsStarter'. When you have the process id, use jstack to dump a stacktrace of the process. Try to catch the trace while the process seems to be 'stuck'. (I.e. after some time has passed, but before the timeout kills it).

                        Hopefully the stacktrace may give a clue why the process is stuck.

                        Comment

                        Working...
                        X