MappingInfoNotFoundException

I need some guidance on this. Not sure if I am missing something. I have
successfully reversed mapped the classes from the Oracle tables for my
schema and was trying to execute a query like this...
Query query = listPM.newQuery (Menu.class, "menukey > 1000");
Collection menus = (Collection) query.execute ();
But I am getting a MappingInfoNotFoundException.
469 INFO [main] kodo.MetaData - Parsing metadata resource
"file:/C:/usr/eclipse/gtaworkspace/TestEclipse/bin/com/bellsouth/snt/gtacnm/jdo/package.jdo".
kodo.jdbc.meta.MappingInfoNotFoundException: No mapping information was
found for "class com.bellsouth.snt.gtacnm.jdo.Menu".
     at
kodo.jdbc.meta.RuntimeMappingProvider.getMapping(RuntimeMappingProvider.java:44)
     at
kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:385)
     at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:340)
     at
kodo.jdbc.meta.MappingRepository.getMappings(MappingRepository.java:294)
     at
kodo.jdbc.meta.MappingRepository.getMetaDatas(MappingRepository.java:271)
     at kodo.query.AbstractQuery.createExecutor(AbstractQuery.java:614)
     at kodo.query.AbstractQuery.compileForDataStore(AbstractQuery.java:578)
     at kodo.query.AbstractQuery.executeWithArray(AbstractQuery.java:830)
     at kodo.query.AbstractQuery.execute(AbstractQuery.java:793)
     at com.bellsouth.snt.gtacnm.Persistence.TestMenu.<init>(TestMenu.java:57)
     at com.bellsouth.snt.gtacnm.Persistence.TestMenu.main(TestMenu.java:219)
Exception in thread "main"

Are your mapping files in your classpath next to your metadata files? Have you
changed the kodo.jdbc.MappingFactory setting?

