延迟绑定失败错误 [英] Deferred binding failed error

查看:201
本文介绍了延迟绑定失败错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法解决这个例外。我试图在GWT展示中的gwt中实现单元格表。下面是我的例外。

I am unable to solve this exception. I am trying to implement the cell table in gwt which is in GWT showcase. Below is my exception.

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)

我在这里下面的部分。

I am getting here in the below part..

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


推荐答案

这可能是几件事首先检查你有没有 DatabaseConstants.properties 文件来存储这些值,接下来确保键 contactDatabaseCategories 存在并且具有逗号分隔的值列表。也可以创建常量作为一个独立的类

This could be a few things first check you have a DatabaseConstants.properties file to store the values, next ensure that the key contactDatabaseCategories exists and has a comma separated list of values. Also might have to create the constants as a stand alone class

UPDATE

将接口移动到它自己的.java文件中
在您内部创建一个名为 DatabaseConstants.properties 的文本文件,该文件位于与.java文件相同的级别
可以放入

Move the interface to it's own .java file Create a text file called DatabaseConstants.properties at the same level as the .java file within that you can put

contactDatabaseCategories=Category1,Category2

这应该会阻止该错误并为您提供更多信息的价值,请参阅常量

That should stop that error and provide you a value for more information take a look at constants

这篇关于延迟绑定失败错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