aspose file tools*
The moose likes GWT and the fly likes PersistentSet issue while using GWT+Spring+Hibernate+Gilead Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "PersistentSet issue while using GWT+Spring+Hibernate+Gilead" Watch "PersistentSet issue while using GWT+Spring+Hibernate+Gilead" New topic
Author

PersistentSet issue while using GWT+Spring+Hibernate+Gilead

Bhavesh Dak
Ranch Hand

Joined: Jun 27, 2009
Posts: 93
Hi everybody,

I am developing an application that uses GWT 2.3, Hibernate 3.0, Spring 3.0 and Gilead API.

I have added required inherits entry in my project.gwt.xml file.

I have configured my service class as follows.



The problem I am facing is the PersistentSet created by hibernate is not automatically getting converted in the java.util.Set and because of it I am getting following exception when pojo is transfered from server to client.

com.google.gwt.user.client.rpc.SerializationException: Type 'org.hibernate.collection.PersistentSet' 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.: instance = []

Do I need any other configuration to make it work or any other processing on POJO i need to add?

Any help highly appreciated.

Thanks,
Bhavesh.


SCJP 6(83%), SCWCD 5.0(100%)
Bhavesh Dak
Ranch Hand

Joined: Jun 27, 2009
Posts: 93
I thought of writing a utility that will manually convert PersistentSet to java.util.Set but read here that Gilead will do it automatically.

I forgot to mention that all my entities implement LightEntity marker interface required by Gilead API.

Still struggling to resolve this


Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10523
    
    9

Did you try the DTO strategy mentioned in the link?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Bhavesh Dak
Ranch Hand

Joined: Jun 27, 2009
Posts: 93
Do don't want to go by that stratagy because I want to use same set of domain entities across the application (for both client and server) because it will reduce the maintenance because we are dealing with single set of entities.
 
Consider Paul's rocket mass heater.
 
subject: PersistentSet issue while using GWT+Spring+Hibernate+Gilead