Wednesday, May 26, 2010

How To: GWT 2.1 and SpringSource Tool Suite (STS)

In this two-part screencast you are going to see how to install and use the SpringSource Tool Suite with a Google Web Toolkit to develop a working web application. Screencast is based on Gooogle I/O 2010 presentation with detailed step by step instructions how to install and use STS with GWT 2.1


Install and configure SpringSource Tool Suite (03:00):

Create a simple GWT/Roo application: (02:50):

Second screencast is derived from Google I/O example by Ben Alex:

If you liked this post please share it with others.

17 comments:

Tiago Fernandez said...

That's great for getting up to speed with the Roo/GWT mix. Thanks!

Tiago Fernandez said...

Just to add an additional remark: if you go with Java 1.5 you end up with:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.validation.beanvalidation.LocalValidatorFactoryBean#0': Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException

The solution is switch to Java 1.6.

Furlan said...

Good screencast of Roo + GWT. We can see how fast it is to create a great web app.

Jewel said...

Hi, I tried to download and install the spring eclipse IDE but getting error when when installing the google plugin. I am very interested to see the application code that you generated. Is it possible to send me the code of the sample application that you generated. here is my email tojewel at gmail.com

Geoff said...

@Tiago,
I ran into the same thing. That exception is a problem with the hibernate validations. You can fix it by adding Jaxb references to the POM, run on Java 6, or wait for Roo 1.1 where it's supposed to be fixed (with a new version of Hibernate included).

thescreencast said...

@Jewel I've sent you the project.

Ravi Sharma said...

Hi,
I am following the steps exactly mentioned here. But after enabling maven depsendency when i try to run the project it gets compilation problem.
It seems not all the files are being generated
In Scaffold.java, once java file is not found
com.next.roo.test.gwt.ui.ListActivitiesMapper (my project dir is com.next.roo.test) and if i go into
package com.next.roo.test.gwt.ui then i see only two files there
1) ApplicationKeyNameRenderer
2) ListPlaceRenderer
but i dont find ListActivitiesMapper, am i missing anything?.
Thanks in advance
Ravi

Hy Coup said...

When I try to run the application, I get...


javax.servlet.ServletException: Circular view path [resourceNotFound]: would dispatch back to the current handler URL [/app/resourceNotFound] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)
at org.springframework.web.servlet.view.InternalResourceView.prepareForRendering(InternalResourceView.java:275)
at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:214)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1060)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:285)
at org.mortbay.jetty.servlet.Dispatcher.error(Dispatcher.java:135)
at org.mortbay.jetty.servlet.ErrorPageErrorHandler.handle(ErrorPageErrorHandler.java:121)
at org.mortbay.jetty.Response.sendError(Response.java:274)...

Who's Next said...

I can´t get STS to show me the datanucleous or google plugin update :(

ANy ideas why this may be happening?

Frankipanki said...

I have the same Problem! After installing STS and using the extension tab - I can't find data nucleus and the gwt item in the list please help!!!

keir.badger said...

I have just download 2.3.3M1 and am having the same problem as Who's Next and Frankipanki. The Data Nucleus and GWT are not appearing in the extensions list.
Although I am behind a firewall I have managed to select/download/install the Mantis extension
Hope someone can help - not sure all three of us are missing something obvious
Thanks

Anonymous said...

Ola!I have the same problem.Can somebody be nice and provide help...

yurec said...

yes, it works.
Thx

Anonymous said...

found your site on del.icio.us today and really liked it.. i bookmarked it and will be back to check it out some more later

Nare said...

Hey
I tried with information in many blogs but it works with yours
Thanks l lot

ciggic said...

Hey it works ya Thanks a lot

Anonymous said...

I just tried it with STS 2.7.1 and failed. The screens were different and the java code would not compile with errors like:

C:\sts-wsp\demo\src\main\java\com\one\two\server\gae\UserServiceLocator.java:13:0::0 UserService cannot be resolved to a type
error at final UserService service = UserServiceFactory.getUserService();
^^^^^^^^^^^^^^^
C:\sts-wsp\demo\src\main\java\com\one\two\server\gae\UserServiceLocator.java:13:0::0 UserServiceFactory cannot be resolved