Announcement Announcement Module
Collapse
No announcement yet.
Issues with STS 3.2.0 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Issues with STS 3.2.0

    I've been using STS fine (mostly anyway) for years.

    Since upgrading to Version 3.2.0, I'm having issues that are making STS quite a pain to use:

    1) The IDE is always "reindexing repository X". I keep stopping it and it keeps trying again. I've tried everything to try to get it to stop.

    1b) Often, due to the reindexing, it will run out of memory and then give me an error about having to restart. I say no, and eventually it starts trying to re-index again.

    2) I'm unable to run junit classes.

    Here is the error I'm getting

    | Loading Grails 2.2.1
    | Configuring classpath.
    | Environment set to development.....
    | Error Error executing script TestApp: java.lang.ClassNotFoundException: grails.plugin.spock.test.GrailsSpecTestType (Use --stacktrace to see the full trace)

    Then if I try to run it as a JUnit class directly, I'm told this though I see the class there:

    Class not found com.nexercise.common.UtilitiesHelperTests
    java.lang.ClassNotFoundException: com.nexercise.common.UtilitiesHelperTests
    at java.net.URLClassLoader$1.run(URLClassLoader.java: 202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.j ava:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:3 06)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:2 47)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.loadClass(RemoteTestRunner.java:693)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.loadClasses(RemoteTestRunner.java:429)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRunner.java:452)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.main(RemoteTestRunner.java:197)

    I keep deleting .grails to try to get past this and it worked the first time but no other times.

    Help? :-(
    Last edited by boomie; Apr 26th, 2013, 08:28 PM.

  • #2
    I'm not too familiar with the JUnit execution issue that you are having. I'll let one of my colleagues answer that. But, the reindexing repository is related to git (or egit more specifically). There is an open bug for the reindexing job spinning out of control:

    https://bugs.eclipse.org/bugs/show_bug.cgi?id=376270

    Does this sound like what is happening to you? To be sure this is egit related, you can disconnect all your projects from git and see if it still happens for you. Also, you can run jstack on your spinning GGTS and attach the output here.

    Comment


    • #3
      Also, there's an STS bug open for this already: https://issuetracker.springsource.com/browse/STS-3320

      Comment


      • boomie
        boomie commented
        Editing a comment
        Any updates to this bug? I've tried unsuccessfully going back to older versions, I'm not using Git, and I have to restart STS due to a hang at least 3 times a day. Newer versions have not helped.

    • #4
      Regarding the re-indexing issue, I'm actually using a Mercurial repository on this project (not Git) and even so I disconnected from that. And the repository name it gives me "boomie" isn't even the name of any repositories.

      Is there a way to go back to an old version? These issues make this version almost unbearable, it takes 3 times as long to do anything. :-(

      Comment


      • #5
        Yes, you can always download an old version of STS. Go here http://www.springsource.org/downloads/sts-ggts and click on "Other downloads".

        It would still be nice to get to the bottom of this. The next time you hit the reindexing problem, can you run jstack from the command line and paste the full stack trace here?

        Comment


        • boomie
          boomie commented
          Editing a comment
          Can you give me the exact command line to run jstack? I'm on a Mac and can open a terminal window after STS crashes. Or were you thinking I coudl run jstack inside STS after restarting?

      • #6
        Seems no-one has responded to the the test running problem. Let me give it a shot.

        Are you trying to run an integration test?

        If so, running integration tests probably does not work when you run them as JUnit tests from within STS. This is because Grails integration tests aren't really 'pure' Junit compatible tests. They require some grails specific setup/context. The proper way to run them is by running them with the Grails 'test-app' command.

        To do so, right click on the class / package / project / folder you want to run tests from. Then select the "Run As >> Grails Command (test-app)" option.

        If your test is *not* and integration test but it is in fact a unit test then I would expect "run as >> JUnit test" to work. If it doesn't I'd consider that a bug of some sort and we should follow up on that raising a Jira issue ticket.

        If this is the case, you can probably still run the test with "Run as >> test-app". If that also doesn't work, then it may be a problem with the project or grails itself. One thing worth trying here would be to run the test from the commandline (i.e. outside the IDE) and see if you get a similar error. This would help narrow down if the problem is with STS versus your project or Grails.

        Sorry to have so many 'if then' conditions above. Trying to cover the different possibilities :-)

        Please try some of these things and let me know how it goes.

        Kris

        Comment


        • #7
          Somehow I was not notified of a response.

          I am trying to run Unit tests, the same ones I ran fine before upgrading. Now I get some sort of the indicated error whether I try to run it from the grails command or as JUNit test.

          Comment


          • #8
            Also, "Other downloads" doesn't seem to have any pre-3.2.0 versions

            Comment


            • #9
              > I am trying to run Unit tests, the same ones I ran fine before upgrading.
              > Now I get some sort of the indicated error whether I try to run it from the grails
              > command or as JUNit test.

              Interesting that it used to work before you upgraded.

              To determine whether this is a problem with the GGTS tooling or something else, can you try to run the test-app command from the commandline (i.e. a Windows DOS prompt or Unix Shell, depending your OS).

              If it works on the commandline then we should consider this a bug in the tools. If its not, then the problem lies elsewhere. But let's take it one step at a time.

              Kris

              Comment


              • #10
                I'm getting the same problem with GGTS 3.2 and grails 2.0.4

                And yes, the command line works fine.

                See SO for details http://stackoverflow.com/questions/1...ttype-grails-c

                Any help?


                BTW. Your registration form is total crap, it took me 15 minutes to just register. Not to mention that visually impaired people will be unable to register at all!
                Seriously, unless its your aim to discourage people from providing feedback I suggest you do something about it
                Last edited by jakub.bochenski; May 27th, 2013, 10:26 AM.

                Comment


                • #11
                  Originally posted by jakub.bochenski View Post
                  I'm getting the same problem with GGTS 3.2 and grails 2.0.4

                  And yes, the command line works fine.

                  See SO for details http://stackoverflow.com/questions/1...ttype-grails-c

                  Any help?


                  BTW. Your registration form is total crap, it took me 15 minutes to just register. Not to mention that visually impaired people will be unable to register at all!
                  Seriously, unless its your aim to discourage people from providing feedback I suggest you do something about it
                  It turns out that it's not related (directly at least) to GGTS -- it just happened in command line after a restart too.
                  Sorry for the false alarm.

                  My remark about registration form is still actual though

                  Comment


                  • #12
                    Thanks for clarifying your problem. And for your comment about registration, I'll forward your request over to the web admin.

                    Comment


                    • #13
                      Captcha is now switched to something that reads out the letters. Hope this helps. If you have any more suggestions, feel free to contact me through email [email protected] and I'll direct you to the proper channels. Thanks for your feedback.
                      Last edited by Trevor Marshall; May 27th, 2013, 01:27 PM.

                      Comment


                      • #14
                        Hi Jakob,

                        Sorry you are having such bad experience.

                        > Any help?

                        Well... certainly would like to help you. If you have a reproducible scenario of something that works on the commandline but doesn't in the tooling I'd consider it a bug. We can try to determine the cause of the bug and fix it, as well as try to find a workaround for you.

                        But we cannot really do very much here unless we can reproduce the bug locally.

                        Do you have some steps I can try to reproduce it? If so you can file a bug report and I'll look into it. Or you can just post the details here if singing up to the bugtracker is too much hassle. I'll file the bug on your behalf and look into it.

                        Lacking details... right now I can only make some fuzzy guesses. The stackoverflow output seems to indicate there is some confusion going on with the spock plugin version. This indicates maybe grails is confused about the state of your project's installed plugins. Some thing you can try to 'clean up' are:
                        - delete your ~/.grails folder. (Don't worry, grails will recreate/redownload the content in there when it needs it).
                        - run the 'grails clean' command (you can run it from the grails command prompt in GGTS).
                        - refresh-dependencies (from the Grails project context menu in GGTS).

                        Try these three things (i.e do all of them in the order as suggested above). I'm not sure it will help but its worth a try.

                        Kris

                        Comment


                        • #15
                          > It turns out that it's not related (directly at least) to GGTS -- it just happened in command line after a restart too.
                          Sorry for the false alarm.

                          Oh sorry, you posted this while I was writing my response.

                          No worries about false alarm... The three suggestions about 'cleaning' your project's state may still be useful though. Give it a try :-)

                          Kris

                          Comment

                          Working...
                          X