CannotResolveClassException?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

CannotResolveClassException?

cowwoc
Hi,

        Can someone please document CannotResolveClassException and
ObjectAccessException to explain under what conditions they are thrown
and what they mean?

Thank you,
Gili
--
http://www.desktopbeautifier.com/
Reply | Threaded
Open this post in threaded view
|

Re: CannotResolveClassException?

Jörg Schaible-2


Hi Gili,

Gili wrote:

> Hi,
>
> Can someone please document CannotResolveClassException and
> ObjectAccessException to explain under what conditions they are thrown
> and what they mean?

CannotResolveClassException is thrown if XStream cannot load the appropriate
class for the current tag to unmarshal it into an object.

ObjectAccessException can be thrown marshalling an object as well as
unmarshalling one. Look at the exception's cause for the real problem. This
is either an IllegalAccessException, an InvocationTargetException calling
readResolve or writeReplace on the original object or when calling the ctor
to create one, it may be a simple IOException, a NoSuchMethodException if the
appropriate ctor is missing, an InstantiationException or an
InvalidObjectException.

- Jörg