I have a synthetic entity class: TestAllType, with Lists, and Maps
inside it.
@Entity
public class TestAllType implements Serializable {
/* ... */
    private Long longField;
    private Integer integerField;
    private Float floatField;
    private Double doubleField;
    private String stringField;
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date dateField;
    private TestEnumeration enumField;

    @OneToOne(fetch=FetchType.EAGER)
    private TestReferencedType referencedTypeField;

    @ElementCollection(fetch=FetchType.EAGER)
    private List<String> listStringField;

    @OneToMany(fetch=FetchType.EAGER)
    private List<TestReferencedType> listReferencedTypeField;

    @ElementCollection(fetch=FetchType.EAGER)
    private Map<String, String> mapStringTypeStrigTypeField;
/* ... */
}

There are also a TestReferencedType Entity class, also for testing
purposes.

My problem is that when I try to fetch one testAllType entity, GWT-RPC
throws an exception:
com.google.gwt.user.client.rpc.SerializationException: Type
'java.util.Hashtable' was not included in the set of types which can
be serialized by this SerializationPolicy or its Class object could
not be loaded. For security purposes, this type will not be
serialized.

The List<String> is functional as well as List<TestReferencedType> -
that is why I think that my Entity classes are designed and
implemented suitable to GWT-RPC's specifications on being
Serializable. But if I try to use that Map property of the entity
class, there comes the error message about the Hashtable's
blacklisting.

I also tested, remote procedures' returning with Map<String, String>
are working, too. As I see, only with nested Maps there are this
issue.

// Note that everything works fine about annotated entity classes and
GWT-RPC as I included a self-packaged javax.persistence.jar GWT module
with the corresponding source codes so that the GWT Compiler
understand entity classes, and they can be utilized on client side.
Only with Maps are this problem //

-- 
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.

Reply via email to