您好我尝试Serialize我的枚举类,但是当我尝试编译我的项目时我遇到了错误。
这是我简单的枚举:
import com.google.gwt.user.client.rpc.IsSerializable;
public enum ConversationType implements IsSerializable {
PAIR, GROUP, ALL;
ConversationType() {
}
}
我的pom依赖项中也有gwt-user:
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>2.5.0</version>
<scope>provided</scope>
</dependency>
在该项目中,我有其他DTO对象,该对象实现了IsSerializable。 当我从那个枚举中删除IsSerializable时一切都很好。
这是我的错误:
An exception has occurred in the compiler (1.7.0_13). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you.
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for com.google.gwt.user.client.rpc.IsSerializable not found
答案 0 :(得分:3)
所有枚举都可以通过GWT-RPC进行序列化,那么为什么要在IsSerializable
触发错误的情况下让它实现javac
?