Search code examples
javagwttomcatintellij-ideagxt

GWT 2.5.1 and IntelliJ debug mode, serializable exception


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


Solution

  • 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.