GWT 2.5.1 and IntelliJ debug mode, serializable exception

我是研究僧i 提交于 2019-12-11 04:03:44

问题


I am running IntelliJ 12.1 for a GWT project. I cannot get the GWT configuration to work, I keep getting a serializable exception.

I am also using maven and tomcat and running the web app project from maven. E.g. I build the project/webapp to the target directory and run tomcat from that directory.

Error:

java.lang.RuntimeException: com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException: The response could not be deserialized

Here are my settings for the GWT configuration:

-noserver -port 8080 -logLevel DEBUG -war /Users/bbrown/Projects/src/web/target/my-13.06.04-SNAPSHOT -startupUrl http://127.0.0.1:8080/home.html

Ironically, if I run remote debugging, e.g:

mvn gwt:debug -Dgwt.noserver=true

And then launch remote debugging from IntelliJ (not using the GWT mode), I don't get the serialization error.

The class itself is a simple enum. I am making a simple rpc service call and on the initial call, I get the error above:

public enum Status implements Serializable, IsSerializable {
 Running, Disabled
}

I tried to clear all cache files I could find and the target directory but I keep getting the same error.

How can I run the IntelliJ GWT Configuration without getting this error?

Running with: Mac10.7, Chrome, Tomcat7, IntelliJ12.1, gwt2.5.1


回答1:


Try mvn clean install on the whole project (but I hope you tried it...) and also mvn gwt:clean on the GWT part. Also delete compiled/temporary files in src/main/webapp/.

And if it's really a problem of IntelliJ caches, try File -> Invalidate caches.




回答2:


Do you set an output directory in your maven GWT plugin?

Sometimes, GWT will output everything under the source directory, and it won't be clean by "mvn clean". Look for .rpc or .cache.html files to figure out where maven puts the output and remove anything you did not write yourself.



来源:https://stackoverflow.com/questions/17219111/gwt-2-5-1-and-intellij-debug-mode-serializable-exception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!