I am also facing a similar problem.

"unable to find FieldDescriptor for 'organization-roles' in ClassDescriptor of 
business-relationship"

Mapping file extract:
    <class name="com.mhub.core.busobj.BusinessRelationship" auto-complete="false">
        <description>Default mapping for class 
com.mhub.core.busobj.BusinessRelationship</description>
        <map-to xml="business-relationship" 
ns-uri="http://www.mortgagehub.com/schemas/core"; ns-prefix="core"/>
        <field name="id" type="long" required="false" direct="false" transient="false">
            <bind-xml name="id" node="attribute"/>
        </field>
        <field name="childId" type="long" required="false" direct="false" 
transient="false">
            <bind-xml name="child-id" node="attribute"/>
        </field>
        <field name="parentId" type="long" required="false" direct="false" 
transient="false">
            <bind-xml name="parent-id" node="attribute"/>
        </field>
        <field name="organizationRoles" type="com.mhub.core.busobj.OrganizationRole" 
required="false" direct="false" transient="false" collection="vector">
            <bind-xml name="organization-roles" node="element"/>
        </field>
</class>
    <class name="com.mhub.core.busobj.OrganizationRole" auto-complete="false">
        <description>Default mapping for class 
com.mhub.core.busobj.OrganizationRole</description>
        <map-to xml="organization-role" 
ns-uri="http://www.mortgagehub.com/schemas/core"; ns-prefix="core"/>
        <field name="id" type="long" required="false" direct="false" transient="false">
            <bind-xml name="id" node="attribute"/>
        </field>
</class>

Input XML:
<core:business-relationship id="1" child-id="1" parent-id="1" 
no-cascade-flag="0"><core:organization-roles id="-1" org-id="1" .....

Is there any rule that I need to initialize OrganizationRole inside the constructor of 
BusinessRelationship? Also, is it necessary that the bind-xml value 
(organization-roles) in parent element (BusinessRelationship) be the same as the 
bind-xml (organization-role) in the mapping of the actual element? (OrganizationRole)?

Your immediate response would be of great help to me.

Thanks,
Bhaskar



-----Original Message-----
From: Werner Guttmann [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 15, 2004 9:20 AM
To: [EMAIL PROTECTED]
Subject: Re: [castor-user] ERROR: unable to find FieldDescriptor for 'data-source' in 
ClassDescriptor of jdo-conf


Clovis,

can I please see you JDO config file ? It looks like Castor cannot find the 
ClassDescriptor for <data-source> which is a bit odd to me, as it definitely is part 
of the main JAR file. In addition, it looks to me like you are using a root element of 
<jdo-conf>, which is not supported with release 0.9.5.3.

Thanks
Werner

On Tue, 15 Jun 2004 09:50:28 -0300, Cl�vis Wichoski wrote:

>Hi,
>
>Today I'm attempt to Upgrade the version of castor 0.9.3.9 to 0.9.5.3,
>for my applications to compile again, I need to change some methods,
>this done and ok, but when I run my application the following exception 
>throws when I execute getDatabase from JDO, this appear to be a problem 
>with my database mapping, maybe anything changed that I don't know? note 
>that the mapping works with version 0.9.3.9.
>
>unable to find FieldDescriptor for 'data-source' in ClassDescriptor of
>jdo-conf
>org.xml.sax.SAXException: unable to find FieldDescriptor for 
>'data-source' in ClassDescriptor of jdo-conf
>    at 
>org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:1793)
>    at 
>org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:1292)
>    at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376)
>    at 
>org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1284)
>    at 
>org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1806)
>    at 
>org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1182)
>    at 
>org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
>    at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
>    at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:605)
>    at 
>org.exolab.castor.jdo.engine.JDOConfLoader.loadConfiguration(JDOConfLoader.java:85)
>    at 
>org.exolab.castor.jdo.engine.JDOConfLoader.getDatabase(JDOConfLoader.java:101)
>    at 
>org.exolab.castor.jdo.engine.DatabaseRegistry.loadDatabase(DatabaseRegistry.java:235)
>    at org.exolab.castor.jdo.JDO.getDatabase(JDO.java:571)
>
>TIA
>
>Cl�vis
>
>

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

Reply via email to