0

我无法解决这个异常。我正在尝试在 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);
4

1 回答 1

1

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

更新

将接口移至它自己的 .java 文件 创建一个DatabaseConstants.properties与 .java 文件同级的文本文件,您可以在其中放置

contactDatabaseCategories=Category1,Category2

这应该会停止该错误并为您提供更多信息的值查看常量

于 2013-08-05T11:16:29.437 回答