Similar Messages

  • MappingInfoNotFoundException with one-many mapping to horizontal PC subclass

    Hi,
    I have a nasty niggling problem with a one-many mapping where the many
    side is a horizontally-mapped persistent subclass:
    kodo.util.FatalUserException: kodo.jdbc.meta.MappingInfoNotFoundException:
    The reference mappings for one-to-many field "Invoice.openTrades" are not
    in the table of the field's related persistent element
    type.[Invoice.openTrades [kodo.jdbc.meta.OneToManyFieldMapping]]
         at
    kodo.runtime.PersistenceManagerImpl.attach(PersistenceManagerImpl.java:4363)...
    NestedThrowablesStackTrace:
    kodo.jdbc.meta.MappingInfoNotFoundException: The reference mappings for
    one-to-many field "Invoice.openTrades" are not in the table of the field's
    related persistent element type.[Invoice.openTrades
    [kodo.jdbc.meta.OneToManyFieldMapping]]
         at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:134)
         at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:120)
         at
    kodo.jdbc.meta.OneToManyFieldMapping.fromMappingInfo(OneToManyFieldMapping.java:94)
         at
    kodo.jdbc.meta.RuntimeMappingProvider.getFieldMapping(RuntimeMappingProvider.java:198)
         at
    kodo.jdbc.meta.MappingRepository.getFieldMapping(MappingRepository.java:470)
         at
    kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapping.java:991)
         at
    kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapping.java:971)
         at
    kodo.jdbc.meta.AbstractClassMapping.getMappings(AbstractClassMapping.java:934)
         at
    kodo.jdbc.meta.AbstractClassMapping.getDeclaredFieldMappings(AbstractClassMapping.java:654)
         at
    kodo.jdbc.meta.AbstractClassMapping.resolve(AbstractClassMapping.java:796)
         at kodo.jdbc.meta.MappingRepository.resolve(MappingRepository.java:431)
         at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:349)
         at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:177)
         at
    kodo.jdbc.meta.MappingRepository.getMetaData(MappingRepository.java:165)
         at
    kodo.runtime.PersistenceManagerImpl.makePersistent(PersistenceManagerImpl.java:2423)
         at
    kodo.runtime.PersistenceManagerImpl.makePersistent(PersistenceManagerImpl.java:2375)
         at kodo.runtime.AttachManager.makePersistent(AttachManager.java:410)
         at kodo.runtime.AttachManager.attach(AttachManager.java:279)
         at kodo.runtime.AttachManager.attach(AttachManager.java:56)
         at
    kodo.runtime.PersistenceManagerImpl.attach(PersistenceManagerImpl.java:4349)
    I have another one-many mapping on the "one" class which is fine and is
    almost identical to the invalid mapping - it joins on the same
    columns/foreign key. The only real difference is that my invalid "many"
    side is a horizontally mapped subclass (parent class mapped to different
    table). When I took that class out of its hierarchy and mapped it as base,
    it works. I don't know why Kodo is saying the mapping for the join is not
    found, as the "many" side has an invoice field mapped as one-one. The
    superclass does not have a relation to invoice mapped. A slight
    complication is that Invoice itself has a persistent superclass persisted
    in the same table, but nothing refers to that so I don't think it is
    relevant.
    Class diagram is roughly like this:
    BaseTrade
    |
    Invoice 1-* Trade
    BaseReceipt
    |
    Invoice 1-* Receipt
    Invoice mapped to Invoice table; Trade mapped to Trade table but its
    superclass mapped to diff BaseTrade table; Receipt and its superclass
    BaseReceipt mapped to Receipt table.
    I saw an earlier posting on the same exception that mentioned "collection
    element-type" - mine is specified as "Trade", ie the subclass.
    Is there any reason why this should not work?
    I can provide you with .jdo and .mapping files if necessary.
    Many thanks,
    Alex

    Alex-
    Can you post your mapping? I just ran a test with a one-many relation to
    a subclass of a horizontally mapped class, and it worked fine.
    FYI, the example mapping I was using was:
    <?xml version="1.0" encoding="UTF-8"?>
    <mapping>
    <package name="horizmany">
    <class name="HorizManyOwner">
    <jdbc-class-map type="base" pk-column="JDOID"
    table="BUG1174OWNER"/>
    <jdbc-version-ind type="version-number"
    column="JDOVERSION"/>
    <jdbc-class-ind type="in-class-name" column="JDOCLASS"/>
    <field name="relation">
    <jdbc-field-map type="one-many"
    ref-column.JDOID="OWNER_JDOID" table="BUG1174RELATIONSUB"/>
    </field>
    </class>
    <class name="HorizManyRelationSub">
    <jdbc-class-map type="base" pk-column="JDOID"
    table="BUG1174RELATIONSUB"/>
    <jdbc-version-ind type="version-number"
    column="JDOVERSION"/>
    <jdbc-class-ind type="in-class-name" column="JDOCLASS"/>
    <field name="horizmany.HorizManyRelationSuper.superString">
    <jdbc-field-map type="value" column="SUPERSTRING"/>
    </field>
    <field name="owner">
    <jdbc-field-map type="one-one"
    column.JDOID="OWNER_JDOID"/>
    </field>
    <field name="subString">
    <jdbc-field-map type="value" column="SUBSTRING0"/>
    </field>
    </class>
    <class name="HorizManyRelationSuper">
    <jdbc-class-map type="horizontal"/>
    </class>
    </package>
    </mapping>
    In article <[email protected]>, Alex Robbins wrote:
    Hi,
    I have a nasty niggling problem with a one-many mapping where the many
    side is a horizontally-mapped persistent subclass:
    kodo.util.FatalUserException: kodo.jdbc.meta.MappingInfoNotFoundException:
    The reference mappings for one-to-many field "Invoice.openTrades" are not
    in the table of the field's related persistent element
    type.[Invoice.openTrades [kodo.jdbc.meta.OneToManyFieldMapping]]
         at
    kodo.runtime.PersistenceManagerImpl.attach(PersistenceManagerImpl.java:4363)...
    NestedThrowablesStackTrace:
    kodo.jdbc.meta.MappingInfoNotFoundException: The reference mappings for
    one-to-many field "Invoice.openTrades" are not in the table of the field's
    related persistent element type.[Invoice.openTrades
    [kodo.jdbc.meta.OneToManyFieldMapping]]
         at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:134)
         at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:120)
         at
    kodo.jdbc.meta.OneToManyFieldMapping.fromMappingInfo(OneToManyFieldMapping.java:94)
         at
    kodo.jdbc.meta.RuntimeMappingProvider.getFieldMapping(RuntimeMappingProvider.java:198)
         at
    kodo.jdbc.meta.MappingRepository.getFieldMapping(MappingRepository.java:470)
         at
    kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapping.java:991)
         at
    kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapping.java:971)
         at
    kodo.jdbc.meta.AbstractClassMapping.getMappings(AbstractClassMapping.java:934)
         at
    kodo.jdbc.meta.AbstractClassMapping.getDeclaredFieldMappings(AbstractClassMapping.java:654)
         at
    kodo.jdbc.meta.AbstractClassMapping.resolve(AbstractClassMapping.java:796)
         at kodo.jdbc.meta.MappingRepository.resolve(MappingRepository.java:431)
         at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:349)
         at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:177)
         at
    kodo.jdbc.meta.MappingRepository.getMetaData(MappingRepository.java:165)
         at
    kodo.runtime.PersistenceManagerImpl.makePersistent(PersistenceManagerImpl.java:2423)
         at
    kodo.runtime.PersistenceManagerImpl.makePersistent(PersistenceManagerImpl.java:2375)
         at kodo.runtime.AttachManager.makePersistent(AttachManager.java:410)
         at kodo.runtime.AttachManager.attach(AttachManager.java:279)
         at kodo.runtime.AttachManager.attach(AttachManager.java:56)
         at
    kodo.runtime.PersistenceManagerImpl.attach(PersistenceManagerImpl.java:4349)
    I have another one-many mapping on the "one" class which is fine and is
    almost identical to the invalid mapping - it joins on the same
    columns/foreign key. The only real difference is that my invalid "many"
    side is a horizontally mapped subclass (parent class mapped to different
    table). When I took that class out of its hierarchy and mapped it as base,
    it works. I don't know why Kodo is saying the mapping for the join is not
    found, as the "many" side has an invoice field mapped as one-one. The
    superclass does not have a relation to invoice mapped. A slight
    complication is that Invoice itself has a persistent superclass persisted
    in the same table, but nothing refers to that so I don't think it is
    relevant.
    Class diagram is roughly like this:
    BaseTrade
    |
    Invoice 1-* Trade
    BaseReceipt
    |
    Invoice 1-* Receipt
    Invoice mapped to Invoice table; Trade mapped to Trade table but its
    superclass mapped to diff BaseTrade table; Receipt and its superclass
    BaseReceipt mapped to Receipt table.
    I saw an earlier posting on the same exception that mentioned "collection
    element-type" - mine is specified as "Trade", ie the subclass.
    Is there any reason why this should not work?
    I can provide you with .jdo and .mapping files if necessary.
    Many thanks,
    Alex
    Marc Prud'hommeaux
    SolarMetric Inc.

  • Horizontal mapping + MappingInfoNotFoundException

    Hi,
    i got a problem with the mappingtool.
    I'am using horizontal mapping.
    The abstract superclass Person has an primary key field called id.
    Here is the jdo-metadata from package.jdo:
    <class name="Person" identity-type="application"
    objectid-class="PersonId">
    <field name="location" embedded="true"/>
    <field name="id" primary-key="true"/>
    <field name="kidNames">
    <collection element-type="java.lang.String"/>
    </field>
    </class>
    Here is the mapping data from package.mapping:
    <class name="Person">
    <jdbc-class-map type="horizontal"/>
    </class>
    I looked at the manual, section 7.6.4.
    Thank you
    Zach
    688 INFO [main] kodo.Tool - Mapping tool running on type "class
    xxx.persistence.jdo.business.Course" with action "validate".
    kodo.jdbc.meta.MappingInfoNotFoundException: No mapping information was
    found fo
    r "xxx.business.Person.id".
    at
    kodo.jdbc.meta.RuntimeMappingProvider.getFieldMapping(RuntimeMappingP
    rovider.java:149)
    at
    kodo.jdbc.meta.MappingRepository.getFieldMapping(MappingRepository.ja
    va:429)
    at
    kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapp
    ing.java:911)
    at
    kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapp
    ing.java:888)
    at
    kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapp
    ing.java:666)
    at
    kodo.jdbc.meta.RuntimeMappingProvider.initialize(RuntimeMappingProvid
    er.java:89)
    at
    kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository
    java:364)
    at
    kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:30
    7)
    at
    kodo.jdbc.meta.AbstractFieldMapping.getTypeMapping(AbstractFieldMappi
    ng.java:661)
    at
    kodo.jdbc.meta.OneToOneFieldMapping.fromMappingInfo(OneToOneFieldMapp
    ing.java:123)
    at
    kodo.jdbc.meta.RuntimeMappingProvider.getFieldMapping(RuntimeMappingP
    rovider.java:160)
    at
    kodo.jdbc.meta.MappingRepository.getFieldMapping(MappingRepository.ja
    va:429)
    at
    kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapp
    ing.java:911)
    at
    kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapp
    ing.java:891)
    at
    kodo.jdbc.meta.AbstractClassMapping.getMappings(AbstractClassMapping.
    java:854)
    at
    kodo.jdbc.meta.AbstractClassMapping.getDeclaredFieldMappings(AbstractClassMapping.java:617)
    at
    kodo.jdbc.meta.AbstractClassMapping.resolve(AbstractClassMapping.java
    :758)
    at
    kodo.jdbc.meta.BaseClassMapping.resolve(BaseClassMapping.java:323)
    at
    kodo.jdbc.meta.MappingRepository.resolve(MappingRepository.java:390)
    at
    kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:30
    8)
    at
    kodo.jdbc.meta.AbstractFieldMapping.getTypeMapping(AbstractFieldMappi
    ng.java:661)
    at
    kodo.jdbc.meta.OneToOneFieldMapping.fromMappingInfo(OneToOneFieldMapp
    ing.java:123)
    at
    kodo.jdbc.meta.RuntimeMappingProvider.getFieldMapping(RuntimeMappingP
    rovider.java:160)
    at
    kodo.jdbc.meta.MappingRepository.getFieldMapping(MappingRepository.ja
    va:429)
    at
    kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapp
    ing.java:911)
    at
    kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapp
    ing.java:891)
    at
    kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapp
    ing.java:666)
    at
    kodo.jdbc.meta.RuntimeMappingProvider.initialize(RuntimeMappingProvid
    er.java:89)
    at
    kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository
    java:364)
    at
    kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:30
    7)
    at
    kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:16
    2)
    at kodo.jdbc.meta.MappingTool.validate(MappingTool.java:621)
    at kodo.jdbc.meta.MappingTool.run(MappingTool.java:939)
    at kodo.jdbc.meta.MappingTool.run(MappingTool.java:850)
    at kodo.jdbc.meta.MappingTool.main(MappingTool.java:783)
    Exception in thread "main"

    Does Person have any concrete subclasses that map the id field to their
    own table? Do other classes have relations to Person?

  • Kodo.jdbc.meta.MappingInfoNotFoundException:

    Hi,
    I am getting following error when iam executing my application.
    kodo.jdbc.meta.MappingInfoNotFoundException: The "column"
    attribute/extension for field
    "com.ejgallo.winemanager.domain.impl.equipment.SiteBoImpl._bottling" names
    a column whose type (VARCHAR) is not compatible with the type of the field
    (BIT).
    [5/4/04 13:15:19:274 GMT+05:30] 6c594c92 SystemErr R      at
    kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:94)
    [5/4/04 13:15:19:274 GMT+05:30] 6c594c92 SystemErr R      at
    kodo.jdbc.meta.ColumnFieldMapping.fromMappingInfo(ColumnFieldMapping.java:116)
    [5/4/04 13:15:19:274 GMT+05:30] 6c594c92 SystemErr R      at
    kodo.jdbc.meta.ValueFieldMapping.fromMappingInfo(ValueFieldMapping.java:55)
    In equipment.jdo mapping is like this
    <class name="SiteBoImpl" identity-type="datastore">
                   <extension vendor-name="kodo" key="table" value="EJGALLO.WMGMT01_SITE"
    />
                   <extension vendor-name="kodo" key="pk-column" value="SYS_I" />
                   <extension vendor-name="kodo" key="jdbc-sequence-name"
    value="EJGALLO.SITE_SYS_SEQ_N"/>
                   <extension vendor-name="kodo" key="class-column" value="none" />
                   <extension vendor-name="kodo" key="lock-column" value="none" />
                   <field name="_active"/>
                   <field name="_bottling"/>
                   <field name="_brandy"/>
                   <field name="_breweryType"/>
                   <field name="_changeDate"/>
                   <field name="_crush"/>
                   <field name="_description"/>
                   <field name="_galloOperation"/>
                   <field name="_galloOwned"/>
                   <field name="_jdeAddressBookNum"/>
                   <field name="_limsTestPrefixCode"/>
                   <field name="_name"/>
                   <field name="_posting"/>
                   <field name="_production"/>
                   <field name="_reorg"/>
                   <field name="_test"/>
                   <field name="_transfer"/>
                   <field name="_userId"/>
              </class>
    And field mapping in equipment.mapping is
    <class name="SiteBoImpl">
         <jdbc-class-map type="base" pk-column="SYS_I"
    table="EJGALLO.WMGMT01_SITE"/>
    <field name="_changeDate">
    <jdbc-field-map type="value" column="CHG_S"/>
    </field>
    <field name="_description">
    <jdbc-field-map type="value" column="SITE_D"/>
    </field>
    <field name="_name">
    <jdbc-field-map type="value" column="SITE_N"/>
    </field>
         <field name="_active">
                        <jdbc-field-map type="value" column="STAT_X"/>
                   </field>
                   <field name="_bottling">
                        <jdbc-field-map type="value" column="BTL_CAT_X"/>
                   </field>
                   <field name="_brandy">
                        <jdbc-field-map type="value" column="BRANDY_CAT_X"/>
                   </field>
                   <field name="_breweryType">
                        <jdbc-field-map type="value" column="BREWERY_TYP_I"/>
                   </field>
                   <field name="_crush">
                        <jdbc-field-map type="value" column="CRUSH_CAT_X"/>
                   </field>
                   <field name="_galloOperation">
                        <jdbc-field-map type="value" column="GALLO_OPER_CAT_X"/>
                   </field>
                   <field name="_galloOwned">
                        <jdbc-field-map type="value" column="GALLO_OWN_CAT_X"/>
                   </field>
                   <field name="_jdeAddressBookNum">
                        <jdbc-field-map type="value" column="JDE_ADDR_BOOK_I"/>
                   </field>
                   <field name="_limsTestPrefixCode">
                        <jdbc-field-map type="value" column="LIMS_TEST_PRE_I"/>
                   </field>
                   <field name="_posting">
                        <jdbc-field-map type="value" column="POST_CAT_X"/>
                   </field>
                   <field name="_production">
                        <jdbc-field-map type="value" column="PROD_CAT_X"/>
                   </field>
                   <field name="_reorg">
                        <jdbc-field-map type="value" column="REORG_CAT_X"/>
                   </field>
                   <field name="_test">
                        <jdbc-field-map type="value" column="TEST_CAT_X"/>
                   </field>
                   <field name="_transfer">
                        <jdbc-field-map type="value" column="XFER_CAT_X"/>
                   </field>
                   <field name="_userId">
                        <jdbc-field-map type="value" column="USR_I"/>
                   </field>
    </class>
    So can anybody help me on this why i a getting this error.

    Booleans cannot by default be stored as varchars. You have to implemnt
    your own ColumnFieldMapping which does the transformation for you (since
    Kodo does not know if it should be Y/N, T/F, or something else altogether)
    Atul wrote:
    Hi,
    I am getting following error when iam executing my application.
    kodo.jdbc.meta.MappingInfoNotFoundException: The "column"
    attribute/extension for field
    "com.ejgallo.winemanager.domain.impl.equipment.SiteBoImpl._bottling" names
    a column whose type (VARCHAR) is not compatible with the type of the field
    (BIT).
    [5/4/04 13:15:19:274 GMT+05:30] 6c594c92 SystemErr R      at
    kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:94)
    [5/4/04 13:15:19:274 GMT+05:30] 6c594c92 SystemErr R      at
    kodo.jdbc.meta.ColumnFieldMapping.fromMappingInfo(ColumnFieldMapping.java:116)
    [5/4/04 13:15:19:274 GMT+05:30] 6c594c92 SystemErr R      at
    kodo.jdbc.meta.ValueFieldMapping.fromMappingInfo(ValueFieldMapping.java:55)
    In equipment.jdo mapping is like this
    <class name="SiteBoImpl" identity-type="datastore">
                   <extension vendor-name="kodo" key="table" value="EJGALLO.WMGMT01_SITE"
    />
                   <extension vendor-name="kodo" key="pk-column" value="SYS_I" />
                   <extension vendor-name="kodo" key="jdbc-sequence-name"
    value="EJGALLO.SITE_SYS_SEQ_N"/>
                   <extension vendor-name="kodo" key="class-column" value="none" />
                   <extension vendor-name="kodo" key="lock-column" value="none" />
                   <field name="_active"/>
                   <field name="_bottling"/>
                   <field name="_brandy"/>
                   <field name="_breweryType"/>
                   <field name="_changeDate"/>
                   <field name="_crush"/>
                   <field name="_description"/>
                   <field name="_galloOperation"/>
                   <field name="_galloOwned"/>
                   <field name="_jdeAddressBookNum"/>
                   <field name="_limsTestPrefixCode"/>
                   <field name="_name"/>
                   <field name="_posting"/>
                   <field name="_production"/>
                   <field name="_reorg"/>
                   <field name="_test"/>
                   <field name="_transfer"/>
                   <field name="_userId"/>
              </class>
    And field mapping in equipment.mapping is
    <class name="SiteBoImpl">
         <jdbc-class-map type="base" pk-column="SYS_I"
    table="EJGALLO.WMGMT01_SITE"/>
    <field name="_changeDate">
    <jdbc-field-map type="value" column="CHG_S"/>
    </field>
    <field name="_description">
    <jdbc-field-map type="value" column="SITE_D"/>
    </field>
    <field name="_name">
    <jdbc-field-map type="value" column="SITE_N"/>
    </field>
         <field name="_active">
                        <jdbc-field-map type="value" column="STAT_X"/>
                   </field>
                   <field name="_bottling">
                        <jdbc-field-map type="value" column="BTL_CAT_X"/>
                   </field>
                   <field name="_brandy">
                        <jdbc-field-map type="value" column="BRANDY_CAT_X"/>
                   </field>
                   <field name="_breweryType">
                        <jdbc-field-map type="value" column="BREWERY_TYP_I"/>
                   </field>
                   <field name="_crush">
                        <jdbc-field-map type="value" column="CRUSH_CAT_X"/>
                   </field>
                   <field name="_galloOperation">
                        <jdbc-field-map type="value" column="GALLO_OPER_CAT_X"/>
                   </field>
                   <field name="_galloOwned">
                        <jdbc-field-map type="value" column="GALLO_OWN_CAT_X"/>
                   </field>
                   <field name="_jdeAddressBookNum">
                        <jdbc-field-map type="value" column="JDE_ADDR_BOOK_I"/>
                   </field>
                   <field name="_limsTestPrefixCode">
                        <jdbc-field-map type="value" column="LIMS_TEST_PRE_I"/>
                   </field>
                   <field name="_posting">
                        <jdbc-field-map type="value" column="POST_CAT_X"/>
                   </field>
                   <field name="_production">
                        <jdbc-field-map type="value" column="PROD_CAT_X"/>
                   </field>
                   <field name="_reorg">
                        <jdbc-field-map type="value" column="REORG_CAT_X"/>
                   </field>
                   <field name="_test">
                        <jdbc-field-map type="value" column="TEST_CAT_X"/>
                   </field>
                   <field name="_transfer">
                        <jdbc-field-map type="value" column="XFER_CAT_X"/>
                   </field>
                   <field name="_userId">
                        <jdbc-field-map type="value" column="USR_I"/>
                   </field>
    </class>
    So can anybody help me on this why i a getting this error.
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com

  • MappingInfoNotFoundException for embedded class

    The following stack trace appears in my log file when attemping to create
    a new User object. User has an embedded Password object. Interestingly
    enough, the record, including the embedded password, makes it into the
    database. This leads me to believe that this may be a bug.
    1587736 DEBUG [tcpConnection-8080-0] jdbc.SQL - <t 24192593, conn 5035392>
    [0 ms] executing prepstmnt 31544052 INSERT INTO users (email, first_name,
    id, jdoclass, last_name, op_lock, password) VALUES (?, ?, ?, ?, ?, ?, ?)
    [params=(String) c, (String) a, (String) 1-USERKEY:5, (String)
    kodopt.model.User, (String) b, (int) 0, (String) d] [reused=0]
    1587749 INFO [tcpConnection-8080-0] kodo.MetaData - Parsing metadata
    resource
    "file:/var/resin-2.1.9/webapps/kodopt/WEB-INF/classes/kodopt/model.mapping".
    1587762 WARN [tcpConnection-8080-0] kodo.MetaData - No mapping
    information was found for "class kodopt.model.Password".
    1587763 WARN [tcpConnection-8080-0] kodo.Runtime - An exception was
    thrown while executing a transaction listener callback method. It was
    intercepted. The event framework consumes any exceptions that a
    TransactionListener may throw.
    kodo.jdbc.meta.MappingInfoNotFoundException: Could not obtain a valid
    mapping for "class kodopt.model.Password". This could indicate that
    mapping information could not be found, or that it was invalid. Check the
    log for possible details.
    at
    kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:352)
    at
    kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:297)
    at
    kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:162)
    at
    kodo.jdbc.meta.MappingRepository.getMetaData(MappingRepository.java:150)
    at kodo.event.RemoteCommitEvent.<init>(RemoteCommitEvent.java:98)
    at
    kodo.runtime.PersistenceManagerFactoryImpl$1.afterCommit(PersistenceManagerFactoryImpl.java:679)
    at
    kodo.event.TransactionEventManager.fireEvent(TransactionEventManager.java:65)
    at
    serp.util.AbstractEventManager.fireEvent(AbstractEventManager.java:78)
    at
    kodo.runtime.PersistenceManagerImpl.endTransaction(PersistenceManagerImpl.java:823)
    at
    kodo.runtime.PersistenceManagerImpl.afterCompletion(PersistenceManagerImpl.java:660)
    at
    kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:85)
    at
    kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:408)
    at kodopt.UserManagerServlet.doGet(UserManagerServlet.java:749)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:126)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
    at
    com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
    at com.caucho.server.http.Invocation.service(Invocation.java:315)
    at
    com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
    at
    com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246)
    at
    com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:164)
    at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
    at java.lang.Thread.run(Thread.java:536)
    The User object has a member of type Password called password. The
    Password class has a String called password.
    Here are the pertinent excerpts from my JDO file:
    <class name="Password">
    <extension vendor-name="kodo" key="jdbc-use-class-map" value="none" />
    </class>
    <class objectid-class="UserKey" name="User">
    <field name="password" embedded="true" />
    </class>
    And from my mapping XML file:
    <class name="User">
    <field name="password">
    <jdbc-field-map type="embedded" null-ind-column="password"
    synthetic="false">
    <field name="password">
    <jdbc-field-map type="value" column="password" />
    </field>
    </jdbc-field-map>
    </field>
    </class>

    Brian Gebala wrote:
    Correction: Section 7.8.6 of the Developer's Guide. Example 7.27.
    Abe White wrote:
    Thanks for the report. Did you ever run the mappingtool's refresh action
    on the Password type? Even though you correctly added
    jdbc-use-class-map="none" to your metadata, the mapping tool still needs
    to be run on the class and a .mapping file generated (the mapping file
    will just record a class-map type of "none"). We'll try to smooth this
    out in the future.
    I have not run the mappingtool, however I don't have a schema file. I
    created the tables, the JDO file, and the XML mapping file by hand. Do I
    really need to run this tool? Does it modify Password.class? I am going
    off the example in section 7.27 in the Developer's Guide. Is the example
    in this section correct and complete?

  • MappingInfoNotFoundException with field numeric type

    CREATE TABLE EMP (
    EMPID INTEGER NOT NULL,
    NAME VARCHAR(190),
    DEPT INTEGER,
    SALARY NUMERIC(8,2));
    But when I run com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool
    there are errors :
    0 INFO [main] kodo.MetaData - Parsing metadata resource
    "file:/D:/package.mapping".
    1054 INFO [main] kodo.MetaData - Parsing metadata resource
    "file:/D:/classes/package.jdo".
    1435 INFO [main] kodo.MetaData - Generating metadata for type "class
    Emp".
    2338 INFO [main] jdbc.JDBC - <t 24622029, conn 29194312> open:
    jdbc:firebirdsql:localhost/3050:D:/t1.gdb (sysdba)
    2629 INFO [main] jdbc.JDBC - <t 24622029, conn 29194312> close
    2760 INFO [main] jdbc.JDBC - Using dictionary class
    "com.solarmetric.rd.kodo.impl.jdbc.schema.dict.InterbaseDictionary"
    (Firebird _/WI-V6.3.0.3815 Firebird 1.5 Release Candidate 6 ,firebirdsql
    jca/jdbc resource adapter 0.1).
    3964 INFO [main] jdbc.JDBC - <t 24622029, conn 11918020> open:
    jdbc:firebirdsql:localhost/3050:D:/t1.gdb (sysdba)
    3964 INFO [main] jdbc.Schema - Generating tables for schema name "null",
    table name "EMP".
    4014 INFO [main] jdbc.Schema - Generating column information for table
    "EMP".
    4014 INFO [main] jdbc.Schema - Generating primary key information for
    table "EMP".
    4044 INFO [main] jdbc.Schema - Generating foreign key information for
    table "EMP".
    4094 INFO [main] jdbc.JDBC - <t 24622029, conn 11918020> close
    4144 WARN [main] kodo.MetaData - The "column" attribute/extension for
    field "Emp.salary" names a column whose type is not compatible with the
    type of the field.
    com.solarmetric.rd.kodo.impl.jdbc.meta.MappingInfoNotFoundException: Could
    not obtain a valid mapping for "Emp.salary". This could indicate that
    mapping information couldnt be found, or that it was invalid. Check the
    log for possible details.
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getFieldMapping(MappingRepository.java:360)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping.getFieldMapping(ClassMapping.java:941)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping.resolve(ClassMapping.java:883)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping.getFieldMappings(ClassMapping.java:813)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.mapField(ImportTool.java:236)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.importMappings(ImportTool.java:85)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.run(ImportTool.java:400)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.main(ImportTool.java:377)
    Exception in thread "main"
    But when SALARY have type float, there is no error. I use Firebird 1.5
    Database and InterbaseDictionary (all the file are generated automatically
    by RerverseMapping from database). My configuration file :
    com.solarmetric.kodo.impl.jdbc.DBDictionaryClass=com.solarmetric.rd.kodo.impl.jdbc.schema.dict.InterbaseDictionary
    com.solarmetric.kodo.impl.jdbc.DictionaryClass=com.solarmetric.kodo.impl.jdbc.schema.dict.InterbaseDictionary
    javax.jdo.PersistenceManagerFactoryClass=com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory
    javax.jdo.option.ConnectionDriverName=org.firebirdsql.jdbc.FBDriver
    javax.jdo.option.ConnectionUserName=sysdba
    javax.jdo.option.ConnectionPassword=masterkey
    javax.jdo.option.ConnectionURL=jdbc\:firebirdsql\:localhost/3050\:D\:/t1.gdb

    Firebird is not a supported database, so it might be giving back
    metadata in some exotic and unexpected way.
    I recommend that you generate a schema.xml file and change the type of the
    field in that file.
    See:
    http://docs.solarmetric.com/manual.html#ref_guide_pc_reverse
    In article <[email protected]>, abc wrote:
    CREATE TABLE EMP (
    EMPID INTEGER NOT NULL,
    NAME VARCHAR(190),
    DEPT INTEGER,
    SALARY NUMERIC(8,2));
    But when I run com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool
    there are errors :
    0 INFO [main] kodo.MetaData - Parsing metadata resource
    "file:/D:/package.mapping".
    1054 INFO [main] kodo.MetaData - Parsing metadata resource
    "file:/D:/classes/package.jdo".
    1435 INFO [main] kodo.MetaData - Generating metadata for type "class
    Emp".
    2338 INFO [main] jdbc.JDBC - <t 24622029, conn 29194312> open:
    jdbc:firebirdsql:localhost/3050:D:/t1.gdb (sysdba)
    2629 INFO [main] jdbc.JDBC - <t 24622029, conn 29194312> close
    2760 INFO [main] jdbc.JDBC - Using dictionary class
    "com.solarmetric.rd.kodo.impl.jdbc.schema.dict.InterbaseDictionary"
    (Firebird _/WI-V6.3.0.3815 Firebird 1.5 Release Candidate 6 ,firebirdsql
    jca/jdbc resource adapter 0.1).
    3964 INFO [main] jdbc.JDBC - <t 24622029, conn 11918020> open:
    jdbc:firebirdsql:localhost/3050:D:/t1.gdb (sysdba)
    3964 INFO [main] jdbc.Schema - Generating tables for schema name "null",
    table name "EMP".
    4014 INFO [main] jdbc.Schema - Generating column information for table
    "EMP".
    4014 INFO [main] jdbc.Schema - Generating primary key information for
    table "EMP".
    4044 INFO [main] jdbc.Schema - Generating foreign key information for
    table "EMP".
    4094 INFO [main] jdbc.JDBC - <t 24622029, conn 11918020> close
    4144 WARN [main] kodo.MetaData - The "column" attribute/extension for
    field "Emp.salary" names a column whose type is not compatible with the
    type of the field.
    com.solarmetric.rd.kodo.impl.jdbc.meta.MappingInfoNotFoundException: Could
    not obtain a valid mapping for "Emp.salary". This could indicate that
    mapping information couldnt be found, or that it was invalid. Check the
    log for possible details.
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getFieldMapping(MappingRepository.java:360)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping.getFieldMapping(ClassMapping.java:941)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping.resolve(ClassMapping.java:883)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping.getFieldMappings(ClassMapping.java:813)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.mapField(ImportTool.java:236)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.importMappings(ImportTool.java:85)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.run(ImportTool.java:400)
    at
    com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.main(ImportTool.java:377)
    Exception in thread "main"
    But when SALARY have type float, there is no error. I use Firebird 1.5
    Database and InterbaseDictionary (all the file are generated automatically
    by RerverseMapping from database). My configuration file :
    com.solarmetric.kodo.impl.jdbc.DBDictionaryClass=com.solarmetric.rd.kodo.impl.jdbc.schema.dict.InterbaseDictionary
    com.solarmetric.kodo.impl.jdbc.DictionaryClass=com.solarmetric.kodo.impl.jdbc.schema.dict.InterbaseDictionary
    javax.jdo.PersistenceManagerFactoryClass=com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory
    javax.jdo.option.ConnectionDriverName=org.firebirdsql.jdbc.FBDriver
    javax.jdo.option.ConnectionUserName=sysdba
    javax.jdo.option.ConnectionPassword=masterkey
    javax.jdo.option.ConnectionURL=jdbc\:firebirdsql\:localhost/3050\:D\:/t1.gdb
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • MappingInfoNotFoundException on CustomMapping

    Hi,
    i created a custom Field mapping:
    <field name="active">
    <extension vendor-name="kodo"
    key="jdbc-field-map-name"
    value="de.logentis.kodo.YesNoMapping">
    </extension>
    <extension vendor-name="kodo"
    key="jdbc-field-map/column"
    value="active">
    </extension>
    </field>
    Of course the YesNoMapping is also existant in my webapp tree. The
    YesNoMapping is nearly a 100% copy of the supplied IsMaleMapping from
    Kodo. But i get this error log:
    [ERROR] - ClientManagerAction.doExecute(41) |
    org.springframework.orm.jdo.JdoUsa
    geException: No mapping information was found for
    "de.logentis.versysng.domain.C
    lient.active".; nested exception is
    kodo.jdbc.meta.MappingInfoNotFoundException:
    No mapping information was found for
    "de.logentis.versysng.domain.Client.active
    I tripple checked the class and packagenames but everything is in place.
    Is there something i forgot?
    Thanks
    marc

    Marc-
    When you report things like "no mapping found" and "i got mapping
    mismatch", we really need the complete error message and stack trace to
    be able to help you: without those, we'll only be guessing as to the
    source of the problem.
    Your particular mapping looks correct, except that I don't think that
    you want the "type" extension: that is only means to declare a concrete
    type for a field whose declared type is an interface of superclass ...
    it doesn't apply to your situation at all.
    If you still have problems with this mapping, please post the following
    information:
    1. The complete error message you receive
    2. The complete generated .jdo and .mapping files after you run
    xdoclet on the source file
    In article <[email protected]>, Marc Logemann wrote:
    Stephen Kim wrote:
    Note for simple type conversions, you can use our external-values
    extension:
    http://solarmetric.com/Software/Documentation/3.2.4/docs/ref_guide_mapping_fieldmapping.html#ref_guide_mapping_fieldmapping_externvalues
    sorry, again me. This "simple" transformation thing drives me nuts. In
    this time i would have implemented a distributed transaction strategy ;-)
    I checked the docs, applied the example and voila, error:
    Here is my xdoclet mapping:
    * @jdo.field
    * @jdo.class-vendor-extension vendor-name="kodo" key="type" value="char"
    * @jdo.class-vendor-extension vendor-name="kodo" key="external-values"
    value="true=Y, false=N"
    * @jdo.field-vendor-extension vendor-name="kodo"
    key="jdbc-field-map/column" value="active"
    private boolean active;
    This boolean should be stored to a CHAR field in my database. If i run
    this, i get "no mapping found". If i put also a "jdbc-field-map" ->
    value (which is not documented for the example) i got mapping mismatch.
    I checked the samples directory, but there is no external-values example
    in there, only the full blown externalisations.
    Either i am completely crazy, or you cant copy and paste the example
    from the docs (ok its not direclty copy/pasted, but to 80%).
    Again, sorry to bother you with that, but i need that boolean->char
    conversion thing running :-) Perhaps this is even a DBDictionary issue,
    because it seems to be a general mapping i want to achieve.
    Marc Prud'hommeaux
    SolarMetric Inc.

  • RC1 and MetaDataMappingFactory

    I'm trying to migrate from 2.5.3 to 3.0RC1.
    To use only the old 2.5.3 package.jdo file including mapping information
    instead of additionally my newly generated .mapping file, I've set
    'metadata' as MappingFactory.
    Compiling my queries, I get
    kodo.jdbc.meta.MappingInfoNotFoundException: No mapping information was
    found for "class thisIsMyClass".
         at
    kodo.jdbc.meta.RuntimeMappingProvider.getMapping(RuntimeMappingProvider.java:43)
         at
    kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:342)
         at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:297)
         at
    kodo.jdbc.meta.MappingRepository.getMappings(MappingRepository.java:272)
         at
    kodo.jdbc.meta.MappingRepository.getMetaDatas(MappingRepository.java:256)
         at kodo.query.QueryImpl.internalCompile(QueryImpl.java:559)
         at kodo.query.QueryImpl.compile(QueryImpl.java:523)
    If I add a .mapping file with the default FileMappingFactory everything
    works fine. The new mapping file was generated with kodo2migrator.
    Did I misunderstand the documentation or is this an RC1-error?

    Did you use the mappingtool to import the .mapping file created with
    kodo2migrator into .jdo metadata extensions?I've mapped the mapping information back to the .jdo-files, removed the
    mapping files and tried to start again with "kodo.jdbc.MappingFactory:
    metadata". Unfortunately it did not work.
    I'm using Oracle 9.2.0.1.0.
    The only properties set next to metadata are:
    javax.jdo.option.NontransactionalRead=true
    javax.jdo.option.RetainValues=true
    javax.jdo.option.Optimistic=true
    javax.jdo.PersistenceManagerFactoryClass=kodo.jdbc.runtime.JDBCPersistenceManagerFactory
    If I add the property
    kodo.jdbc.SchemaFactory=dynamic
    to prevent schema synchronization everything next to a bug I'll report
    later works fine. I can read + (partially) write to the database.
    Here's the stack trace, the .jdo-files come below:
    kodo.MetaData :INFO: Parsing metadata resource
    "jar:file:/myjar.jar!/firstpackage/package.jdo".
    kodo.MetaData :INFO: Parsing metadata resource
    "jar:file:/myjar.jar!/secondpackage/package.jdo".
    kodo.jdbc.Schema :INFO: Generating tables for schema name "null", table
    name "APPLICATION".
    kodo.jdbc.Schema :INFO: Generating column information for table
    "GAMBLE.APPLICATION".
    kodo.jdbc.Schema :INFO: Generating tables for schema name "null", table
    name "ZSYS_INTERCEPTOR".
    kodo.jdbc.Schema :INFO: Generating column information for table
    "GAMBLE.ZSYS_INTERCEPTOR".
    kodo.jdbc.meta.MappingInfoNotFoundException: The mapping for field
    "secondpackage.InterceptorDefImpl.application" is missing information on
    how to link the field to the related class table, or the given information
    is invalid.
         at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:89)
         at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:75)
         at
    kodo.jdbc.meta.OneToOneFieldMapping.fromMappingInfo(OneToOneFieldMapping.java:98)
         at
    kodo.jdbc.meta.RuntimeMappingProvider.getFieldMapping(RuntimeMappingProvider.java:156)
         at
    kodo.jdbc.meta.MappingRepository.getFieldMapping(MappingRepository.java:410)
         at kodo.jdbc.meta.ClassMapping.getFieldMapping(ClassMapping.java:1048)
         at kodo.jdbc.meta.ClassMapping.getMappings(ClassMapping.java:1018)
         at
    kodo.jdbc.meta.ClassMapping.getDeclaredFieldMappings(ClassMapping.java:781)
         at kodo.jdbc.meta.ClassMapping.resolve(ClassMapping.java:936)
         at kodo.jdbc.meta.BaseClassMapping.resolve(BaseClassMapping.java:302)
         at kodo.jdbc.meta.MappingRepository.resolve(MappingRepository.java:381)
         at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:298)
         at
    kodo.jdbc.meta.MappingRepository.getMappings(MappingRepository.java:272)
         at
    kodo.jdbc.meta.MappingRepository.getMetaDatas(MappingRepository.java:256)
         at kodo.query.QueryImpl.internalCompile(QueryImpl.java:559)
         at kodo.query.QueryImpl.compile(QueryImpl.java:523)
    ---------------- First mapping file
    <jdo>
    <package name="firstpackage">
    <class name="ApplicationDefImpl">
    <extension vendor-name="kodo" key="class-column" value="none"/>
    <extension vendor-name="kodo" key="jdbc-class-map"
    value="base">
    <extension vendor-name="kodo" key="pk-column" value="ID"/>
    <extension vendor-name="kodo" key="table"
    value="APPLICATION"/>
    </extension>
    <extension vendor-name="kodo" key="jdbc-version-ind"
    value="version-number">
    <extension vendor-name="kodo" key="column"
    value="VERSION"/>
    </extension>
    <extension vendor-name="kodo" key="lock-column"
    value="VERSION"/>
    <extension vendor-name="kodo" key="pk-column" value="ID"/>
    <extension vendor-name="kodo" key="table" value="APPLICATION"/>
    <field name="interceptors">
    <collection
    element-type="secondpackage.InterceptorDefImpl"/>
    <extension vendor-name="kodo" key="inverse"
    value="application"/>
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="one-many">
    <extension vendor-name="kodo" key="ref-column.ID"
    value="APPLICATION_ID"/>
    <extension vendor-name="kodo" key="table"
    value="ZSYS_INTERCEPTOR"/>
    </extension>
    </field>
    </class>
    </package>
    </jdo>
    ---------------- Second mapping file
    <jdo>
    <package name="secondpackage">
    <class name="InterceptorDefImpl">
    <extension vendor-name="kodo" key="class-column" value="none"/>
    <extension vendor-name="kodo" key="jdbc-class-map"
    value="base">
    <extension vendor-name="kodo" key="pk-column" value="ID"/>
    <extension vendor-name="kodo" key="table"
    value="ZSYS_INTERCEPTOR"/>
    </extension>
    <extension vendor-name="kodo" key="lock-column" value="none"/>
    <extension vendor-name="kodo" key="pk-column" value="ID"/>
    <extension vendor-name="kodo" key="table"
    value="ZSYS_INTERCEPTOR"/>
    <field name="interceptor" persistence-modifier="none"/>
    <field name="application">
    <extension vendor-name="kodo" key="data-column"
    value="APPLICATION_ID"/>
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="one-one">
    <extension vendor-name="kodo" key="column.JDOIDX"
    value="APPLICATION_ID"/>
    </extension>
    </field>
    </class>
    </package>
    </jdo>

  • Horizontal Mapping and Flat mapping with Metadata Value Indicator

    Hi
    I have an abstract class B which itself extends another abstract class A.
    There is no table for A. The fields in A are mapped to B. I believe this
    is called "horizontal mapping"
    C and D inherit off B. There's a also a table named B (mapped to class B),
    but none for C or D. Instances of C and D are recorded in table B. I
    believe this is called "flat mapping"
    B has a field foo whose possible values are 'fred' and 'wilma'.
    If foo='fred', then the record is of type C
    If foo='wilma', then the record is of type D
    I believe this is called "class indicator" of type metadata.
    To express this, I have package.jdo which says
    <class name="A"/>
    <class name="B" persistence-capable-superclass="A"/>
    <class name="C" persistence-capable-superclass="B"/>
    <class name="D" persistence-capable-superclass="B"/>
    In B.mapping, I have
    <mapping>
    <package name="domain">
    <class name="B">
    <jdbc-class-map type="horizontal"/>
    <jdbc-class-ind type="metadata-value" column="foo"/>
    </class>
    </package>
    </mapping>
    B.java has a private String foo.
    In C.mapping, I have
    <mapping>
    <package name="domain">
    <class name="C">
    <jdbc-class-map type="flat"/>
    <jdbc-class-ind-value value="fred"/>
    field mappings for C
    </class>
    </package>
    </mapping>
    and similarly in D for value='wilma'
    My questions are...
    1. Is this kind of mapping supported by kodo?
    2. If so, is this configuration correct? I guess not, since I don't
    specify the table name anywhere. Where should it go?
    3. If I remove the "class indicator" mapping and run a simple test I get
    kodo.util.FatalUserException: There is no superclass mapping for mapping
    for "class domain.D".
         at
    kodo.jdbc.meta.FlatClassMapping.assertParentMapping(FlatClassMapping.java:49)
         at kodo.jdbc.meta.FlatClassMapping.getTable(FlatClassMapping.java:85)
         at
    kodo.jdbc.meta.OneToManyFieldMapping.fromMappingInfo(OneToManyFieldMapping.java:87)
         at
    kodo.jdbc.meta.RuntimeMappingProvider.getFieldMapping(RuntimeMappingProvider.java:160)
         at
    kodo.jdbc.meta.MappingRepository.getFieldMapping(MappingRepository.java:443)
         at
    kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapping.java:949)
    4. If I run a simple test with the horizontal, flat and class-indicator
    mappings, I get
    kodo.jdbc.meta.MappingInfoNotFoundException: The "class-column"
    attribute/extension for the class indicator on type
    "domain.B.<class-indicator>" is missing or names a column that does not
    exist.
         at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:135)
         at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:121)
         at
    kodo.jdbc.meta.ColumnClassIndicator.fromMappingInfo(ColumnClassIndicator.java:95)
         at
    kodo.jdbc.meta.RuntimeMappingProvider.initialize(RuntimeMappingProvider.java:135)
         at
    kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:378)
    What am I doing wrong?
    Thanks in advance
    Srini

    I solved this problem by removing the identifier field from the
    class/mapping (kodo support).
    Thanks
    Srini
    Stephen Kim wrote:
    Do you have two fields mapped to the same column? Did you make sure you
    set everything which maps to the column?
    Srinivasan Ranganathan wrote:
    I found what was wrong with this, fixed it and got a different (more
    sensible) error. To correct this mapping, I specified B's mapping type as
    "base" and gave its table and pk names. Also, I moved the common field
    mappings to B.mapping so C.mapping and D.mapping only have fields that are
    specific to each.
    Now when I run a simple test, I get
    testC:
    kodo.util.FatalUserException: Attempt to set column "B.FOO" to two
    different values: (java.lang.Object)"java.lang.Object@2f608ac2",
    (java.lang.String)"fred" This can occur when you fail to set both sides of
    a two-sided relation between objects, or when you map different fields to
    the same column, but you do not keep the values of these fields in synch.
         at kodo.jdbc.runtime.VRow.setObjectInternal(VRow.java(Compiled Code))
         at kodo.jdbc.sql.AbstractRow.setObject(AbstractRow.java(Compiled Code))
         at
    kodo.jdbc.meta.ColumnClassIndicator.insert(ColumnClassIndicator.java:143)
         at kodo.jdbc.runtime.UpdateManagerImpl.insert(UpdateManagerImpl.java:216)
         at kodo.jdbc.runtime.UpdateManagerImpl.insert(UpdateManagerImpl.java:219)
         at kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:108)
         at kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:73)
    testD:
    kodo.util.FatalUserException: Attempt to set column "B.FOO" to two
    different values: (java.lang.Object)"java.lang.Object@2f608ac2",
    (java.lang.String)"wilma" This can occur when you fail to set both sides
    of a two-sided relation between objects, or when you map different fields
    to the same column, but you do not keep the values of these fields in
    synch.
         at kodo.jdbc.runtime.VRow.setObjectInternal(VRow.java(Compiled Code))
         at kodo.jdbc.sql.AbstractRow.setObject(AbstractRow.java(Compiled Code))
         at
    kodo.jdbc.meta.ColumnClassIndicator.insert(ColumnClassIndicator.java:143)
         at kodo.jdbc.runtime.UpdateManagerImpl.insert(UpdateManagerImpl.java:216)
         at kodo.jdbc.runtime.UpdateManagerImpl.insert(UpdateManagerImpl.java:219)
         at kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:108)
         at kodo.jdbc.runtime.UpdateManagerImpl.flush(UpdateManagerImpl.java:73)
    I've checked for the two possible errors to the best of my knowledge. Any
    input to resolve this issue is appreciated.
    Thanks in advance
    Srini
    Srinivasan Ranganathan wrote:
    Hi
    I have an abstract class B which itself extends another abstract class A.
    There is no table for A. The fields in A are mapped to B. I believe this
    is called "horizontal mapping"
    C and D inherit off B. There's a also a table named B (mapped to class B),
    but none for C or D. Instances of C and D are recorded in table B. I
    believe this is called "flat mapping"
    B has a field foo whose possible values are 'fred' and 'wilma'.
    If foo='fred', then the record is of type C
    If foo='wilma', then the record is of type D
    I believe this is called "class indicator" of type metadata.
    To express this, I have package.jdo which says
    <class name="A"/>
    <class name="B" persistence-capable-superclass="A"/>
    <class name="C" persistence-capable-superclass="B"/>
    <class name="D" persistence-capable-superclass="B"/>
    In B.mapping, I have
    <mapping>
    <package name="domain">
    <class name="B">
    <jdbc-class-map type="horizontal"/>
    <jdbc-class-ind type="metadata-value" column="foo"/>
    </class>
    </package>
    </mapping>
    B.java has a private String foo.
    In C.mapping, I have
    <mapping>
    <package name="domain">
    <class name="C">
    <jdbc-class-map type="flat"/>
    <jdbc-class-ind-value value="fred"/>
    field mappings for C
    </class>
    </package>
    </mapping>
    and similarly in D for value='wilma'
    My questions are...
    1. Is this kind of mapping supported by kodo?
    2. If so, is this configuration correct? I guess not, since I don't
    specify the table name anywhere. Where should it go?
    3. If I remove the "class indicator" mapping and run a simple test I get
    kodo.util.FatalUserException: There is no superclass mapping for mapping
    for "class domain.D".
         at
    kodo.jdbc.meta.FlatClassMapping.assertParentMapping(FlatClassMapping.java:49)
         at kodo.jdbc.meta.FlatClassMapping.getTable(FlatClassMapping.java:85)
         at
    kodo.jdbc.meta.OneToManyFieldMapping.fromMappingInfo(OneToManyFieldMapping.java:87)
    >>
         at
    kodo.jdbc.meta.RuntimeMappingProvider.getFieldMapping(RuntimeMappingProvider.java:160)
    >>
         at
    kodo.jdbc.meta.MappingRepository.getFieldMapping(MappingRepository.java:443)
         at
    kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapping.java:949)
    >>
    >>
    >>
    >>
    4. If I run a simple test with the horizontal, flat and class-indicator
    mappings, I get
    kodo.jdbc.meta.MappingInfoNotFoundException: The "class-column"
    attribute/extension for the class indicator on type
    "domain.B.<class-indicator>" is missing or names a column that does not
    exist.
         at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:135)
         at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:121)
         at
    kodo.jdbc.meta.ColumnClassIndicator.fromMappingInfo(ColumnClassIndicator.java:95)
    >>
         at
    kodo.jdbc.meta.RuntimeMappingProvider.initialize(RuntimeMappingProvider.java:135)
    >>
         at
    kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:378)
    >>
    >>
    >>
    What am I doing wrong?
    Thanks in advance
    Srini
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com

  • Kodo 3.1.5 - JBuilder X Integration Problem

    Hi,
    I am a newbie to both JBuilder X and Kodo, but I need to get a legacy application working with that environment (for maintenance purposes).
    My issue seems basic, but heck if I can figure it out. I am trying to configure Kodo to work with JBuilder. All I change in the Kodo 3.1.5 Configuration Utility is setting the "Connection Driver" to: "oracle.jdbc.driver.OracleDriver". When I try to save this, I get the following exception:
    WARN -- oracle.jdbc.driver.OracleDriver
    kodo.util.FatalDataStoreException: oracle.jdbc.driver.OracleDriver
    NestedThrowables:
    java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
         at kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:42)
         at kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:24)
         at kodo.jdbc.schema.DataSourceFactory.createDataSource(DataSourceFactory.java:96)
         at kodo.jdbc.conf.JDBCConfigurationImpl.createConnectionFactory(JDBCConfigurationImpl.java:954)
         at kodo.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(JDBCConfigurationImpl.java:869)
         at kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource(JDBCConfigurationImpl.java:960)
         at kodo.jdbc.runtime.JDBCStoreManager.setPersistenceManager(JDBCStoreManager.java:68)
         at kodo.runtime.PersistenceManagerImpl.initialize(PersistenceManagerImpl.java:196)
         at kodo.runtime.PersistenceManagerFactoryImpl.getPersistenceManager(PersistenceManagerFactoryImpl.java:139)
         at kodo.runtime.PersistenceManagerFactoryImpl.getPersistenceManager(PersistenceManagerFactoryImpl.java:102)
         at kodo.runtime.PersistenceManagerFactoryImpl.getPersistenceManager(PersistenceManagerFactoryImpl.java:95)
         at kodo.jdbc.ide.configuration.ConfigurationComponent.validateConfiguration(ConfigurationComponent.java:299)
         at kodo.jdbc.integration.jbuilder.ConfigurationPage.isPageValid(ConfigurationPage.java:255)
         at com.borland.primetime.properties.g.isPageValid(Unknown Source)
         at com.borland.primetime.properties.PropertyDialog.a(Unknown Source)
         at com.borland.primetime.properties.PropertyDialog.saveAndClose(Unknown Source)
         at com.borland.primetime.properties.j.actionPerformed(Unknown Source)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
         at java.awt.Component.processMouseEvent(Component.java:5100)
         at java.awt.Component.processEvent(Component.java:4897)
         at java.awt.Container.processEvent(Container.java:1569)
         at java.awt.Component.dispatchEventImpl(Component.java:3615)
         at java.awt.Container.dispatchEventImpl(Container.java:1627)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
         at java.awt.Container.dispatchEventImpl(Container.java:1613)
         at java.awt.Window.dispatchEventImpl(Window.java:1606)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:141)
         at java.awt.Dialog$1.run(Dialog.java:540)
         at java.awt.Dialog.show(Dialog.java:561)
         at com.borland.primetime.ui.DefaultDialog.show(Unknown Source)
         at java.awt.Component.show(Component.java:1133)
         at java.awt.Component.setVisible(Component.java:1088)
         at com.borland.primetime.properties.PropertyManager.showPropertyDialog(Unknown Source)
         at kodo.jdbc.integration.jbuilder.Actions$ConfigureKodoAction.perform(Actions.java:130)
         at kodo.jdbc.integration.jbuilder.Actions$ConfigureKodoAction.perform(Actions.java:124)
         at kodo.jdbc.integration.jbuilder.SafeBrowserAction.actionPerformed(SafeBrowserAction.java:70)
         at com.borland.primetime.ide.BrowserAction.actionPerformed(Unknown Source)
         at com.borland.primetime.actions.ActionButton.a(Unknown Source)
         at com.borland.primetime.actions.ActionButton.fire(Unknown Source)
         at com.borland.primetime.actions.ActionButton.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Component.java:4897)
         at java.awt.Container.processEvent(Container.java:1569)
         at java.awt.Component.dispatchEventImpl(Component.java:3615)
         at java.awt.Container.dispatchEventImpl(Container.java:1627)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
         at java.awt.Container.dispatchEventImpl(Container.java:1613)
         at java.awt.Window.dispatchEventImpl(Window.java:1606)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    Caused by: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
         at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:219)
         at kodo.jdbc.schema.DataSourceFactory.createDataSource(DataSourceFactory.java:55)
         ... 65 more
    NestedThrowablesStackTrace:
    java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
         at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:219)
         at kodo.jdbc.schema.DataSourceFactory.createDataSource(DataSourceFactory.java:55)
         at kodo.jdbc.conf.JDBCConfigurationImpl.createConnectionFactory(JDBCConfigurationImpl.java:954)
         at kodo.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(JDBCConfigurationImpl.java:869)
         at kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource(JDBCConfigurationImpl.java:960)
         at kodo.jdbc.runtime.JDBCStoreManager.setPersistenceManager(JDBCStoreManager.java:68)
         at kodo.runtime.PersistenceManagerImpl.initialize(PersistenceManagerImpl.java:196)
         at kodo.runtime.PersistenceManagerFactoryImpl.getPersistenceManager(PersistenceManagerFactoryImpl.java:139)
         at kodo.runtime.PersistenceManagerFactoryImpl.getPersistenceManager(PersistenceManagerFactoryImpl.java:102)
         at kodo.runtime.PersistenceManagerFactoryImpl.getPersistenceManager(PersistenceManagerFactoryImpl.java:95)
         at kodo.jdbc.ide.configuration.ConfigurationComponent.validateConfiguration(ConfigurationComponent.java:299)
         at kodo.jdbc.integration.jbuilder.ConfigurationPage.isPageValid(ConfigurationPage.java:255)
         at com.borland.primetime.properties.g.isPageValid(Unknown Source)
         at com.borland.primetime.properties.PropertyDialog.a(Unknown Source)
         at com.borland.primetime.properties.PropertyDialog.saveAndClose(Unknown Source)
         at com.borland.primetime.properties.j.actionPerformed(Unknown Source)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
         at java.awt.Component.processMouseEvent(Component.java:5100)
         at java.awt.Component.processEvent(Component.java:4897)
         at java.awt.Container.processEvent(Container.java:1569)
         at java.awt.Component.dispatchEventImpl(Component.java:3615)
         at java.awt.Container.dispatchEventImpl(Container.java:1627)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
         at java.awt.Container.dispatchEventImpl(Container.java:1613)
         at java.awt.Window.dispatchEventImpl(Window.java:1606)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:141)
         at java.awt.Dialog$1.run(Dialog.java:540)
         at java.awt.Dialog.show(Dialog.java:561)
         at com.borland.primetime.ui.DefaultDialog.show(Unknown Source)
         at java.awt.Component.show(Component.java:1133)
         at java.awt.Component.setVisible(Component.java:1088)
         at com.borland.primetime.properties.PropertyManager.showPropertyDialog(Unknown Source)
         at kodo.jdbc.integration.jbuilder.Actions$ConfigureKodoAction.perform(Actions.java:130)
         at kodo.jdbc.integration.jbuilder.Actions$ConfigureKodoAction.perform(Actions.java:124)
         at kodo.jdbc.integration.jbuilder.SafeBrowserAction.actionPerformed(SafeBrowserAction.java:70)
         at com.borland.primetime.ide.BrowserAction.actionPerformed(Unknown Source)
         at com.borland.primetime.actions.ActionButton.a(Unknown Source)
         at com.borland.primetime.actions.ActionButton.fire(Unknown Source)
         at com.borland.primetime.actions.ActionButton.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Component.java:4897)
         at java.awt.Container.processEvent(Container.java:1569)
         at java.awt.Component.dispatchEventImpl(Component.java:3615)
         at java.awt.Container.dispatchEventImpl(Container.java:1627)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
         at java.awt.Container.dispatchEventImpl(Container.java:1613)
         at java.awt.Window.dispatchEventImpl(Window.java:1606)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    So, it appears that it cannot find the Oracle class (oracle.jdbc.driver.OracleDriver). The ojdbc14.jar is in both my "required libraries" and my "classpath" for the JBuilder Project.
    Anyone know what I am doing wrong here?
    Thanks, in advance.
    Edited by houckman at 06/11/2007 8:25 AM

    Stephen Kim wrote:
    Did you set the StoreCharsAsNumbers=false in your DBDictionary setting?
    kodo.jdbc.DBDictionary: StoreCharsAsNumbers=false
    Jaime De La Jara F. wrote:
    Yes, but it seems we did something wrong, fortunely, after defining the
    correct CLASSPATH, we've got the mapping files with the right db
    structure, however there are some details to correct since when we execute
    the application, kodo complains about an int field not being compatible
    with a
    char column in the db, but the field is defined as char. Here is the error
    message :
    Caused by: kodo.jdbc.meta.MappingInfoNotFoundException: The "column"
    attribute/extension for field "cl.eclac.sca.modelo.Vertice.letter" names a
    column "LETTERX" in table "VERTICEX" whose type (CHAR) is not compatible
    with the type of the field (INTEGER).
    We are using Sybase adaptive Server 12.5. Any hint about this problem
    would
    be appreciated.
    No, we didn't try that option, however since the error was restricyed to
    only one class, we converted the field to a String and everything worked
    just fine. Thanks for the hint, we'll try it.

  • Take2 - Many-to-Many mapping on a single object/table via an external table.

    Plaease ignore the previous entry. Finger trouble on the keyboard
    accidentally posted prior to completion!
    Any takers on this one? If its simple, then great.
    I currently have a problem making the correct meta-data via xdoclet for a
    collection with a many-to-many mapping between an enhanced class and an
    xref table (which does not have an enhanced class associated with it.)
    Although page 184 of the Kodo JDO 3.01 Developers guide does spell out in
    fairly academic terms what has to be done, it still seems fairly
    impenetrable, after much mangling and hacking.
    As far as I can see the significantly questionable attributes are:-
    element-column.<pk column>*
    and
    ref-column.<pk column>*
    The asterisks and the associated texts indicate that these entries can be
    specified more than once.
    Here is my Meta data.
    * @jdo.field collection-type="collection"
    element-type="com.letsys.erespond.business.model.event.Condition"
    * @jdo.field-vendor-extension vendor-name="kodo" key="jdbc-field-map"
    value="many-many"
    * @jdo.field-vendor-extension vendor-name="kodo"
    key="jdbc-field-map/table" value="EventConditionConditionXref"
    * @jdo.field-vendor-extension vendor-name="kodo"
    key="jdbc-field-map/element-column.ID" value="EVENTCONDITIONID"
    * @jdo.field-vendor-extension vendor-name="kodo"
    key="jdbc-field-map/ref-column.EVENTCONDITIONID" value="ID"
    private Collection groupsToConditions;
    Here is the basic table which I wish to use for the xref
    create table EventConditionConditionXref(
    EventConditionId NUMBER(10) NOT NULL primary key,
    EventConditionIdGroupTo NUMBER(10) NOT NULL primary key
    The EventCondition class and table uses a field 'id' as its primary key.
    The intention is the xref table will hold many-many associations between
    multiple EventCondition.id instances in the underlying database.
    Thus the joing condition would be :
    select
    EventConditionIdGroupTo
    from
    EventCondition ec, EventConditionConditionXref ecx
    where
    ec.id = ecx.EventConditionId
    There are numerous variations that I have squeezed through it, but the net
    effect has always been
    BUILD FAILED
    file:C:/dev/projectm/build.xml:303:
    kodo.jdbc.meta.MappingInfoNotFoundException: The mapping for fie
    ld "com.letsys.erespond.business.model.event.Condition.groupsToConditions"
    is missing information on
    how to link the fields table to its owning class table, or the given
    information is invalid.
    I have tried many interpretations as to how
    element-column.<pk column>*
    and
    ref-column.<pk column>*
    should be represented, but always with the same 'not enough info' message.
    Am I missing something obvious, and/or not understanding something?
    Cheers Ed.

    Ed-
    I think what you want is:
    @jdo.field collection-type="collection"
    element-type="com.letsys.erespond.business.model.event.Condition"
    @jdo.field-vendor-extension vendor-name="kodo" key="jdbc-field-map"
    value="many-many"
    @jdo.field-vendor-extension vendor-name="kodo"
    key="jdbc-field-map/table" value="EventConditionConditionXref"
    @jdo.field-vendor-extension vendor-name="kodo"
    key="jdbc-field-map/ref-column.ID" value="EVENTCONDITIONID"
    @jdo.field-vendor-extension vendor-name="kodo"
    key="jdbc-field-map/element-column.ID" value="EVENTCONDITIONIDGROUPTO"
    Basically, the "ref-column.<primary key>" specifies the column in the
    join table that holds the primary key of the source side of the relation
    (the current class), and the "element-column.<primary key>" specifies
    the column in the join table that holds the primary key of the
    destination side of the relation (the content of the Collection field).
    Since it appears that you want the relation to be from Condition to
    Condition (i.e., have a relation it itself), the primary key in both
    cases will be the 'ID' column.
    Let us know if you still have problems with this. You might want to
    check out our graphical mapping workbench in 3.1, which helps greatly
    simplify composing your mappings.
    In article <[email protected]>, Ed Bett wrote:
    Plaease ignore the previous entry. Finger trouble on the keyboard
    accidentally posted prior to completion!
    Any takers on this one? If its simple, then great.
    I currently have a problem making the correct meta-data via xdoclet for a
    collection with a many-to-many mapping between an enhanced class and an
    xref table (which does not have an enhanced class associated with it.)
    Although page 184 of the Kodo JDO 3.01 Developers guide does spell out in
    fairly academic terms what has to be done, it still seems fairly
    impenetrable, after much mangling and hacking.
    As far as I can see the significantly questionable attributes are:-
    element-column.<pk column>*
    and
    ref-column.<pk column>*
    The asterisks and the associated texts indicate that these entries can be
    specified more than once.
    Here is my Meta data.
    * @jdo.field collection-type="collection"
    element-type="com.letsys.erespond.business.model.event.Condition"
    * @jdo.field-vendor-extension vendor-name="kodo" key="jdbc-field-map"
    value="many-many"
    * @jdo.field-vendor-extension vendor-name="kodo"
    key="jdbc-field-map/table" value="EventConditionConditionXref"
    * @jdo.field-vendor-extension vendor-name="kodo"
    key="jdbc-field-map/element-column.ID" value="EVENTCONDITIONID"
    * @jdo.field-vendor-extension vendor-name="kodo"
    key="jdbc-field-map/ref-column.EVENTCONDITIONID" value="ID"
    private Collection groupsToConditions;
    Here is the basic table which I wish to use for the xref
    create table EventConditionConditionXref(
    EventConditionId NUMBER(10) NOT NULL primary key,
    EventConditionIdGroupTo NUMBER(10) NOT NULL primary key
    The EventCondition class and table uses a field 'id' as its primary key.
    The intention is the xref table will hold many-many associations between
    multiple EventCondition.id instances in the underlying database.
    Thus the joing condition would be :
    select
    EventConditionIdGroupTo
    from
    EventCondition ec, EventConditionConditionXref ecx
    where
    ec.id = ecx.EventConditionId
    There are numerous variations that I have squeezed through it, but the net
    effect has always been
    BUILD FAILED
    file:C:/dev/projectm/build.xml:303:
    kodo.jdbc.meta.MappingInfoNotFoundException: The mapping for fie
    ld "com.letsys.erespond.business.model.event.Condition.groupsToConditions"
    is missing information on
    how to link the fields table to its owning class table, or the given
    information is invalid.
    I have tried many interpretations as to how
    element-column.<pk column>*
    and
    ref-column.<pk column>*
    should be represented, but always with the same 'not enough info' message.
    Am I missing something obvious, and/or not understanding something?
    Cheers Ed.
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • Horizontal mapping + embedded one-to-one problem

    Hi,
    this message corresponds to the article "Embedded One-to-One mapping
    problem". But this article is more exactly then the first without less
    unnessary information.
    I got an abstract super-class Person which is mapped horizontal.
    Student inherits from Person.
    Person contains an attribute called location(instance of Class Location)
    which should be mapped "embedded one-to-one".
    Since Person is mapped horizontal no table will be used for Person.
    I get following exception when running mappingtool on action "buildSchema"
    kodo.jdbc.meta.MappingInfoNotFoundException: No mapping information was
    found for "xxx.yyy.zzz.persistence.jdo.business.Location.lat"
    I think Kodo tries to map the field "location" since the field is declared
    as embedded. But it can not embed the field since Person is horizontal
    mapped and no table for Person exists where the corresponding field of
    Location could be placed in. Also it is not possible to set the "embedded"
    attribute in the subclass Student for the field "location" because it must
    be specified in the superclass.
    Can you help me ?
    Thanks a lot,
    Felix
    Additional information:
    =======================
    Exception stack trace:
    [mappingtool] kodo.jdbc.meta.MappingInfoNotFoundException: No mapping
    information was found for "xxx.yyy.zzz.persistence.jdo.business.Location".
    [mappingtool] at
    kodo.jdbc.meta.RuntimeMappingProvider.getMapping(RuntimeMappingProvider.java:44)
    [mappingtool] at
    kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:352)
    [mappingtool] at
    kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:307)
    [mappingtool] at
    kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:162)
    [mappingtool] at
    kodo.jdbc.meta.MappingTool.buildSchema(MappingTool.java:646)
    [mappingtool] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:951)
    [mappingtool] at
    kodo.jdbc.ant.MappingToolTask.executeOn(MappingToolTask.java:175)
    [mappingtool] at com.solarmetric.ant.TaskBase.execute(TaskBase.java:105)
    [mappingtool] at
    org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
    [mappingtool] at org.apache.tools.ant.Task.perform(Task.java:364)
    [mappingtool] at org.apache.tools.ant.Target.execute(Target.java:301)
    [mappingtool] at
    org.apache.tools.ant.Target.performTasks(Target.java:328)
    [mappingtool] at
    org.apache.tools.ant.Project.executeTarget(Project.java:1215)
    [mappingtool] at
    org.apache.tools.ant.Project.executeTargets(Project.java:1063)
    [mappingtool] at org.apache.tools.ant.Main.runBuild(Main.java:632)
    [mappingtool] at org.apache.tools.ant.Main.startAnt(Main.java:183)
    [mappingtool] at
    org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
    [mappingtool] at
    org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
    Here is the JDO-Metadata:
    <?xml version="1.0" encoding="UTF-8"?>
    <jdo>
    <package name="xxx.yyy.zzz.persistence.jdo.business">
    <class name="Location"/>
    <class name="Person" identity-type="application"
    objectid-class="PersonId">
    <field name="location" embedded="true"/>
    <field name="id" primary-key="true"/>
    </class>
    <class name="Student" identity-type="application"
    persistence-capable-superclass="Person"/>
    </package>
    </jdo>
    Here is the mapping-metadata:
    <?xml version="1.0" encoding="UTF-8"?>
    <mapping>
    <package name="xxx.yyy.zzz.persistence.jdo.business">
    <class name="Person">
    <jdbc-class-map type="horizontal"/>
    </class>
    <class name="Student">
    <jdbc-class-map type="base" table="STUDENT"/>
    <jdbc-version-ind type="version-number" column="JDOVERSION"/>
    <jdbc-class-ind type="in-class-name" column="JDOCLASS"/>
    <field name="Person.birthDate">
    <jdbc-field-map type="value" column="BIRTHDATE"/>
    </field>
    <field name="Person.city">
    <jdbc-field-map type="value" column="CITY"/>
    </field>
    <field name="Person.id">
    <jdbc-field-map type="value" column="ID"/>
    </field>
    <field name="Person.location">
    <jdbc-field-map type="embedded"
    null-ind-column="NULL_INDICATOR" synthetic="false">
    <field name="lat">
    <jdbc-field-map type="value" column="LATITUDE"/>
    </field>
    <field name="lon">
    <jdbc-field-map type="value" column="LONGITUDE"/>
    </field>
    </jdbc-field-map>
    </field>
    <field name="Person.name">
    <jdbc-field-map type="value" column="NAME"/>
    </field>
    <field name="Person.picture">
    <jdbc-field-map type="value" column="PICTURE"/>
    </field>
    <field name="Person.state">
    <jdbc-field-map type="value" column="STATE"/>
    </field>
    <field name="Person.street">
    <jdbc-field-map type="value" column="STREET"/>
    </field>
    <field name="Person.zipcode">
    <jdbc-field-map type="value" column="ZIPCODE"/>
    </field>
    </class>
    <class name="Location">
    <jdbc-class-map type="none"/>
    <field name="lat">
    <jdbc-field-map type="none"/>
    </field>
    <jdbc-class-map type="none"/>
    <field name="lon">
    <jdbc-field-map type="none"/>
    </field>
    </class>
    </package>
    </mapping>
    Here are the class definitions:
    Class Location:
    public class Location {
         private int lat;
         private int lon;
    Class Person:
    public abstract class Person {
    private int id;
    private String name;
    private String street;
    private String city;
    private String state;
    private String zipcode;
    private Date birthDate;
    private String picture;
    private Location location;
    Class Person:
    public class Student extends Person {

    You'll probably have much better luck sending this question to
    [email protected]; the newsgroup is generally for quick questions
    about certain features or problems the community might be able to solve
    without input from SolarMetric developers.

  • Kodo 3.1.5 Released!

    All,
    Kodo 3.1.5 is now available! Get your copy while supplies last!
    Available only direct from SolarMetric at
    http://www.solarmetric.com/jdo/Evaluate/
    There are a number of bug fixes in this patch release. You can find the
    release notes at:
    http://www.solarmetric.com/jdo/Documentation/latest/docs/relnotes.html
    Enjoy,
    -Greg
    Greg Campbell
    SolarMetric Inc.

    Stephen Kim wrote:
    Did you set the StoreCharsAsNumbers=false in your DBDictionary setting?
    kodo.jdbc.DBDictionary: StoreCharsAsNumbers=false
    Jaime De La Jara F. wrote:
    Yes, but it seems we did something wrong, fortunely, after defining the
    correct CLASSPATH, we've got the mapping files with the right db
    structure, however there are some details to correct since when we execute
    the application, kodo complains about an int field not being compatible
    with a
    char column in the db, but the field is defined as char. Here is the error
    message :
    Caused by: kodo.jdbc.meta.MappingInfoNotFoundException: The "column"
    attribute/extension for field "cl.eclac.sca.modelo.Vertice.letter" names a
    column "LETTERX" in table "VERTICEX" whose type (CHAR) is not compatible
    with the type of the field (INTEGER).
    We are using Sybase adaptive Server 12.5. Any hint about this problem
    would
    be appreciated.
    No, we didn't try that option, however since the error was restricyed to
    only one class, we converted the field to a String and everything worked
    just fine. Thanks for the hint, we'll try it.

  • Migration from 2.5.8 to 3.3.1

    Hi,
    Tried to migrate my *.jdo from 2.5.8 to 3.3.1 using ant task
    kodo2migrator, which appeared to have worked fine after tweaking with
    CLASSPATH. However, when I run the app, that is what I get:
    kodo.jdbc.meta.MappingInfoNotFoundException: The "column"
    attribute/extension for field
    "com.algorithmics.oprisk.bean.org.Org.assetSize" names a column
    "ASSET_SIZE" in table "ORG" whose type (VARCHAR) is not compatible with
    the type of the field (DOUBLE).
    [com.algorithmics.oprisk.bean.org.Org.assetSize
    [kodo.jdbc.meta.ValueFieldMapping]]
         at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:134)
    It worked fine in 2.5.8, so why is it not working now?
    Brgrds

    Resolved offline -- Kodo 3.3's externalizer and factory metadata
    extensions can convert doubles to strings.
    -Patrick
    Viktor Levine wrote:
    Hi,
    Tried to migrate my *.jdo from 2.5.8 to 3.3.1 using ant task
    kodo2migrator, which appeared to have worked fine after tweaking with
    CLASSPATH. However, when I run the app, that is what I get:
    kodo.jdbc.meta.MappingInfoNotFoundException: The "column"
    attribute/extension for field
    "com.algorithmics.oprisk.bean.org.Org.assetSize" names a column
    "ASSET_SIZE" in table "ORG" whose type (VARCHAR) is not compatible with
    the type of the field (DOUBLE).
    [com.algorithmics.oprisk.bean.org.Org.assetSize
    [kodo.jdbc.meta.ValueFieldMapping]]
         at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:134)
    It worked fine in 2.5.8, so why is it not working now?
    Brgrds

  • (Kodo 3.3.4) Generics & Xdoclet problem

    My development environment is java version "1.5.0_07" on XP Professional, with eclipse 3.2.
    I am using annotations via Xdoclet's @jdo to generate mapping metadata for my model objecs. This particular mapping that follows fails with a
    <pre>
    kodo.jdbc.meta.MappingInfoNotFoundException: No mapping information was
    found for "org.foobar.domain.Person.mCollectionOfStuff".
    </pre>
    The Xdoclet tags are as follows:
    <pre>
    * @jdo.field
    * collection-type="collection"
    * element-type="org.foobar.domain.IData"
    * embedded-element="false"
    * @jdo.field-vendor-extension vendor-name="kodo"
    * key="jdbc-field-map"
    * value="one-many"
    * @jdo.field-vendor-extension vendor-name="kodo"
    * key="jdbc-field-map/ref-column.ID"
    * value="DATAID"
    * @jdo.field-vendor-extension vendor-name="kodo"
    * key="jdbc-field-map/table"
    * value="PERSON_DATA"
    private List<IData> mCollectionOfStuff;
    </pre>
    When I remove the Generics friendly declaration to the following, it works:-
    <pre>
    private List mCollectionOfStuff;
    </pre>
    Does this mean that KODO 3.3.4 does not support Generics ?

    Laurent,
    I'm very sure my build environment is fine. I can compile, deploy & run without the use of generics for the Collection member. However, I will get a compile-time error when I declared the collection using generics.
    Thanks
    Gavin

Maybe you are looking for

  • How do I remove the Verizon instructions from end of my customized greeting?

    Hello everyone.  I've called Verizon repeatedly about this one and they say they can't help.  I want to remove the Verizon system message from the end of my customized greeting and reduce the number of rings (currently 5) before my callers can leave

  • Connecting to an Oracle DB

    Anyone have a how-to on connecting to an Oracle database via PHP under OS X Server?

  • Printer tray selection in smartforms

    Hi All, I have a requirement that for a particluar printer the smartform should be printed using a particular tray (for ex. Tray4). How can this be achieved? Regards..

  • J2EE server stops while stopping irj application

    Hi We are getting Problem while trying to stop irj application before applying Patch 2 SP2 in EP 6.0. The server stops and displays message connection Lost in admin tool. Pl help me to solve the Problem. Regards Atul

  • Add tftp server settings to dhcp

    I have a cisco 3750g that I use to hand out DHCP addresses. I also have a pxe server I'd like to be able to use. How would I add the next-server and the pxelinux file to the dhcp? Thank you!