我试图让下面的类持久化,但是得到一个UnexpectedException。我省略了班级的后一部分。
package com.bingehopper.server;
import java.util.Date;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
import com.bingehopper.client.VenueDetails;
import com.google.appengine.api.users.User;
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Venue {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long id;
@Persistent
private User user;
@Persistent
private VenueDetails venue;
@Persistent
private Date createDate;
public Venue()
{
this.createDate = new Date();
}
public Venue(User user, VenueDetails venue)
{
this();
this.user = user;
this.venue = venue;
}
}
以下是错误日志:
com.google.appengine.tools.development.ApiProxyLocalImpl log
SEVERE: javax.servlet.ServletContext log: Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract void com.bingehopper.client.VenueService.addVenue(com.bingehopper.client.VenueDetails) throws com.bingehopper.client.NotLoggedInException' threw an unexpected exception: java.lang.IllegalArgumentException: venue: com.bingehopper.client.VenueDetails is not a supported property type
VenueDetails是我在客户端软件包中创建的一个类。如果我希望它继续存在,我可以不在Venue类中使用VenueDetails对象变量吗?或者有办法使它工作?我以前没有GWT的经验,也不确定我是否正确地接近这一点。谢谢你的帮助。