XML Feeds

.

[java-dev] Re: find a non-serializable class/object

Owen Green owen at owengreen.net
Wed Jan 9 12:48:19 MST 2008


 > java.io.NotSerializableException: java.lang.Object

Suggests that it's choking on trying to serialize an instance of 
java.lang.Object. This seems unlikely, but it's possible that a class 
somewhere in your object graph has a field declared as Object.

This could include built-in classes (like implementations of Reference, 
for example). If you can find it, you could either skip serializing it, 
by also declaring it transient, or work out way of serializing the thing.

Eclipse, or similar, should make it much easier to find the culprit, if 
you're not already using it.

-- 
O

jbmaxwell wrote:
> No. All it shows in the trace, before it hits my "save" method is:
> 
> java.io.NotSerializableException: java.lang.Object
> 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
> 	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
> 	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
> 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
> 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
> 	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
> 
> ...which doesn't do me much good.
> 
> J.
> 
> 
> 



More information about the java-dev mailing list