I try to marshall a class with references using the newest CVS,
but i get this error:
---------------------------------------------------------------
Unable to resolve ID for instance of class '[Ldk.ifad.adt.Composite;'
due to the following error: Unable to resolve ClassDescriptor.
at
org.exolab.castor.xml.Marshaller.getObjectID(Marshaller.java:1031)
at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:792)
at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:540)
at dk.ifad.experimental.MTest.main(MTest.java:95)
My mapping for this class is:
-----------------------------
...
<class name="dk.ifad.adt.Composite" identity="name" auto-complete="true">
<field direct="false" name="name" type="java.lang.String">
<bind-xml node="attribute"/>
</field>
<field direct="false" name="Components" type="dk.ifad.adt.Composite">
<bind-xml node="attribute" reference="true"/>
</field>
</class>
...
I use this code to marshall:
----------------------------
dk.ifad.adt.Composite com=new dk.ifad.adt.Composite();
try{
Mapping mapping = new Mapping();
mapping.loadMapping("D:/netVE/config/mapping.xml");
Marshaller ma =
new Marshaller(new java.io.FileWriter("d:/netVE/config/test.xml"));
ma.setMarshalAsDocument(true);
ma.setMapping(mapping);
ma.marshal(com);
...
Since I use auto-complete there should be a ClassDescriptor right?
Please help
Nikolai
----------------------------------------------
Nikolai V. Christensen, Computer Engineer,
Simulation and Training department
IFAD, Forskerparken 10A, DK-5230 Odense M
Phone: +45 63 15 71 31 Fax: +45 65 93 29 99
WWWeb: http://www.ifad.dk
e-mail: [EMAIL PROTECTED]
----------------------------------------------
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev