Hi Werner,

I didn't mention this yet, so for the record, I'm using Castor 1.1.

I'll need that exact stack trace, as it would provide me with clues as
to where I shall make the required changes.

Here you go:

--
org.exolab.castor.mapping.MappingException: The method setCountryInfos in class x.y.z.ReportData accepting/returning object of type class [Lx.y.z.AggregatedCountryInfoInterface; was not found at org.exolab.castor.mapping.loader.AbstractMappingLoader.createFieldHandler(AbstractMappingLoader.java:693) at org.exolab.castor.mapping.loader.AbstractMappingLoader.createFieldDesc(AbstractMappingLoader.java:478) at org.exolab.castor.xml.XMLMappingLoader.createFieldDesc(XMLMappingLoader.java:444) at org.exolab.castor.mapping.loader.AbstractMappingLoader.createFieldDescriptors(AbstractMappingLoader.java:320) at org.exolab.castor.xml.XMLMappingLoader.createClassDescriptor(XMLMappingLoader.java:215) at org.exolab.castor.mapping.loader.AbstractMappingLoader.createClassDescriptors(AbstractMappingLoader.java:180) at org.exolab.castor.xml.XMLMappingLoader.loadMapping(XMLMappingLoader.java:159) at org.castor.mapping.MappingUnmarshaller.getMappingLoader(MappingUnmarshaller.java:132) at org.castor.mapping.MappingUnmarshaller.getMappingLoader(MappingUnmarshaller.java:99)
        at org.exolab.castor.xml.Marshaller.setMapping(Marshaller.java:557)
        [stacktrace continues within our own code]
--

For completeness, here's how I call Castor:

--
        Mapping mapping = new Mapping();
        mapping.loadMapping(resource);

        FileWriter out = new FileWriter(INPUT_FILE);

        Marshaller marshaller = new Marshaller(out);
        marshaller.setMapping(mapping); // this throws the exception
        marshaller.marshal(data);

        out.close();
--

And here's part of the mapping file:

--
        <class
                name="x.y.z.AggregatedCountryInfoInterface"
                extends="x.y.z.AggregatedInfoInterface"
                verify-constructable="false">
                <field name="countryName">
                        <bind-xml node="attribute" />
                </field>
                <field name="countryIsoCode">
                        <bind-xml node="attribute" />
                </field>
                <field name="period" transient="true" />
        </class>
        <class
                name="x.y.z.AggregatedCountryInfo"
                extends="x.y.z.AggregatedCountryInfoInterface">
                <map-to xml="country" />
        </class>
--

Something like a verify-settable or readonly attribute (true|false) for the <field> tag would be nice.

Thanks in advance,
Philipp Reichart

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

   http://xircles.codehaus.org/manage_email

Reply via email to