I believe class name ="TraceFormat"  is not correct and same goes for all such references in your mapping. You must specify a well qualified class name="xyz.abc.TraceFormat".


De : venkatesh babu [mailto:[EMAIL PROTECTED]
Envoy� : lundi, 6. juin 2005 09:22
� : [email protected]
Objet : [castor-user] [XML] Help me to solve this problem

Diego,
 
While DataBinding with existing Java Classes, I am getting this error,
org.xml.sax.SAXException: unable to find FieldDescriptor for 'channel' in ClassDescriptor of channel
 
I have given mapping file and input xml below, help me to solve this error.
 
<mapping>
 <class name="TraceFormat">
     <map-to xml="traceFormat"/>
     <field name="id_"
            type="string"
            set-method="setId"
            get-methid="getId">
            <bind-xml name="id" node="attribute"/>
     </field>    
     <field name="regularChannel_"
            type="Channel" required="false"
            collection="arraylist"
      set-method="addRegularChannel"
      get-method="getAllRegularChannels">
            <bind-xml name="regularChannels"/>
     </field>         
 </class>
 <class name="Channel">
  <map-to xml="channel" />
     <field name="name_"
            type="string" required="false"
            set-method="setName"
            get-method="getName">
            <bind-xml name="name" node="attribute"/>
     </field>         
     <field name="type_"
            type="string" required="false"
            set-method="setType"
            get-method="getType">
            <bind-xml name="type" node="attribute"/>
     </field>              
 </class>
</mapping>
 
-----------------------
 
<ink:traceFormat id="defaultTraceFormat">
<ink:regularChannels>
    <ink:channel name="X" type="xsd:decimal"></ink:channel>
    <ink:channel name="Y" type="xsd:decimal"></ink:channel>
    <ink:channel name="T" type="xsd:integer"></ink:channel>
</ink:regularChannels>
</ink:traceFormat>
 

Thanks,
Venkatesh Babu


Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.

Reply via email to