Hi,

can you please create a Jira Issue over at

http://jira.codehaus.org/browse/CASTOR

and attach all relevant files so that we can reproduce this bug, incl. of course any patch.

Kind Regards
Werner

On 22.03.2013 10:09, superbible wrote:
Bug:
Using Castor XML to generate java files according to my xsd file, then
call marshal() to convert java object to XML, if the xsd file contains
xs:NMTOKENS property, then marshal() throws exception :
org.exolab.castor.xml.MarshalException: No collection handler for
collection of type java.lang.String
How to reproduce:
1. test.xsd (see attachment)
2. test.xml (see attachment)
3. use castor ant task to generate java source code for test.xsd
4. use below code snippet to call marshal():
public static void main(String[] args) throws Exception {
   Root root=Root.unmarshal(new FileReader("c://test.xml"));
   root.marshal(new FileWriter(new File("c://testOut.xml")));
  }
the exception will be thrown.
Bug Fix:
see Marshaller.java attachement
line 2623-2624 is my fix. Just to split string value into array, then
everything is OK.
2013-03-22
------------------------------------------------------------------------
superbible



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

     http://xircles.codehaus.org/manage_email


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to