Java 无法创建ValueProxy

Java 无法创建ValueProxy,java,gwt,requestfactory,Java,Gwt,Requestfactory,我正在尝试创建一个ValueProxy,其中包含有关用户正在执行的搜索的一些基本信息。出于某种原因,GWT希望它成为一个EntityProxy,但我不明白为什么(这个类成为EntityProxy也没有意义) 这导致: java.lang.AssertionError: com.schedgy.trip.dao.filter.trip.proxy.DayFilterProxy is not an EntityProxy type at com.google.web.bindery.requ

我正在尝试创建一个
ValueProxy
,其中包含有关用户正在执行的搜索的一些基本信息。出于某种原因,GWT希望它成为一个EntityProxy,但我不明白为什么(这个类成为EntityProxy也没有意义)

这导致:

java.lang.AssertionError: com.schedgy.trip.dao.filter.trip.proxy.DayFilterProxy is not an EntityProxy type
    at com.google.web.bindery.requestfactory.shared.impl.IdFactory.asEntityProxy(IdFactory.java:66)
    at com.google.web.bindery.requestfactory.shared.impl.IdFactory.createId(IdFactory.java:229)
    at com.google.web.bindery.requestfactory.shared.impl.IdFactory.allocateId(IdFactory.java:41)
    at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext.create(AbstractRequestContext.java:478)
    at com.schedgy.trip.client.activity.TripsActivity.getFilters(TripsActivity.java:56)

有什么想法吗?很明显,我忽略了这一点,因为我在代码的其他地方使用了ValueProxy。

是否可能根本没有从RequestContext引用DayFilterProxy?

是的,我认为是这样的。我只是在RequestContext中引用基本FilterProxy类型。我认为使用GWT2.4,我们可以在请求工厂中使用多态参数?您必须添加一个引用它们的
@ExtraTypes
注释:@Brad我必须添加公共接口分页请求。如果我不这样做,我会得到错误“java.util.List不能在这里使用”。如果您使用EntityProxy而不是ValueProxy,这是相同的。我正在使用GWT2.5.1
// Request is a TripRequest
DayFilterProxy filter = request.create(DayFilterProxy.class);
java.lang.AssertionError: com.schedgy.trip.dao.filter.trip.proxy.DayFilterProxy is not an EntityProxy type
    at com.google.web.bindery.requestfactory.shared.impl.IdFactory.asEntityProxy(IdFactory.java:66)
    at com.google.web.bindery.requestfactory.shared.impl.IdFactory.createId(IdFactory.java:229)
    at com.google.web.bindery.requestfactory.shared.impl.IdFactory.allocateId(IdFactory.java:41)
    at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext.create(AbstractRequestContext.java:478)
    at com.schedgy.trip.client.activity.TripsActivity.getFilters(TripsActivity.java:56)