Hi there,
I've been trying to work with Roo, the GWT scaffolding and actually editing the bootstrapped code, as I think this is a very promising feature, combining several amazing tools / frameworks (basically following the Google Code Tutorial.
However I am not altogether too knowledgable in either Maven, GWT or Spring, only highly interested.
Versions:
Roo 1.2.1
Maven 3.0.3
STS 2.8.1
GWT 2.4.0
What does work:
This will start the Jetty "control center", and I can launch my web browser and view the scaffolded sample version in the development mode (that is, with the GWT Developer plugin running in the browser).Code:roo.sh script $ROO_HOME/samples/expenses.roo mvn gwt:run
What does not work:
Importing this project into STS (Google Plugin is installed).
Trying to do so via File->Import->Existing Maven Project leaves me with several error markers in different *DataOnDemand.aj files regarding javax.validation, namely: import cannot be resolved and type cannot be resolved. This - I am guessing - resolves to some wrong interpretation of the pom.xml, as there was no problem with mvn gwt:run from command-line. Funnily enough, these errors will disappear, if i right-click the project->Google->Web Toolkit Settings and switch back and forth between using the default and a specific GWT SDK once.
With these error markes gone, there is still one error left:
This is regarding the following plugin definition in the pom.xml:Code:Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:exec-maven-plugin:1.2:exec (execution: default, phase: process-classes) pom.xml /extrack line 514 Maven Project Build Lifecycle Mapping Problem
I tried substituting certain parts from this usage example from Codehaus, and at some point I managed to get rid of the error, though I can't seem to be able to reproduce that.Code:<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.2</version> <executions> <execution> <phase>process-classes</phase> <goals> <goal>exec</goal> </goals> <configuration> <id>VerifyRequestFactoryInterfaces</id> <executable>java</executable> <arguments> <argument>-cp</argument> <classpath/> <argument>com.google.web.bindery.requestfactory.apt.ValidationTool</argument> <argument>${project.build.outputDirectory}</argument> <argument>${project.groupId}.client.managed.request.ApplicationRequestFactory</argument> </arguments> </configuration> </execution> </executions> </plugin>
Ignoring the error markers and running Right-Click->Run As->Web Application finally produces following error, when trying to acces from a browser:
I cannot gain any information from this, to be honest.Code:[WARN] Failed startup of context com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload@379ba3b3{/,/home/fredrik/dev/projects/extrack/target/extrack-0.1.0.BUILD-SNAPSHOT} javax.servlet.UnavailableException: org.springsource.roo.extrack.server.CustomRequestFactoryServlet at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:79) at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:233) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:616) at org.mortbay.jetty.servlet.Context.startContext(Context.java:140) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:513) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448) at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:468) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:115) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.Server.doStart(Server.java:222) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:672) at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509) at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068) at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811) at com.google.gwt.dev.DevMode.main(DevMode.java:311)
As I have waited for quite some time whether this issue might be resolved with new GWT or Roo versions, but it hasn't: can anyone offer any help? I figure I surely am not the only one trying to edit the default scaffolding in this combination of GWT and Roo in the STS. Is there a different approach I should use?
Also I can't get Maven to produce a working .war file. I've tried the following goals: mvn clean gwt:compuile war:war, but if I load the resulting .war into Tomcat 6, I have had several different kinds of problems - it has never worked though. Doing this with regular GWT projects that have a Maven nature has worked for me though in the past. This is also true for such GWT projects that contained RPC-calls, the Client-Server communication would work not only in development mode, but also when deploying a maven-generated .war.
So, these are a lot of different questions regarding the topic - I hope somebody will have a say on at least a few of these. I would really like to see Roo develop in a way that would make it easier to use especially for people who are not yet experts on the technologies used, as it also offers a perfect way to efficiently learn by "playing around". This would also mean making basic stuff such as this more fool-proof.
Thanks!


Reply With Quote
