Announcement Announcement Module
No announcement yet.
Can't compile a basic Grails app in STS 3.0.0 - hibernate dependency error Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can't compile a basic Grails app in STS 3.0.0 - hibernate dependency error

    I've installed STS 3.0.0 and the Grails/Groovy extensions on a Windows 7 PC.

    I created a brand new Grails 2.1.0 app using Groovy 1.8 (also tried with 2.0).

    The error I always get is:-

    Command terminated with an error code (see details for output)
     | Loading Grails 2.1.0
    | Configuring classpath.
    | Environment set to development.....
    | Installing zip
    | Installed plugin cache-1.0.0
    | Resolving plugin JAR dependencies.....
    | Installing zip
    | Installed plugin hibernate-2.1.0
    | Resolving plugin JAR dependencies
    | Error Failed to install plugin [hibernate-2.1.0]. Plugin has missing JAR dependencies.
    | Resolving plugin JAR dependencies..
    I can't seem to shake this error no matter what I do. I saw a couple of JIRA reports on similar issues recommending checking proxies (GRAILS-9311)(mine are fine through STS, that's how I downloaded the Grails extension in the first place) and the other is to edit the hibernate plugin to change an antlr dependency from 2.7.7 to 2.7.6 (GRAILS-8506) .

    Anyone have any idea how to fix this please?

  • #2
    If you think the problem could be related to proxy settings, you may need to configure proxies for grails. The proxy settings in STS would only affect things like installing extensions from update sites (i.e. the Grails extension is downloaded by STS, not by Grails).

    Grails commands and apps run as external processes and are not part of the IDE process, so they don't use the same proxy settings as STS itself.

    The fact that you could install/download the grails extension really only implies that STS itself properly communicates through your proxy, it doesn't mean that Grails also does the same.

    I can not give you a definite solution to your problem only some suggestions.

    1) There is a specific command in grails to setup proxies for a given grails project. See here:

    2) If that doesn't work, you can also try setting JVM system properties related to proxies via the Grails Preferences pages accessible via "Windows >> Preferences >> Groovy >> Grails >> Launch". That page has a table of system properties you can add to. Any properties there will be passed on to grails via -Dfoo=bar style arguments.

    Some docs about the potentially relevant system properties are here:



    • #3
      Item 1) worked a treat! Had to remember to run both commands though ! (one to set proxy, other to use it).

      Many thanks Kris!