Hello World… Using Spring Roo 1.1.0M1 under STS 2.3.3M1

The first day’s Google I/O keynote shows how much work has been done to integrate Spring Roo with GWT. Despite the fact that the demo is not smoothly done, it is kind of interesting combination. Before we have to do all the work to integrate Spring + Hibernate + GWT manually, now the work has already been done. Even nicer, it has tight integration with Eclipse, my favorite Java IDE :D.

Unfortunately the information on how to start creating and playing is not integrated and I spent quite some times to finally run a very simple application using all the technologies. Let me share my experience here…

  1. What you need first is an STS 2.3.3M1. It’s not that easy to find, so here is the link: http://www.springsource.com/products/springsource-google-download. Unfortunately, you have to fill the forms as I can’t find another way to download it without filling the form. Warning, you need STS 2.3.3M1 not release 2.3.2.
  2. Next you have to run the installer. I had no problem for this and at the end, the STS is nicely installed on my computer.
  3. Run the STS and put the workspace location as you like.
  4. If you start a new workspace you’ll get something like this:
  5. Just close the Welcome page and you will get something like this:
  6. You’ll need to install DataNucleus Eclipse Plugin and Google Plugin for Eclipse. To do so, go the third tab under the dashboard and select both extensions. Install it and restart the STS.
  7. We can start creating a new project. Create a Roo project with name ‘hello’ and top level package ‘com.hello’. Wait a bit for Maven to download all the dependencies.
  8. You can use Roo Shell to start adding entities to the project. Do following command:
    persistence setup --provider DATANUCLEUS --database HYPERSONIC_IN_MEMORY
    entity --class ~.server.domain.Employee --testAutomatically
    field string --fieldName userName --sizeMin 3 --sizeMax 30
    gwt setup

  9. After that, you should right click on the project and select Google -> Web Toolkit Settings…. And then just click OK. I don’t know what happens but without it the application complain that it can’t find GWT SDK.
  10. Again, right click on the project. Select Maven -> Enable Dependency Management.
  11. Now you can run the application by right click on it and select Run -> Web Application. There you go you got the GWT version of the application.
  12. Alternatively is to run mvn gwt:run from console or from Eclipse.

That’s that!

Join the Conversation


  1. Hi,

    first thank you very much for your blog.
    A small detail: in the point 9. it lacks in “CHECK IN Use Google Web Tool Kit” after “select Google -> Web Toolkit Settings…”.

    After I start this project as Web Application, I get already in Browser an error:
    “Error: Server Error: Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)”. How can I solve it?

    Thank you in advance.

  2. P.S. I use GWT 2.1.1. Beside the error I get a lot of errors at validating newly compiled units (in Eclipse in Development Mode tab for Web Apps):

    Errors in ‘jar:file:/C:/Galileo/plugins/com.google.gwt.eclipse.sdkbundle.2.1.1_2.1.1.v201012170127/gwt-2.1.1/gwt-user.jar!/com/google/gwt/requestfactory/client/impl/AbstractClientRequestFactory.java’
    Line 29: The constructor DefaultRequestTransport() is undefined

    Errors in ‘jar:file:/C:/Galileo/plugins/com.google.gwt.eclipse.sdkbundle.2.1.1_2.1.1.v201012170127/gwt-2.1.1/gwt-user.jar!/com/google/gwt/requestfactory/shared/DefaultProxyStore.java’
    Line 37: No source code is available for type com.google.gwt.autobean.shared.AutoBean; did you forget to inherit a required module?
    Line 38: No source code is available for type com.google.gwt.autobean.shared.Splittable; did you forget to inherit a required module?
    Line 60: No source code is available for type com.google.gwt.autobean.shared.AutoBeanCodex; did you forget to inherit a required module?

Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.