GWT 2.5.1 and IntelliJ debug mode, serializable exception
Asked Answered
V

2

2

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

Vacuity answered 20/6, 2013 at 16:39 Comment(4)
I am guessing that there is a cache file either on the intellij side or somewhere else that isn't getting cleared. One of those gwt.rpc files? I don't know which directory and what is not in sync.Vacuity
I think you need to compile GWT project and then run. Whenever you make any change in GWT shared folder or in RPC services you should compile GWT before run.Mudslinging
I have done a full GWT compile, cleaned (as best I can) and I still get the same error.Vacuity
I had a lot of issues getting Enums to work with RPC correctly. I ended up just creating a wrapper POJO for them (id,description).Blackett
R
2

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.

Rabi answered 25/6, 2013 at 7:29 Comment(2)
Yea, I did mvn clenan. I haven't tried mvn gwt:clean. I will try that. Also the Invalidate caches.Vacuity
I was struggling with similar problem for half a day. gwt.rpc file was not updating correctly. File -> Invalidate caches resolved the problem! Thanks!Tsai
N
1

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.

Ng answered 25/6, 2013 at 1:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.