gpt4 book ai didi

GWT2.2 java.lang.RuntimeException : Deferred binding failed for a class (did you forget to inherit a required module? )

转载 作者:行者123 更新时间:2023-12-04 21:12:13 25 4
gpt4 key购买 nike

我正在使用 gwt 2.2,遇到以下异常:18:43:48.896 [错误] [dms] 无法通过延迟绑定(bind)创建“package.DMS”的实例

java.lang.RuntimeException: Deferred binding failed for 'package.client.FileServiceAsync' (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 person.tanjinfu.dms.client.DMS.<init>(DMS.java:61)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:465)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:375)
at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:183)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:510)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
at java.lang.Thread.run(Thread.java:619)
Caused by: com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:503)
at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
at com.google.gwt.core.client.GWT.create(GWT.java:98)
at person.tanjinfu.dms.client.DMS.<init>(DMS.java:61)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:465)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:375)
at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:183)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:510)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
at java.lang.Thread.run(Thread.java:619)

有没有人可以帮助我?

最佳答案

您应该在同步接口(interface)上使用 GWT.create(),如 GWT.create(FileService.class)。您的异常看起来像,您正在创建一个非异步接口(interface)。即使您在创建时传入了 Sync 接口(interface),GWT 也会返回一个实现 Async 接口(interface)的实例。

还要确保您的同步接口(interface)扩展了 RemoteService 接口(interface)。

关于GWT2.2 java.lang.RuntimeException : Deferred binding failed for a class (did you forget to inherit a required module? ),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5948979/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com