【问题标题】:Deferred binding failed error延迟绑定失败错误
【发布时间】:2013-08-06 01:51:49
【问题描述】:

我无法解决此异常。我正在尝试在 GWT 展示中的 gwt 中实现单元格表。以下是我的例外。

16:22:23.853 [ERROR] [celltablepagination] Unable to load module entry point class com.igs.celltablepagination.client.CellTablePagination (see associated exception for details)
java.lang.RuntimeException: Deferred binding failed for 'com.igs.celltablepagination.client.ContactDatabase$DatabaseConstants' (did you forget to inherit a required module?)
    at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:53)
    at com.google.gwt.core.shared.GWT.create(GWT.java:57)
    at com.google.gwt.core.client.GWT.create(GWT.java:85)
    at com.igs.celltablepagination.client.ContactDatabase.<init>(ContactDatabase.java:321)
    at com.igs.celltablepagination.client.ContactDatabase.get(ContactDatabase.java:304)
    at com.igs.celltablepagination.client.ContactInfoForm.<init>(ContactInfoForm.java:52)
    at com.igs.celltablepagination.client.CellTablePagination.onModuleLoad(CellTablePagination.java:30)
    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:406)
    at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
    at java.lang.Thread.run(Thread.java:662)
Caused by: com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
    at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:605)
    at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:465)
    at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
    at com.google.gwt.core.shared.GWT.create(GWT.java:57)
    at com.google.gwt.core.client.GWT.create(GWT.java:85)
    at com.igs.celltablepagination.client.ContactDatabase.<init>(ContactDatabase.java:321)
    at com.igs.celltablepagination.client.ContactDatabase.get(ContactDatabase.java:304)
    at com.igs.celltablepagination.client.ContactInfoForm.<init>(ContactInfoForm.java:52)
    at com.igs.celltablepagination.client.CellTablePagination.onModuleLoad(CellTablePagination.java:30)
    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:406)
    at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
    at java.lang.Thread.run(Thread.java:662)

我在下面的部分到达这里..

   interface DatabaseConstants extends Constants {
        String[] contactDatabaseCategories();
    }
    DatabaseConstants constants = GWT.create(DatabaseConstants.class);

【问题讨论】:

  • 真的没有其他日志吗? (尤其是之前 [ERROR] 消息)

标签: gwt


【解决方案1】:

这可能是一些事情,首先检查您有一个 DatabaseConstants.properties 文件来存储值,然后确保键 contactDatabaseCategories 存在并且具有逗号分隔的值列表。也可能必须将常量创建为独立类

更新

将接口移至它自己的 .java 文件 在 .java 文件的同一级别创建一个名为 DatabaseConstants.properties 的文本文件 里面可以放

contactDatabaseCategories=Category1,Category2

这应该会停止该错误并为您提供一个值以获取更多信息,请查看constants

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2012-05-12
  • 1970-01-01
  • 2013-08-09
  • 2014-12-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-02-23
相关资源
最近更新 更多