Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PersistentSet issue while using GWT+Spring+Hibernate+Gilead

 
Bhavesh Dak
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bhavesh Dak
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11070
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try the DTO strategy mentioned in the link?
 
Bhavesh Dak
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic