Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-3137

Update "First Project - Roo Standalone" example on Spring Roo homepage

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 1.2.1.RELEASE
    • Fix Version/s: 1.2.4.RELEASE
    • Component/s: @ RESOURCES
    • Environment:
      Replicated on two environments:
      1. Windows 7 host, JDK 1.6,0_25, Maven 3.0.4, Spring Roo 1.2.1 Release, GWT 2.4.0
      2. Ubuntu 10.04 VirtualBox guest , JDK 1.6..0_26, Maven 3.0.4, Spring Roo 1.2.1 Release, GWT 2.4.0

      Description

      The "First Project - Roo Standalone" example on the Roo homepage is out of date and does not work.

      I am a complete n00b to Spring Roo and just tried it out today for the first time. I followed the "First Project - Roo Standalone" instructions as shown on the homepage and was very disappointed to see that it failed on the last step ("roo> perform tests").

      The error I received was as follows:
      [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:exec (default) on project foo: Command execution failed. Process exited with an error: -1(Exit value: -1) -> [Help 1]
      [ERROR] o>
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR] o>
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

      Attempting to run "mvn test" from the command line yielded the following error:
      error: Could not find root type com.foo.client.managed.request.ApplicationRequestFactory

      The ApplicationRequestFactory.java file did not exist.

      As I am a n00b to both Roo and GWT, I spent a lot of trawling through the forums (wihout much success) as I found very similar problems around GWT 2.4 and Roo but none of which solved this issue for me.

      I eventually came across some documentation on http://static.springsource.org/spring-roo/reference/html/base-gwt.html - it told me which files I should have after running the "gwt setup" command but they weren't present in my directory structure. The GWT documentation page in the Roo reference seems to be out of date/incorrect as well.

      Figure 14.2 in the GWT page in the Roo reference shows the file which I needed to fix my problem but it doesn't do a good job at explaining how it got there (the documentation only mentions generating the *Proxy and *Request classes and the diagram highlights them as such).

      After looking through the command index (http://static.springsource.org/spring-roo/reference/html/command-index.html), I found the one and only fully correct explanation of the GWT commands:
      A.13.2. web gwt all
      Locates all entities in the project and creates GWT requests, proxies and _(MOST IMPORTANTLY)_ creates the scaffold
      web gwt all --proxyPackage --requestPackage
      --proxyPackage
      The package in which created proxies will be placed; no default value (mandatory)
      --requestPackage
      The package in which created requests will be placed; no default value (mandatory)

      Heading back into the Roo console, I typed in:
      web gwt all --proxyPackage com.foo.client.request --requestPackage com.foo.client.request

      And then all the required files were created. Thereafter, running "roo> perform tests" worked perfectly.

      Having not created the scaffold probably seems like a ridiculously simple issue to experienced Roo users, but for someone like me with no prior Roo experience who was just trying to get the most basic example from the homepage working it was not a simple solution.

      Please can someone update the example (on the homepage) to include the command to create the GWT scaffold and ideally update the GWT reference page to correctly display the files generated by "gwt setup" vs. "web gwt all".

        Attachments

          Activity

            People

            Assignee:
            stewarta Alan Stewart
            Reporter:
            esilver Erron Silver
            Votes:
            7 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: