Hi I've been trying to upgrade a project from gwt 1.6.4 to 2.0, but had a hard time figuring out why I got a nullpointer exception when deserializing on the serverside. It turns out that there's been made a change in the way RPC works between version 1.x and 2.0. (I cant see its documented anywhere - not even in the issuelist - maybe others can point to something?)
In 1.x when an objects fields are set it's done via reflection on the field directly. But in 2.0 the serializer first looks for a related setter method and uses that if it exists instead. My problem was that in our project we dont use simple DAO classes between client and server, we use the same domainmodel on both server and clientside - so the transfered classes contains alot of businesslogic - which also means that the setters contains logic with object references which may not have been deserialized yet! As far as I can see theres no option to disable the new feature. Correct me if im wrong? So our solution was to patch deserializeClass(Class<?> instanceClass, Object instance) in ServerSerializationStreamReader.java:595 in a way so it dont use setter methods when deserializing. Hope this post will help others.. :) Cheers Simon
-- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
