SerializationException when using serializable object in Dispatch Action

57 views
Skip to first unread message

Clay Harris

unread,
Jan 6, 2014, 11:59:37 AM1/6/14
to gwt-pl...@googlegroups.com
Hello,

I've tried this a couple of different times now, in wholly different contexts, and I keep running up against the same problem.  Actions/Results appear to work fine with DispatchAsync.execute(Action, AsyncCallback), but if I add a custom serializable object to the Action, I receive the following stack trace (on top of the execute call):

com.google.gwt.user.client.rpc.SerializationException
 at com
.google.gwt.user.client.rpc.impl.SerializerBase.getTypeHandler(SerializerBase.java:153)
 at com
.google.gwt.user.client.rpc.impl.SerializerBase.serialize(SerializerBase.java:125)
 at com
.google.gwt.user.client.rpc.impl.ClientSerializationStreamWriter.serialize(ClientSerializationStreamWriter.java:183)
 at com
.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:126)
 at com
.gwtplatform.dispatch.shared.DispatchService_Proxy.execute(DispatchService_Proxy.java:33)
 at com
.gwtplatform.dispatch.client.RpcDispatchAsync.doExecute(RpcDispatchAsync.java:55)
 at com
.gwtplatform.dispatch.client.AbstractDispatchAsync.execute(AbstractDispatchAsync.java:93)

The object is custom, implements Serializable and IsSerializable, and contains nothing but a String and another object that is also Serializable/IsSerializable, containing only integers.

I hope I'm just missing something obvious.  Has anyone else run into this?

Thanks

Julien Dramaix

unread,
Jan 7, 2014, 3:24:32 AM1/7/14
to gwt-pl...@googlegroups.com
Are you sure that your serialization policy file is well deployed ?

Clay Harris

unread,
Jan 7, 2014, 8:48:45 AM1/7/14
to gwt-pl...@googlegroups.com
I was having the problem in hosted mode, so I assume so.  After looking at it afresh this morning, I realized my issue was actually Serialization - lack of a default no-arg constructor.  I got it working, thankfully.  

I'm not sure what the problem was last time, as I know I had the constructors, but its been months so I don't have it available to check.

Thanks



--
You received this message because you are subscribed to the Google Groups "GWTP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gwt-platform...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages