Hello,

1) I've a map for XML and JDO:

    <class name="xmlobjects.Key" access="shared">
        <description>Default mapping for class xmlobjects.Key</description>
        <map-to table="CONFIGURATION" xml="key"/>
        <field name="defaultValue" type="java.lang.String">
            <bind-xml name="defaultValue" node="attribute"/>
        </field>
        <field name="name" type="java.lang.String" required="true">
                <sql name="KEY" type="varchar"/>
            <bind-xml name="name" node="attribute"/>
        </field>
        <field name="description" type="java.lang.String" required="true">
                <sql name="DESCRIPTION" type="varchar"/>
            <bind-xml name="description" node="attribute"/>
        </field>
    </class>

XML works fine, but when I use JDO mapping I receive an exception:

org.exolab.castor.mapping.MappingException: Cannot store object of type
xmlobjects.Key -- no identity field specified
        at
org.exolab.castor.jdo.engine.JDOMappingLoader.createDescriptor(Unknown
Source)
        at
org.exolab.castor.mapping.loader.MappingLoader.loadMapping(Unknown Source)
        at org.exolab.castor.jdo.engine.JDOMappingLoader.loadMapping(Unknown
Source)
        at org.exolab.castor.mapping.Mapping.getResolver(Unknown Source)
        at
org.exolab.castor.jdo.engine.DatabaseRegistry.loadDatabase(Unknown Source)
        at org.exolab.castor.jdo.JDO.getDatabase(Unknown Source)
db = jdo.getDatabase();
        at XMLConverter.dbConfig(XMLConverter.java:169)

Please, explain me what's my mistake. I think an exception is thrown before
DataBase consistency checking, when I change the DB table name to unexisted,
I've got the same problem.

My database.xml file contains:

<database name="DEVDB" engine="oracle"> 
        <driver class-name="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@localhost:1521:DEVDB">
            <param name="user" value="serge_44" />
        <param name="password" value="serge_44" />
        </driver>
        <mapping href="mapping/GeneralMapping.xml"/> 
</database>

2) Another question is what's a SID parameter for Oracle DBMS?

Regards,
Serge

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

Reply via email to