I have an application using gwt RPCs as well as Ebean as ORM. Trying to upgrade Ebean from version 2.7 to 11.34, I found that the newer Ebean version does not support subclassing any more, but uses bean enhancement, which seems to confuse the gwt serializer. We had used Ebean subclassing, and actually thrown away the subclass for the cases where an entity bean was not just used on the server, but directly passed on to the gwt RPC.
As far as I see, the enhancement adds an instance of class EntityBeanIntercept to each entity bean. As we do actually never use the beans that we get back from the client to the server to directly write them to the database, my approach was to add a CustomFieldSerializer for class EntityBeanIntercept that does nothing. However, I still get
com.google.gwt.user.client.rpc.SerializationException: Type 'io.ebean.bean.EntityBeanIntercept' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded.
I created two classes:
com.google.gwt.user.client.rpc.core.io.ebean.bean.EntityBeanIntercept_CustomFieldSerializer
com.google.gwt.user.server.rpc.core.io.ebean.bean.EntityBeanIntercept_ServerCustomFieldSerializer
with empty implementations of all serialization/deserializsation methods. By debugging, I found that nevertheless, EntityBeanIntercept is not put into the white lists for serialization/deserialization of the gwt internal SerializationPolicyLoader.
Do I need to add these custom serializers to some configuration for them to be taken into account by gwt?
By the way: current gwt version is 2.7.