0
votes

I have created a roo project with GWT with the following commands in the roo shell (after creating the new project in the IDE):

persistence setup --database H2_IN_MEMORY --provider HIBERNATE
database properties set --key database.url --value jdbc:h2:tcp://localhost/~/roo_crm
database reverse engineer --package ~.domain --schema PUBLIC
web gwt setup

I then fix a pom error by letting eclipse do the quick fix and change "ignore" to "execute" ( this is a well known issue and this was one of the possible fixes).

I start the tc Server with the application.

I select App.gwt.xml, right-click, run as Web Application and I get this error:

Starting Jetty on port 8888 [WARN] EXCEPTION java.lang.ClassNotFoundException: com.crmco.crm.server.CustomRequestFactoryServlet at java.lang.ClassLoader.findClass(ClassLoader.java:358) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:352) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337) at org.mortbay.util.Loader.loadClass(Loader.java:91) at org.mortbay.util.Loader.loadClass(Loader.java:71) at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:73) 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:1093) at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:836) at com.google.gwt.dev.DevMode.main(DevMode.java:311) [WARN] failed requestFactory javax.servlet.UnavailableException: com.crmco.crm.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:1093) at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:836) at com.google.gwt.dev.DevMode.main(DevMode.java:311) [WARN] Failed startup of context com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload@d018d8{/,C:\Users\XXX\Documents\workspace-sts\crm\target\crm-0.1.0.BUILD-SNAPSHOT} javax.servlet.UnavailableException: com.crmco.crm.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:1093) at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:836) at com.google.gwt.dev.DevMode.main(DevMode.java:311) [WARN] No startup URLs supplied and no plausible ones found -- use -startupUrl

I have been searching for a workaround for this issue with no luck.

2
You are trying to run the XML file? That doesn't sound right. But, from the error message, it looks like your classpath is not correctly setup in your Jetty server.CodeChimp
@CodeChimp Yes, the xml file. I am just following this guide actually: spring-roo-repository.springsource.org/… page 36. The database is correctly built and running.DPM

2 Answers

0
votes

I was finally able to get it working. In the latest version of Roo I needed an additional command that didn't appear in my tutorial:

web gwt all --proxyPackage ~.client.proxy --requestPackage ~.client.request

I had some errors when opening the application in the browser, but that probably does not have anything to do with my previous error and at least the application seems to display in the browser.

0
votes

I have similar issues when using eclipse. I haven't nailed down when it happens, but I think the gwt-unitCache directory gets messed up by eclipse.

Manually deleting the gwt-unitCache directory before re-launching seems to work (most of the time).