On Mar 18, 4:03 pm, Matt Mastracci <matt...@mastracci.com> wrote:
> I can reproduce this in a barebones project. It looks like it's this class 
> we're using to avoid RPC pulling in all the subclasses of HashMap. We have 
> similar classes for ArrayList and HashSet, but those all have custom 
> serializers. I don't know why I didn't create a custom serializer for this 
> class as well (though there aren't any ill effects with standard RPC).

As another data point, I ran into the exact same problem with our
RPC_HashMap.java class (similar design to what you posted).

I realized that our code never actually called the null ctor, so I
instantiated a new RPC_HashMap() somewhere, and presto, the NPE in
WebModePayloadSink went away and the object instances serialized/
deserialized perfectly.

Then I reverted the above and instead passed in the -draftCompile flag
to gwtc and again everything worked as expected.

After tracing through the code a bit, it looks to me that
c.g.g.rpc.linker.ClientOracleLinker is only storing .gwt.rpc metadata
based on what the GWT Compiler machinery tells it (post
optimizations), but WebModePayloadSink needs more metadata since it's
run serverside and uses Java reflection to instantiate new objects.
IOW, the .gwt.rpc metadata for the class didn't know about the null
ctor because it was optimized away and as such, WebModePayloadSink
couldn't figure out how to create a new one.

eric
eric

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

To unsubscribe from this group, send email to 
google-web-toolkit-contributors+unsubscribegooglegroups.com or reply to this 
email with the words "REMOVE ME" as the subject.

Reply via email to