Announcement Announcement Module
Collapse
No announcement yet.
STS 2.91 fails creating Grails project with install-plugin gwt Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • STS 2.91 fails creating Grails project with install-plugin gwt

    I'm a newbie, so I'm learning lots of moving pieces all at once. The problem occurs when I create a new Grails project and then do install-plugin gwt. I get a compile error that com.goog.gwt.user.client.rpc does not exist.

    I've tried this many times and always fail in the same way.
    1. Fresh install of 2.9.1 (or 2.9.2)
    2. Install Extensions: Google Plugin for Eclipse, Grails, Grails Support
    3. File -> New -> Grails Project
    4. Right click on the new project, choose Grails Tools -> Open Grails Command Prompt
    5. Type install-plugin-gwt

    6. I get the following output in the console
    | Loading Grails 2.0.4
    | Configuring classpath.
    | Environment set to development.....
    | Resolving plugin gwt. Please wait...
    | Installing zip gwt-0.6.1.zip.....
    | Installed plugin gwt-0.6.1
    | Resolving plugin JAR dependencies.....
    | Plugin installed.

    7. Then a popup "Problem Occurred" box:
    'Updating Grails dependencies for project 'test4'' has encountered a problem. (quotes exactly as shown)
    Command terminated with an error code (see details for output)

    8. The details are:

    Command terminated with an error code (see details for output)
    ------System.out:-----------
    | Loading Grails 2.0.4
    | Configuring classpath.
    | Environment set to development.....
    | Installing zip svn-1.0.0.M1.zip.....
    | Installed plugin svn-1.0.0.M1
    | Resolving plugin JAR dependencies.....
    | Compiling 56 source files.
    | Error Compilation error: startup failed:
    Compile error during compilation with javac.
    /Users/keithg/.grails/2.0.4/projects/test4/plugins/gwt-0.6.1/src/java/grails/plugins/gwt/client/GwtActionService.java:3: package com.google.gwt.user.client.rpc does not exist
    import com.google.gwt.user.client.rpc.RemoteService;
    ^
    /Users/keithg/.grails/2.0.4/projects/test4/plugins/gwt-0.6.1/src/java/grails/plugins/gwt/client/GwtActionService.java:12: cannot find symbol
    symbol: class RemoteService
    public interface GwtActionService extends RemoteService {
    ^
    /Users/keithg/.grails/2.0.4/projects/test4/plugins/gwt-0.6.1/src/java/grails/plugins/gwt/client/GwtActionServiceAsync.java:3: package com.google.gwt.user.client.rpc does not exist
    import com.google.gwt.user.client.rpc.AsyncCallback;
    ^
    /Users/keithg/.grails/2.0.4/projects/test4/plugins/gwt-0.6.1/src/java/grails/plugins/gwt/client/GwtActionServiceAsync.java:11: cannot find symbol
    symbol : class AsyncCallback
    location: interface grails.plugins.gwt.client.GwtActionServiceAsync
    <T extends Response> void execute(Action<T> action, AsyncCallback<T> callback);
    ^
    Note: /Users/keithg/.grails/2.0.4/projects/test4/plugins/gwt-0.6.1/src/java/org/codehaus/groovy/grails/plugins/gwt/XMLJUnitResultFormatter.java uses unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    4 errors
    1 error
    ------System.err:-----------

    Thank you for any help and suggestions.

  • #2
    Some additional information:
    1. I'm using os x 10.6.8
    2. I have tried this as described above and also with both GWT_HOME exported and GRAILS_HOME exported in my .bash_profile
    3. From the command line (outside of STS) I can successfully do the following:
    a. cd /projects/test
    b. grails create-app GwtTutorial
    c. grails install-plugin gwt

    So, I'm guessing that it appears to be something in STS that is not picking up some path or environment setting.

    Any help is greatly appreciated.

    Comment


    • #3
      Hi Keith,

      I'm not really familiar with GWT plugin...

      But I found this via a Google search:
      http://waynedge.blogspot.ca/2012/02/...tup-notes.html

      BTW: the one thing I can add to that is that on his 'note 2'. There *is* in fact a mechanism in recent versions of STS to set Java system properties for all your grails commands / processes at once via a preferences page. Go to

      Windows >> Preferences >> Groovy >> Grails >> Grails Launch. There's place there to add system properties. These will get added to all commands you run from STS.

      Though I am not certain of this, I think GWT will check both for a system property or an ENV variable called GWT_HOME. So if you add your GWT_HOME that will probably work for you. (Let me know if it does, for future reference when other people ask :-)

      You should not have to set GRAILS_HOME (the Grails tools already take care of this, if you configured a grails install in your workspace).

      Kris

      Comment


      • #4
        Hi Kris,

        First, thank you very much for responding.

        I am pleased to report that after several days and *many* reinstalls I have just now got it to work. Although I had GWT_HOME defined in my .bash_profile, it was not being picked up by STS. It did not work even when I had gwt installed as part of the Google Plugin for Eclipse extension. So, what I needed to do was to create an environment.plist file and put it in ~/.MacOSX directory. (I had to create that directory). I used Xcode to create the .plist, but I think it is just a plain xml file as I was able to edit it with a text editor. Here is what my environment.plist file looks like:

        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
        <dict>
        <key>GWT_HOME</key>
        <string>/Developer/Devtools/Google/gwt-2.4.0</string>
        <key>GRAILS_HOME</key>
        <string>/usr/share/java/grails-2.0.3/</string>
        </dict>
        </plist>

        In STS preferences I pointed the Google -> Web Toolkit to my /Developer/Devtools/Google/gwt-2.4.0 directory

        This now works.

        It is interesting what you report about system properties and Grails Launch. That may be helpful to me going forwards.

        Thanks again, Keith

        Comment

        Working...
        X