java - 无法获取类包的类型签名..Line

标签 java gwt objectify

该示例是使用 GWT 和 Objectify 版本 5.0.3 实现的。 当我尝试保存文档实例时会产生这种情况。 我收到错误:

无法获取 Line 类的类型签名

你有一个想法吗?

@SuppressWarnings("serial")

@Entity
public class GenericEntity implements Serializable {

     @Id  protected Long id;

}



@SuppressWarnings("serial")

@Entity

public class Document extends GenericEntity implements Serializable {

     @Index  private String name;

     @Serialize  private List<Session> sessions = new ArrayList<Session>();

}



@SuppressWarnings("serial")

@Entity

public class Session extends GenericEntity implements Serializable {

     private Date date;

     @Serialize  private Vector<Line> transectsH = new Vector<Line>();

     @Serialize  private HashMap<Point, Line> mapperHorizontalLines = newHashMap<Point, Line>();

}



@SuppressWarnings("serial")

@Entity

public class Point extends GenericEntity implements Serializable {

     private double x;

     private double y;

}



@SuppressWarnings("serial")

@Entity

public class Line extends GenericEntity implements Serializable {

     private Point coordinate;

     private Image image;

     private Object data;

}

最佳答案

当您尝试序列化某些内容时,您会收到 GWT 的异常。可能是因为 GWT-RPC 无法序列化 Object 类型声明的内容。

关于java - 无法获取类包的类型签名..Line,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25003814/

相关文章:

css - 如何在悬停时增加 gwt menuitem

java - 统计实体时限制查询结果

java - 如何从普通图像生成 HSL 或 HSI 直方图?

Java字符串格式错误

java - 使用 GWT 和 Spring Security 的条件 UI?

gwt - Js.cast() 如何执行类型检查?

google-app-engine - 在 App Engine Java 上将 Objectify 与 Google Cloud Endpoints 结合使用是否有任何注意事项?

java - 如何使用 Eclipse 将 jar 添加到 Google App Engine?

java - PriorityQueue 有相同优先级的对象

java - GAE 数据存储 : How to store arraylists of custom objects