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 7698337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:13:04+00:00 2026-05-31T22:13:04+00:00

Imagine that you want to send any Serializable class to the client side of

  • 0

Imagine that you want to send any Serializable class to the client side of your GWT application, with the use of a DTO:

public class MyDTO implements Serializable {

    public Serializable value;

}

Also, anything that gets used as value will be checked if it’s Serializable before it is set. GWT does throw a couple of warnings in the dev console:

DEBUG: com.example.app.shared.MyDTO. 
    DEBUG: Analyzing the fields of type 'com.example.app.shared.MyDTO' that qualify for serialization. 
        DEBUG: private java.io.Serializable value. 
            DEBUG: java.io.Serializable. 
                DEBUG: Verifying instantiability. 
                    DEBUG: java.util.ArrayList<? extends java.lang.Object>. 
                        WARN: Checking all subtypes of Object which qualify for serialization. 
                            DEBUG: com.google.gwt.validation.client.impl.PathImpl. 
                                DEBUG: Verifying instantiability. 
                                    DEBUG: com.google.gwt.validation.client.impl.PathImpl. 
                                        DEBUG: Analyzing the fields of type 'com.google.gwt.validation.client.impl.PathImpl' that qualify for serialization. 
                                            WARN: Field 'private final java.util.List<javax.validation.Path.Node> nodes' will not be serialized because it is final.

But! Unfortunately, this results in GWT throwing an RPC SerializationException when it gets sent through to the client side:

com.google.gwt.user.client.rpc.SerializationException: Type 'com.example.app.shared.MyDTO' 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 = com.example.app.shared.MyDTO@577f52ed
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:619)
    at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:126)
    at com.google.gwt.user.client.rpc.core.java.util.Collection_CustomFieldSerializerBase.serialize(Collection_CustomFieldSerializerBase.java:44)
    ...

Bottomline:
How do you prevent GWT from throwing a fit about Serializable subtypes?

EDIT:

I’ve ended up creating a subclass for each class I needed.

  • 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-31T22:13:06+00:00Added an answer on May 31, 2026 at 10:13 pm

    GWT should know the type of class in compile time. So you need to specify exact class which implements Serializable.

    To overcome, I think you may use a map to send your data as key-value pairs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Imagine that Byte[] refArchiveData is around 30-100 mbytes of size. I want to send
Imagine that you want to develop a non-trivial end-user desktop (not web) application in
Imagine that I want to create an array from another array like this: $array
Imagine I have a cell that I want to be red if the value
Let's imagine I want to make a templated function that returns the first element
I want to create a helper method that I can imagine has a signature
Imagine that I have a form in a flash application with two fields, input1
Imagine that I have a nice Deck class, in the best OO fashion. It
Imagine that i have the following code: <a:repeat value=#{bean.getList()} var=x > <li class=la> <span>
I am working on a Web application that needs to send XML to 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.