GWT serialization policy file
I have a GWT2.6.1 application. I uses a RPC call. I defined service, serviceAsync, serviceImpl. But I consistently got following errors:
INFO: javax.servlet.ServletContext log: logLevelServlet: ERROR: The serialization policy file '/analytics/E4322B1E292CEFFC5E147EAE677D2BFF.gwt.rpc' was not found; did you forget to include it in this deployment?
com.google.appengine.tools.development.ApiProxyLocalImpl log INFO: javax.servlet.ServletContext log: logLevelServlet: ERROR: The serialization policy file '/analytics/E4322B1E292CEFFC5E147EAE677D2BFF.gwt.rpc' was not found; did you forget to include it in this deployment?
com.google.appengine.tools.development.ApiProxyLocalImpl log INFO: javax.servlet.ServletContext log: logLevelServlet: Downloaded serialization policy from http://localhost:9876/policies/E4322B1E292CEFFC5E147EAE677D2BFF.gwt.rpc
EPARecord.java
public class EPARecord implements Serializable {
private static final long serialVersionUID = -6723643433565890894L;
private String timeStamp;
private String logLevel;
private String event;
private String comment;
public EPARecord(){}
public String getTimeStamp() {
return timeStamp;
}
public void setTimeStamp(String timeStamp) {
this.timeStamp = timeStamp;
}
public String getLogLevel() {
return logLevel;
}
public void setLogLevel(String logLevel) {
this.logLevel = logLevel;
}
public String getEvent() {
return event;
}
public void setEvent(String event) {
this.event = event;
}
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
}
LogLevelService.java
@RemoteServiceRelativePath("loglevel")
public interface LogLevelService extends RemoteService {
EPARecord[] getEAPRecords(String level) throws IllegalArgumentException;
}
LogLevelServiceAysnc.java
public interface LogLevelServiceAsync {
void getEAPRecords(String level, AsyncCallback<EPARecord[]> callback) throws IllegalArgumentException;
}
I cleard browser cache, and I clear the project and rebuild it. It always give the same erorr. I suppose EPARecord file has all String attributes and it is serializable. And in remote interface, it transfer array of EPARecord, it shall be ok without customerized implementation of serializable.
我收到一些问题。如果您已将“name ='com.google.gwt.user.theme.clean.Clean'”代码行继承到* .gwt.xml文件中,则可以将其删除并再次运行您的应用程序。
I had this problem when I wanted to connect to the local database with the GAE application. When I recreated my applications without GAE the problem disappeared.
链接地址: http://www.djcxy.com/p/51080.html上一篇: 什么是C#中的“闭包”?
下一篇: GWT序列化策略文件