GWT 托管模式无法加载模块,但生成的战争可以在其他地方运行

发布于 2025-01-05 22:10:13 字数 4118 浏览 0 评论 0原文

我正在为我的 GWT 项目使用 maven-gwt-plugin 和 ext-gwt,当我想按照此处的建议在 Eclipse 中运行托管模式时: http://mojo.codehaus.org/gwt-maven-plugin/user-guide/hosted.html 我收到以下消息:

16:47:13.063 [ERROR] [tempoui] Unable to load module entry point class net.stinfoservices.axsens.tempo.ui.client.TempoUI (see associated exception for details)
java.lang.RuntimeException: Deferred binding failed for 'com.extjs.gxt.ui.client.image.XImages' (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:98)
    at com.extjs.gxt.ui.client.GXT.<clinit>(GXT.java:37)
    at com.extjs.gxt.ui.client.util.Theme.<clinit>(Theme.java:44)
    at net.stinfoservices.axsens.tempo.ui.client.TempoUI.onModuleLoad(TempoUI.java:28)
    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:662)
Caused by: java.lang.IncompatibleClassChangeError: Found interface com.google.gwt.core.ext.typeinfo.JClassType, but class was expected
    at com.google.gwt.user.rebind.ui.ImageBundleGenerator.getValidUserType(ImageBundleGenerator.java:367)
    at com.google.gwt.user.rebind.ui.ImageBundleGenerator.generate(ImageBundleGenerator.java:142)
    at com.google.gwt.core.ext.GeneratorExtWrapper.generate(GeneratorExtWrapper.java:48)
    at com.google.gwt.core.ext.GeneratorExtWrapper.generateIncrementally(GeneratorExtWrapper.java:60)
    at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:647)
    at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
    at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:78)
    at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:268)
    at com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind(ShellModuleSpaceHost.java:141)
    at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:585)
    at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:455)
    at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
    at com.google.gwt.core.client.GWT.create(GWT.java:98)
    at com.extjs.gxt.ui.client.GXT.<clinit>(GXT.java:37)
    at com.extjs.gxt.ui.client.util.Theme.<clinit>(Theme.java:44)
    at net.stinfoservices.axsens.tempo.ui.client.TempoUI.onModuleLoad(TempoUI.java:28)
    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:662)

然而,如果我 mvn clean install 并将生成的战争放在外部码头上,它就可以工作。

我真的很想使用托管模式,因为它可以节省开发时间。

这是我的 pom.xml: http://pastebin.com/xPwCkw2c

有人能告诉我我做错了什么吗或者发生了什么事?

谢谢您的宝贵时间。

I'm using maven-gwt-plugin and ext-gwt for my GWT project and when I want to run the hosted mode in eclipse as advised here: http://mojo.codehaus.org/gwt-maven-plugin/user-guide/hosted.html I got the following message:

16:47:13.063 [ERROR] [tempoui] Unable to load module entry point class net.stinfoservices.axsens.tempo.ui.client.TempoUI (see associated exception for details)
java.lang.RuntimeException: Deferred binding failed for 'com.extjs.gxt.ui.client.image.XImages' (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:98)
    at com.extjs.gxt.ui.client.GXT.<clinit>(GXT.java:37)
    at com.extjs.gxt.ui.client.util.Theme.<clinit>(Theme.java:44)
    at net.stinfoservices.axsens.tempo.ui.client.TempoUI.onModuleLoad(TempoUI.java:28)
    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:662)
Caused by: java.lang.IncompatibleClassChangeError: Found interface com.google.gwt.core.ext.typeinfo.JClassType, but class was expected
    at com.google.gwt.user.rebind.ui.ImageBundleGenerator.getValidUserType(ImageBundleGenerator.java:367)
    at com.google.gwt.user.rebind.ui.ImageBundleGenerator.generate(ImageBundleGenerator.java:142)
    at com.google.gwt.core.ext.GeneratorExtWrapper.generate(GeneratorExtWrapper.java:48)
    at com.google.gwt.core.ext.GeneratorExtWrapper.generateIncrementally(GeneratorExtWrapper.java:60)
    at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:647)
    at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
    at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:78)
    at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:268)
    at com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind(ShellModuleSpaceHost.java:141)
    at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:585)
    at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:455)
    at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
    at com.google.gwt.core.client.GWT.create(GWT.java:98)
    at com.extjs.gxt.ui.client.GXT.<clinit>(GXT.java:37)
    at com.extjs.gxt.ui.client.util.Theme.<clinit>(Theme.java:44)
    at net.stinfoservices.axsens.tempo.ui.client.TempoUI.onModuleLoad(TempoUI.java:28)
    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:662)

However, if I mvn clean install and put the generated war on an external jetty it works.

I really want to use the hosted mode since it's a gain of development time.

Here is my pom.xml: http://pastebin.com/xPwCkw2c

Can someone tell me what am I doing wrong or what is going on?

Thank you for your time.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

挽清梦 2025-01-12 22:10:13

不兼容的类更改表明您的类路径上有两个不同版本的 GWT - 但仅在开发模式下,如果战争有效,则不在编译时。你如何运行开发模式?您正在使用相当旧版本的 GWT(以及 gwt-maven-plugin) - 您是否可能尝试从包含更新版本的 GWT 的 IDE 运行开发模式?

最近的重大变化发生在 GWT 2.0 和 GWT 2.2.0 中。根据您获得的 GXT 副本,您可能仅与 GWT 2.0 直到 2.1.x 兼容。来自 http://www.sencha.com/products/extgwt/downloads/< 的较新版本的 GXT /a> 包含三个 jar,一个用于 GWT 2.0 之前的版本,一个用于 2.0 到 2.2 之间的版本,一个用于 2.2 及更高版本的版本。

The incompatible class change is an indication that you have two different versions of GWT on your classpath - but only at dev mode, not at compile time if the war works. How are you running dev mode? You are using a fairly old version of GWT (and gwt-maven-plugin too) - is it possible that you are trying to run dev mode from your IDE which is including a more recent version of GWT?

The recent breaking changes occurred at GWT 2.0 and GWT 2.2.0. Depending on which copy of GXT you are getting, you might only be compatible with GWT 2.0 until 2.1.x. Newer versions of GXT from http://www.sencha.com/products/extgwt/downloads/ include three jars, one for before GWT 2.0, one for between 2.0 and 2.2, and one for 2.2 and beyond.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文