春天roo和gwt

时间:2011-10-15 05:32:24

标签: gwt spring-roo

我正在试验GWT和Roo。我使用Roo反向设计了一个数据库并启用了搭建GWT。在脚手架期间,我得到了几个这样的警告:

  

通过字段>'getMedias'在类型ca.cbc.msb.console.Category中使用的类型java.util.Set的路径需要添加到模块的gwt.xml文件中才能使用在代理中。   通过字段>'getSponsors'在类型ca.cbc.msb.console.Category中使用的类型为java.util.Set的路径需要添加到模块的gwt.xml文件中,以便在代理中使用

然后我运行应用程序并尝试浏览它时出现以下错误

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396)
at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:525)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.RuntimeException: Deferred binding failed for 'ca.cbc.msb.console.client.scaffold.ioc.DesktopInjector' (did you forget to inherit a required module?)
at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:53)
at com.google.gwt.core.client.GWT.create(GWT.java:97)
at ca.cbc.msb.console.client.scaffold.ioc.DesktopInjectorWrapper.getInjector(DesktopInjectorWrapper.java:8)
at ca.cbc.msb.console.client.scaffold.Scaffold.onModuleLoad(Scaffold.java:17)
... 9 more
Caused by: com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:595)
at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:455)
at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
... 12 more

有人知道这里发生了什么吗?

1 个答案:

答案 0 :(得分:2)

我假设你正在使用Roo 1.2.0.M1 默认情况下,GWT仅查找〜.client和〜.shared包。您可以尝试编辑.gwt.xml以包含带有源标记的包,但我没有运气这样做。我不得不开始我的项目并做 database reverse engineer --package ~.client.domain虽然我可能应该使用〜.shared.domain。

然后

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

我实际上不得不经常运行那一次。 Roo似乎没有按照正确的顺序创建事物并且错过了一半