I was able to successfully do the binding with castor-0.9.5.3 for the following bind rule.

 

<mapping xmlns="http://castor.exolab.org/" xmlns:cst="http://castor.exolab.org/">

      <description>Castor generated mapping file</description>

      <class cst:name="DBModel">

            <description>Default mapping for class

DBModel</description>

            <map-to cst:xml="DBModel"/>

            <field cst:name="name" cst:type="java.lang.String">

                  <bind-xml name="name" node="attribute"/>

            </field>

            <field cst:name="type" cst:type="java.lang.String">

                  <bind-xml name="type" node="attribute"/>

            </field>

            <field cst:name="DBTables" cst:type="java.lang.Object" cst:collection="map">

                  <bind-xml name="DBTable" node="element"/>

            </field>

           

      </class>

      <class cst:name="DBTable">

            <description>Default mapping for class

DBTable</description>

            <map-to cst:xml="DBTable"/>

            <field cst:name="name" cst:type="java.lang.String">

                  <bind-xml name="name" node="attribute"/>

            </field>

            <field cst:name="DBColumns" cst:type="java.lang.Object" cst:collection="map">

                  <bind-xml name="DBColumn" node="element"/>

            </field>

            <field cst:name="attributes" cst:type="java.lang.Object" cst:collection="map">

                  <bind-xml name="prop" node="element"/>

            </field>

      </class>

</mapping>

But with an older version  (0.9.4.3) I get following exception

 

org.exolab.castor.mapping.MappingException: Nested error:

org.xml.sax.SAXException: unable to find FieldDescriptor for 'class' in ClassDescriptor of bind-xml

 

Is there something is missing with older versions? Since ours is an integration suite, pretty hard to use multiple versions of the castor library. Can any one shed some light on this?

 

Thanks

Sudhi

 

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-user

Reply via email to