Reputation:

Locating Serialization Issue in Complex Bean

I have a large bean graph that I'm trying to serialize. Getting serialization exception (a non-specific one). Anyone have a class that will help locate the issue?

Upvotes: 0

Views: 2797

Answers (3)

Bogdan
Bogdan

Reputation: 1150

You could use a special output stream that will perform some additional checks. See this page as a reference.

Upvotes: 0

Tom Hawtin - tackline
Tom Hawtin - tackline

Reputation: 147164

From JDK6 you should be able to get extra information by setting the sun.io.serialization.extendedDebugInfo system property:

-Dsun.io.serialization.extendedDebugInfo=true

Upvotes: 14

krosenvold
krosenvold

Reputation: 77231

Write one or more unit tests that serialize parts of the graph or the full graph. This will let you brak the problem into smaller pieces.

Upvotes: 0

Related Questions