I'm stuck with this error:
[DEBUG] [testgwt] - Rebinding org.stofkat.testgwt.client.GetTestsService
[INFO] [testgwt] - Module testgwt has been loaded
[ERROR] [testgwt] - Errors in 'generated://CB9089E742875E64C1F5E08E3E60A8B5 /org/stofkat/testgwt/shared/TestsWrapper_FieldSerializer.java'
[ERROR] [testgwt] - Line 9: The type TestsWrapper_FieldSerializer must implement the inherited abstract method TypeHandler.serial(SerializationStreamWriter, Object)
[ERROR] [testgwt] - Line 9: The type TestsWrapper_FieldSerializer must implement the inherited abstract method TypeHandler.deserial(SerializationStreamReader, Object)
[ERROR] [testgwt] - Line 36: Type mismatch: cannot convert from TestsWrapper to Object
[ERROR] [testgwt] - Line 40: Cannot cast from Object to TestsWrapper
[ERROR] [testgwt] - Line 44: Cannot cast from Object to TestsWrapper
[INFO] [testgwt] - See snapshot: C:\Users\Leejjon\AppData\Local\Temp\org.stofkat.testgwt.shared.TestsWrapper_FieldSerializer4210265464022362123.java
I've manage to isolate the problem in two Java projects here (just run the project on a from Eclipse as a GWT web application, and press on the button on the page).
What I'm trying to do is create a game with libgdx where the levels can be loaded from an XML file into a POJO. Then I pass the POJO into the engine and it will display the level. I'm using SimpleXML for XML parsing because that library works on both the Android and desktop Java. However I can't use that in the GWT (HTML5) version of the game since the SimpleXML framework uses classes from java.io. (And that isn't allowed because the Java code on the GWT client side is compiled into javascript and that isn't allowed to simply read stuff from any file on the filesystem). So I now load the XML file into a POJO on a GWT server, and try to pass it to the client with the RPC.
The POJO classes are going to be in the Java project that is being used by the Desktop (LWJGL), Android and HTML5 (GWT) version, so the POJO classes cannot implement IsSerializable as the GWT jars can't be in that project. So I followed Glenn's answer in this other stackoverflow topic and made a wrapper class for each POJO that extends the original POJO and implements IsSerializable.
Please help me verify whether this is a bug in GWT or I'm doing it wrong.