Hi,
I extend a abstract class and want to export objects from the concrete
class. The following stack trace is the result:
org.exolab.castor.mapping.MappingException: The Java class
DE.data_experts.profi.prodexim.TestObject2 is not constructable -- it does
not contain a default public constructor
at
org.exolab.castor.mapping.loader.ClassDescriptorImpl.<init>(ClassDescriptorImpl.java:127)
at
org.exolab.castor.mapping.loader.MappingLoader.createDescriptor(MappingLoader.java:460)
at
org.exolab.castor.xml.XMLMappingLoader.createDescriptor(XMLMappingLoader.java:152)
at
org.exolab.castor.mapping.loader.MappingLoader.loadMapping(MappingLoader.java:211)
at org.exolab.castor.mapping.Mapping.getResolver(Mapping.java:278)
at org.exolab.castor.mapping.Mapping.getResolver(Mapping.java:234)
at org.exolab.castor.xml.Marshaller.setMapping(Marshaller.java:323)
at DE.data_experts.profi.prodexim.Prodex.getMarshaller(Prodex.java:28)
at DE.data_experts.profi.prodexim.Prodex.exportObject(Prodex.java:15)
at DE.data_experts.profi.prodexim.Prodex.main(Prodex.java:72)
The mapping file for this test case is:
<mapping>
<!-- description for TestObject2 -->
<class name="DE.data_experts.profi.prodexim.TestObject2" >
<field name="id" type="integer" >
<xml name="id" node="element" />
</field>
<field name="state" type="boolean" >
<xml name="state" node="element" />
</field>
</class>
<!-- description for TestObject -->
<class name="DE.data_experts.profi.prodexim.TestObject" extends
="DE.data_experts.profi.prodexim.TestObject2" >
<field name="name" type="string" >
<xml name="name" node="element" />
</field>
<field name="objects" type="DE.data_experts.profi.prodexim.TestObject3"
collection="collection" >
<xml name="objects" node="element" />
</field>
<field name="t" type="DE.data_experts.profi.prodexim.TestObject" >
<xml name="t" node="element" />
</field>
</class>
<!-- description for TestObject3 -->
<class name="DE.data_experts.profi.prodexim.TestObject3" >
<field name="date" type="date" >
<xml name="date" node="element" />
</field>
</class>
</mapping>
Has anybody a solution? Thanks for your time,
Falko.
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev