• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

PersistentSet issue while using GWT+Spring+Hibernate+Gilead

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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


 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic