Hi Joe,
Thanks for your tip.
I was able to solve the issue as follows with autodetectannotations also
set to true.
HashMap<String, Class> map = new HashMap<String, Class>();
map.put("Allocator", xxx.Allocator.class);
((XStreamMarshaller)xmlUnmarshaller).setAliases(map);
after this the exception is gone and things are working fine.
Thanks and regards
Karthik
On Mon, Jun 4, 2012 at 12:02 PM, Jörg Schaible
<[email protected]>wrote:
> Hi Karthik,
>
> karthik prabaharan wrote:
>
> > Hi all,
> >
> >
> >
> > I am having a class annoted @XStreamAlias. Its working fine when in
> > marsah= alled.
> >
> >
> >
> > Howerver during un-marshalling it gives exception like
> >
> >
> >
> > Could not read [class xxx.Allocator]; nested exception is
> > org.springframewo=
> >
> > rk.oxm.UnmarshallingFailureException: XStream unmarshalling exception;
> > nest= ed exception is
> > com.thoughtworks.xstream.mapper.CannotResolveClassException=
>
> Did you read this:
> http://xstream.codehaus.org/annotations-tutorial.html#AutoDetect
>
>
> > :
> >
> >
> >
> > Even tried setting up in spring config
> >
> >
> >
> > <property name=3D"aliases">
> >
> > <props>
> >
> > <prop key=3D"Allocator">xxx.Allocator</prop>
> >
> > </props>
> >
> >
> >
> > Is there any solution for this already ?.
>
> Sorry, I don't know how Spring is initializing and using XStream.
>
> - Jörg
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>