Hi, Thanks for the reply, yep, using a mapping file, in the attached test case, I named it mycollection.xml.
Cheers, Toby 2008/5/14 Werner Guttmann <[EMAIL PROTECTED]>: > Oops, forgot to mention that the Jira issues you mentioned all talk > about such scenarios where a mapping file is used. As far as I can tell, > you are not using one, right ? > > Werner > > Toby wrote: > > Anyone mind if I raise an issue in Jira for this one? > > > > Thanks, > > Toby > > > > 2008/5/5 Toby: > > > >> Hi Folks, > >> > >> When I try to marshal a collection (specifically a Map) that contains > >> another collection (specifically a List), it marshals things in a > sensible > >> way, so for something like a Map<Date>, List<String>>, it'll generate > the > >> following XML; > >> > >> <my-collection> > >> <strings> > >> <key xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > >> xsi:type="date">2008-05-05T21:23:19.906+01:00</key> > >> <value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > >> xsi:type="java:java.lang.String">Hello</value> > >> <value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > >> xsi:type="java:java.lang.String">World!</value> > >> </strings> > >> </my-collection> > >> > >> but is unable to unmarshall them complaining that the "value" is > repeated. > >> As in, > >> > >> *org.exolab.castor.xml.MarshalException: element "value" occurs more > than > >> once. (parent class: org.exolab.castor.mapping.MapItem) > >> location: /strings/strings/value{File: [not available]; line: 6; > column: > >> 117}* > >> > >> This seems to be very similar to bugs 1313, 1551 etc, but although they > say > >> its been resolved I get still get the problem on 1.2 of Castor. I can't > >> quiet figure out what those bugs are telling me, or how to apply the > patches > >> or run the test case in 1313. > >> > >> I've attached a test case that demonstrates the problem. > >> > >> Any tips? Thanks in advance, > >> Toby > >> > >> > >> > > > > > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > -- Toby

