Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22

Thread: Trouble importing grails project into STS 2.5.1

  1. #11
    Join Date
    May 2010
    Posts
    398

    Default

    The error you are getting indicates some kind of problem initializing the "Grails classpath container". This is how STS configures the internal Groovy compiler's classpath.

    All of the other problems are most likely a result of the classpath container problem.

    The question is... why is the classpath container broken? We have to figure that out.

    Can you try doing "Grails Tools >> Refresh Dependencies". This will force an update of the classpath container. In the version you have, errors from that operation will only get logged in the error log (I only yesterday put in a little fix that will make errors from the refresh dependcies popup in a message box shown to the users, which may hopefully help in the future to know when/why something isn't working).

    So after trying that can you check the error log (Go to "Window >> Show View >> Other >> Error Log") and see if there are any errors? Post what you find here.
    Kris De Volder -- SpringSource

  2. #12
    Join Date
    May 2010
    Posts
    398

    Default

    Also, make sure you have a Grails install configured in your workspace, you probably did this already, but I just wanted to make sure :-)

    Go to "Window >> Preferences >> Grails" and make sure you have a version of Grails configured there that matches the version in your project's "application.properties".
    Kris De Volder -- SpringSource

  3. #13

    Default

    Hi my grails versions are okay - 1.3.6, I have double checked those. This is what I got in the error log after trying 'Grails tools -> Refresh dependencies':


    Code:
    org.eclipse.core.runtime.CoreException: Command failed, see details for output.
    at com.springsource.sts.grails.core.launch.SynchLaunch$LaunchResult.getCoreException(SynchLaunch.java:150)
    at com.springsource.sts.grails.core.launch.SynchLaunch.synchExec(SynchLaunch.java:51)
    at com.springsource.sts.grails.commands.GrailsCommand.synchExec(GrailsCommand.java:154)
    at com.springsource.sts.grails.commands.GrailsCommand.synchExec(GrailsCommand.java:112)
    at com.springsource.sts.grails.commands.GrailsCommandUtils.refreshDependencies(GrailsCommandUtils.java:318)
    at com.springsource.sts.grails.core.internal.classpath.GrailsClasspathContainerUpdateJob.runInWorkspace(GrailsClasspathContainerUpdateJob.java:74)
    at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
    Contains: ------System.out:-----------
    
    Contains: ------System.err:-----------

    This is what I got after executing 'Grails Tools -> Grails Plugin Manager':

    Code:
    org.eclipse.core.runtime.CoreException: Command failed, see details for output.
    at com.springsource.sts.grails.core.launch.SynchLaunch$LaunchResult.getCoreException(SynchLaunch.java:150)
    at com.springsource.sts.grails.core.launch.SynchLaunch.synchExec(SynchLaunch.java:51)
    at com.springsource.sts.grails.commands.GrailsCommand.synchExec(GrailsCommand.java:154)
    at com.springsource.sts.grails.commands.GrailsCommand.synchExec(GrailsCommand.java:112)
    at com.springsource.sts.grails.core.internal.classpath.GrailsPluginsListManager.generateList(GrailsPluginsListManager.java:212)
    at com.springsource.sts.grails.ui.internal.dialogues.GrailsPluginManagerDialogue$5.run(GrailsPluginManagerDialogue.java:809)
    at com.springsource.sts.grails.ui.internal.tasks.SynchUITask$1.run(SynchUITask.java:66)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
    Contains: ------System.out:-----------
    
    Contains: ------System.err:-----------

    Code:
    Unable to find or generate plugins list in: null
    An exception stack trace is not available.

  4. #14
    Join Date
    May 2010
    Posts
    398

    Default

    Hmm... I haven't seen something like that exactly before.

    The error output in both cases showed that Grails commands didn't really execute. Otherwise there would be some output under "System.out". If there's some problem executing grails commands in your setup, naturally none of the grails stuff will work.

    Note that having a grails install configured in your workspace is different than having it installed on your hard drive. (You probably knew that, just making sure :-)

    All I can think is maybe the install you have configured is pointing to an invalid location, or a location which for some reason causes problems. To make absolutely sure it is a valid install, can you go to Windows >> Preferences >> Grails and configure it again. If it is already there, just add a new one, point it to your grails install directory, and then delete the old one. I just want to make sure that you haven't accidentally got some old configuration of a Grails install that points to a no longer valid location on your hard drive.

    Also, can you post the exact path where your Grails install lives (sometimes if it is an unusual location, this can trigger latent bugs that otherwise don't happen).

    Kris
    Last edited by Kris De Volder; Dec 23rd, 2010 at 01:14 PM.
    Kris De Volder -- SpringSource

  5. #15

    Default

    Hi, My problems are fixed after looking into this thread - http://forum.springsource.org/showthread.php?t=82361 and this issues - https://issuetracker.springsource.com/browse/STS-796. I wonder why this issue is still unresolved?

  6. #16
    Join Date
    May 2010
    Posts
    398

    Default

    I'm glad you got it fixed.

    I'm sorry this caused you so much problems.

    Rest assured that I'll personally make sure this issue (STS-796) gets addressed soon. As your case shows, though the issue won't affect everyone, it can be very annoying and hard to debug when it does.
    Kris De Volder -- SpringSource

  7. #17
    Join Date
    Jan 2011
    Posts
    1

    Default

    Add grails/dist and grails/lib directories in your build class path. That worked for me.

  8. #18
    Join Date
    Nov 2007
    Posts
    3

    Default The problem I had was that the imported project was using grails 1.3.6

    But on the machine I was importing the project, I had 1.3.7 installed. The solution was as follows:
    1. Right click on the project in the Package Explorer.
    2. Select Grails.
    3. The grails installation will be empty. In the drop down, select your grails installation.
    4. Click OK.

    That should do the trick. I had to then run 'refresh dependencies' to complete a failed install of one of the plugins.

  9. #19
    Join Date
    May 2010
    Posts
    398

    Default

    The errors you describe are to be expected if there are non entries under the "Grails Dependencies" node. (I.e you get lots of problems if the .jar dependencies that are supposed to be there are not).

    Try running Grails "Refresh Dependencies" on the project (in the Grails Tools context menu). See if that fixes the problem or you get some error messages.
    Kris De Volder -- SpringSource

  10. #20
    Join Date
    Nov 2007
    Posts
    3

    Default

    I originally tried to run 'refresh dependencies' but because the grails installation was empty - it was failing. After setting the grails installation - the 'refresh dependencies' did the job.

    Thanks,
    Chaviv.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •