Avi-

I've used a similar mapping many times, and I see two differences between yours and mine: one, I don't define a type in the outermost field element, and two, I have a <bind-xml> element for the value of the map. These may be minor inconsistencies that don't change anything, but it is all that I see.

HTH,
Stephen


Wiesenfeld, Avi wrote:
Hi All,
I am new to Castor and having problems with defining the correct mapping of map collection. The LoadMapping method return: " unable to find FieldDescriptor for 'class' in ClassDescriptor of bind-xml". My mapping file looks like:
....
<field name="profileMap" collection="map" type="com.bmc.idm.ctsa.licensemanager.dto.ApplicationLicense" > <bind-xml node="element" location="Applications" name="Application">
               <class name="org.exolab.castor.mapping.MapItem">
                  <field name="key" type="java.lang.String">
                    <bind-xml name="name"/>
                  </field>
<field name="value" type="com.bmc.idm.ctsa.licensemanager.dto.ApplicationLicense"/>
               </class>
          </bind-xml>
        </field>
.....
where profileMap is a map with string key and class value. The class value is defined in com.bmc.idm.ctsa.licensemanager.dto.ApplicationLicense. The definition of the map in the xml file was taken from some example I found on the web. Many thanks for the help,
*Avi Wiesenfeld, CISSP*
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>


-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to