SerializationPolicy

39 views
Skip to first unread message

David

unread,
Jun 1, 2015, 7:48:39 PM6/1/15
to google-we...@googlegroups.com
I defined an interface such as MyInterface in module A. I have its implementation such as MyInterfaceImpl as well as  MyInterfaceImpl_CustomFieldSerializer in another module such as B. I used @JsType for the interface. I launched a embedded Jetty server from module A that can access MyInterfaceImpl.class in server class path, but module B is not included in module A gwt.xml file. I got the following error message - Type 'MyInterfaceImpl  was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. How do I resolve this issue?

Jens

unread,
Jun 1, 2015, 8:18:31 PM6/1/15
to google-we...@googlegroups.com
Your GWT code must know about MyInterfaceImpl and its serializer, otherwise GWT does not know how to deserialize the data when you send MyInterfaceImpl from the server to the client.

When you use an interface with GWT-RPC then GWT will search for all implementations of that interface and only the implementations found can be sent between server and client.

-- J.
Reply all
Reply to author
Forward
0 new messages