Hi,
Anshuma Ashok Goyal wrote:
> Hi Guys,
>
> I am using com.thoughtworks.xstream v1.3.1. And trying to load XML file
> to java object.
>
> While doing so getting CannotResolveClassException error for the class
> CategoryRuleMap which is present at the required location.
>
> This functionality was working with Sonar plugin api - 1.10. I have
> upgraded Sonar plugin api to 3.0 and this has stopped working. Any clue
> what could be the issue.
The format of the CATEGORY_MAP_FILE has changed?
> Below is the code snippet I have:
>
> InputStream input =
> getClass().getResourceAsStream(CATEGORY_MAP_FILE);
> categoryRuleMap = new CategoryRuleMap();
>
> XStream xstream = new XStream();
> xstream.alias("CategoryRuleMap", CategoryRuleMap.class);
> xstream.alias("category", CategoryMap.class);
> xstream.aliasAttribute(CategoryMap.class, "name", "name");
> xstream.alias("rule", String.class);
> xstream.addImplicitCollection(CategoryRuleMap.class, "categories");
>
> xstream.fromXML(input, categoryRuleMap);
>
> Error trace:
>
> [INFO] Trace
> com.thoughtworks.xstream.mapper.CannotResolveClassException:
> abc.def.CategoryRuleMap : abc.def.CategoryRuleMap
> at
[snip]
> Please help.
Sorry, this is way too unspecific to say something else.
- Jörg
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email