Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7594803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:30:43+00:00 2026-05-30T21:30:43+00:00

Well basically i have a shared object which is persitent to Hibernate but I

  • 0

Well basically i have a shared object which is persitent to Hibernate but I also want to change the serialization from server to client and i wrote the Custom serialization clases

import com.google.gwt.user.client.rpc.SerializationException;

import com.google.gwt.user.client.rpc.SerializationStreamReader;
import com.google.gwt.user.client.rpc.SerializationStreamWriter;

    public static void serialize(SerializationStreamWriter writer, Object instance) throws SerializationException
    public static void deserialize(SerializationStreamReader reader, Object instance) throws SerializationException

I have included the gwt.user in the WEB-INF/lib although i should not, and my jboss server still cries

 ERROR: Failed to get SerializationPolicy

Have you encourted this problem, does anybody know how to fix it.. preferably without using Gilead … if there is a simpler solution with Gilead , please show me how… I do not want to access the database object from GWT client, just to use the same object which is defined in shared/ for both client and server but with different serializations..

EDIT:
And care on serialziation about the Collections
This Guy has in detail

The check is already given…
but I had solved this solution with giving the jboss server explicit the gwt.rpc poilcy to, not only to the apache client…
the damn jboss server could not find those.. so it was mainly configuration problem on the server.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T21:30:45+00:00Added an answer on May 30, 2026 at 9:30 pm

    I would have a look at HibernateDetachUtility. The code looks complex but all it does is scan in depth an object graph and nullifies everything that is not serializable by GWT.

    I use it in my app and it works nicely (I guess you can meet troubles if you have large graphs of objects to detach). All I added was a package lookup on fieldValue to see if it is of the type of one of my model objects (which are all in the same package) to also detach the value from hibernate. Have a look at the condition on line 505-506-507 (fieldValue.getClass().getName().contains("org.rhq") should be replaced by a condition that can match objects of your hibernate model)

    To invoke thie utility, just call it like this:

    // Before returning your response, invoke the next line on your object
    HibernateDetachUtility.nullOutUninitializedFields(your_object_here, SerializationType.SERIALIZATION);
    // Your object is now safe to be returned to the GWT client
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

basically what I have is an application server running liferay portal. and we also
Well basically I have this script that takes a long time to execute and
I am not really sure how to word the question, but I basically have
Well basically, I have this bing map control inside my Panorama view, when I
well right now I basically have the jquery load function like this $('#results').load(sources.php?source=1&page=<?=$_GET['page']?>&search=<?=$_GET['search']?>); so
I have a multithreaded server application that needs mutex locks over some shared memory.
Well the subject is the question basically. Are there any version control systems out
Well, this is my first post here and really enjoying the site. I have
Well... simple question, right? But with no so simple answers. In firefox i use
Well, it seems simple enough, but I can't find a way to add a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.