wood burning stoves*
The moose likes GWT and the fly likes GWT - DataObject was not serializable and has no concrete serializable subtypes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "GWT - DataObject was not serializable and has no concrete serializable subtypes" Watch "GWT - DataObject was not serializable and has no concrete serializable subtypes" New topic
Author

GWT - DataObject was not serializable and has no concrete serializable subtypes

Dennis van Beek
Greenhorn

Joined: Aug 29, 2009
Posts: 5

Hi, I've been working with GWT for a few weeks now, but now I have a big problem.

I'm using a DataObject to transport my objects from the database to the client.
So all my objects extend this DataObject.
This was working fine, until I tried to replace all the String-fields in the DataObject by a new class called 'DataAttribute'

This DataAttribute is nothing more than a class with 4 Strings ->
one representing the database-fieldname, one representing the 'readable' fieldname, one representing the value and one that can be used for a special display-value (used for foreign keys).

Now I can't start my webapp anymore, it gives this message for all my Objects;
[ERROR] Type 'weerribben.client.objects.DataAttribute' was not serializable and has no concrete serializable subtypes



The DataAttributes are stored in an ArrayList the DataObject-class, and are initialized in the implementing classes;


This is my DataAttribute;


And this is my DataObject (sorry for the dutch comments);


This is how I implement the intitalize-method;


Can anybody tell me what I'm doing wrong, or how I can find the problem??
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60050
    
  65

"Online Metalhead", please check your private messages for an important administrative matter.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Dennis van Beek
Greenhorn

Joined: Aug 29, 2009
Posts: 5

I (finally) found the answer!

I forgot the default constructor in DataAttribute (which offcourse is needed for serialisation)!
(And I recently passed my SCJP, how could I forget?!?!)

More info; Blog with the answer
 
 
subject: GWT - DataObject was not serializable and has no concrete serializable subtypes
 
Similar Threads
little application, but important, Please help, it is for my graduation
Any good Design Patterns for extending Value Objects?
Please help me. This is for my graduation.
Fields doesn't set the properties
Please help me. This is for my graduation