KODO Support

KODO released a new early Access 4.
Is workshop studio going to work with Early Access 4
I saw an article on dev2dev that BEA os opensourcing KODO and merging all the development tools to Workshop studio
Do you have any timeframe for the integration of those tools?

Yes, you need to run kodoc outside of workshop studio.
The typical steps are:
- Open a DOS console
- goto <KODO_Home>/bin/kodocmd.bat
- Update CLASSPATH with other required libraries (including project's META-INF directory)
- run kodoc -p persistence.xml
- Once all entity classes are enhanced you can switch back to Workshop and execute query using EJB-QL editor
For more info refer to KODO docs:
- <KODO_Home>docs/full/html/ejb3_tutorial.html
- <KODO_Home>docs/full/html/ref_guide_pc_enhance.html

Similar Messages

  • Will Kodo support javax.jdo.option.ChangeApplicationIdentity?

    As of 3.2.2, Kodo doesn't support the optional feature
    javax.jdo.option.ChangeApplicationIdentity. Is there any plan to support
    this? We've got some legacy data schemas that use 5-column compound keys
    where we often need to change one of the columns. Right now we're forced to
    delete the old object and insert the new one -- but we'd like to avoid that.
    Thanks!
    - Ted Young

    Ted M. Young wrote:
    As of 3.2.2, Kodo doesn't support the optional feature
    javax.jdo.option.ChangeApplicationIdentity. Is there any plan to support
    this? We've got some legacy data schemas that use 5-column compound keys
    where we often need to change one of the columns. Right now we're forced to
    delete the old object and insert the new one -- but we'd like to avoid that.Unfortunately, we have no plans to support ChangeApplicationIdentity. It's a
    nightmare when you get into relations between objects whose keys are changing.

  • How do I get support?

    I emailed [email protected] like I've always done for the past 3 years. The auto-reply I recieved today included this message:
    WARNING: AS OF SEPTEMBER 9, ALL REQUESTS FOR SERVICE MUST BE SUBMITTED DIRECTLY TO BEA Support. There will be no reply to the email you have submitted. Please resubmit your request via one of the following BEA Support interfaces:
    1.     Web-based support
    Access our AskBEA knowledgebase, and open cases via the web at http://support.bea.com
    2.     Phone based Support
    If you have purchased support, and would prefer to contact us by phone, call the BEA Support Center in your region during business hours. A complete list of phone numbers can be found at: http://www.bea.com/framework.jsp?CNT=index.htm&FP=/content/support/contacts/
    I visited http://support.bea.com but did not see where I should file a Kodo support ticket.
    I tried visiting Kodo's page on BEA's site: http://www.bea.com/framework.jsp?CNT=index.htm&FP=/content/support/kodo
    At the top is a link for "BEA Kodo Support Request". Clicking that takes me to a page that says for Kodo support, I should visit the support home. Well the support home is the first link I provided above, which again, does seem to show me where to get help.
    Where should Kodo users go to get support?
    Thanks,
    Brian

    You can log in at http://support.bea.com/application?namespace=portal and then click on Manage cases and on Create a new case.
    Thank you,
    Laurent Goldsztejn
    Sr Backline Support Engineer
    BEA Systems, Inc. E-Commerce Server Division
    http://www.bea.com

  • Support for "Interface Based Design"

    I would like two PC classes that implement a common interface, but the two
    PC classes are not related by inheritance, and would not be stored in the
    same table. For example,
    public interface VersionNumber {
    int getNumber();
    boolean isComparableTo( VersionNumber vn );
    /** PC class **/
    public class BasicVersionNumber implements VersionNumber {
    /** PC class **/
    public class CustomVersionNumber implements VersionNumber {
    /** PC class **/
    public class Paper {
    VersionNumber vn;
    Since "BasicVersionNumber" and "CustomVersionNumber" are not related via
    inheritance, they would not generally reside in the same database table.
    It would mean that the table containing "Paper" would need both the target
    table for this instance of "vn", and the primary key for "vn". It appears
    that KODO assumes the target table is available in the Meta-Data file, but
    with interface-based design, that is not known until run time and could be
    different for different instances of class "Paper".
    Is it possible to do this with KODO? Where can I go to understand how.
    Keith L. Musser
    Integrated Dynamics, Inc.
    812-371-7777
    email: [email protected]
    Disclaimer - This email, and any files transmitted with it, are confidential
    and may contain privileged or copyright information. If you are not the
    intended recipient you must not copy, distribute or use this email, or the
    information contained herein, for any purpose other than to notify us. If
    you received this email in error, please notify the sender immediately, and
    delete this email from your system.

    Kodo supports interfaces as fields (in Kodo 3, we support interfaces for
    more relation types). Kodo will store the toString () of the JDO
    identity for the actual concrete instance in the column as there is no
    formal O/R relation between the table and the interface field type.
    Keith Musser wrote:
    I would like two PC classes that implement a common interface, but the two
    PC classes are not related by inheritance, and would not be stored in the
    same table. For example,
    public interface VersionNumber {
    int getNumber();
    boolean isComparableTo( VersionNumber vn );
    /** PC class **/
    public class BasicVersionNumber implements VersionNumber {
    /** PC class **/
    public class CustomVersionNumber implements VersionNumber {
    /** PC class **/
    public class Paper {
    VersionNumber vn;
    Since "BasicVersionNumber" and "CustomVersionNumber" are not related via
    inheritance, they would not generally reside in the same database table.
    It would mean that the table containing "Paper" would need both the target
    table for this instance of "vn", and the primary key for "vn". It appears
    that KODO assumes the target table is available in the Meta-Data file, but
    with interface-based design, that is not known until run time and could be
    different for different instances of class "Paper".
    Is it possible to do this with KODO? Where can I go to understand how.
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com

  • Support for suing sql directly.

    Hi All,
    I'm new to Kodo, does it support using native sql in JDOQL? that is,
    directly coding my queries in sql and passing them to JDOQL to parse and
    execute?
    If not available, is there any plans to integrate this feature or similar
    ones ?
    thanks.

    Just to clarify, Kodo supports using SQL at every level:
    1) JDOQL/Query - Query Extensions
    2) Custom Result Object Provider - issue total custom SQL queries
    2) Mapping - See our customSQL for examples
    Stephen Kim wrote:
    There is no direct support for using SQL however most of our users can
    accomplish the same thing using our Query Extensions (see our docs)
    which allow you embed an entire where clause if so desired.
    I think using SQL -instead- of JDOQL is on the project plan but I'm not
    sure of the time frame.
    Also, note that one can usually get around this limitation by using
    Custom Object Provider. See the customSQL sample included in the
    distribution for examples of this. This example includes a number of
    different examples, but the main one to note is the
    PersonResultObjectProvider portion.
    Amr Noaman Abdel-Hamid wrote:
    Hi All,
    I'm new to Kodo, does it support using native sql in JDOQL? that is,
    directly coding my queries in sql and passing them to JDOQL to parse and
    execute?
    If not available, is there any plans to integrate this feature or similar
    ones ?
    thanks.
    Stephen Kim
    [email protected]
    SolarMetric, Inc.
    http://www.solarmetric.com

  • KODO Disgrace - Newgroup Quality

    KODO Newsgroup Quality
    We are planning to use KODO as the underlying persistence mechanism for an already implemented system. We have updated our persistency wrapper with the JPA compliant KODO since we wanted to be JPA compliant. Everything were fine till we started to use the wrarpper in the real system. We had some problems during the migration.
    That shall be disgrace. There is no reply to our posts even more than a month. Maybe this place is not to write such questions, maybe there is a bug, maybe we couldnt clearly explain the problem etc etc.. however our posts does not have even a single negative/positive reply. We are almost on the edge of giving up the decision to use KODO. If the problem is the money, we planned to use it with the end of a successful migration.
    Congratulations dear KODO team, and thank you.
    Siyamed

    We are reading these forums.
    Unfortunately, our response times have not been good because we had not set up a responsibility for creating responses. But we do care very much about the concerns raised here, and I am as disturbed as you to find that our Support is not hitting the mark. Rest assured, I’m taking action on this.
    Marc Logemann does hit the nail on the head when he identifies these problems as stemming mainly from the transition. Kodo developers used to monitor these user groups, but we’ve assigned the Kodo developers to new product development. In their place, we are training a new Kodo Support Team, but it does take time to put infrastructure in place—which is why our responses… even this one… may seem sluggish in this transition phase. Once people are in place with the expertise needed, I think you’ll find our responses to be both swift and knowledgeable.
    However, that isn’t an excuse. The truth is, it was never our intention to ignore developers, even during this transition period. We do still have support structures in place for Kodo. Our support team is not quite up to the level of the original Kodo engineers, it is true, but we expected them to meet the need during this transition.
    I think the major disconnect here is that Kodo users have been used to receiving support in a different way than we anticipated, and in a different way than we are used to providing it. However, we should have done a better job of familiarizing long-time Kodo users like you with the processes BEA has in place for customers to raise and escalate concerns and get issue resolution. We should have been more prepared for the culture you already have in place.
    Luckily, that is easily remedied. We are working to get everyone educated about our Support channels. We are also in the process of building a strong infrastructure to provide Kodo users with BEA’s normal level of comprehensive support. And we expect to be able to regularly review forums such as this one.
    As for our support of Kodo as a stand-alone product: it is absolutely not in question. BEA’s resource commitment to Kodo is very strong. We do not intend to change the things that make Kodo most successful. I’ve copied and pasted a few bullet points below to indicate how we are working internally to bring Kodo support up to date.
    Here are some of the commitments BEA is making to Kodo:
    a.     More BEA Support engineers assigned to Kodo (and currently coming up to speed) than the size of the entire original SolarMetric engineering team prior to acquisition.
    b.     Kodo Support engineers training in all regions worldwide. This enables us to provide business hour support including phone support in EMEA and APAC as well as in the Americas.
    c.     24x7 Production Support, another first for Kodo customers. Previous SolarMetric support was email-only and on a 12x5 basis (10 AM – 10 PM EST).
    d.     We have been focusing the expertise of the Kodo Engineers on product development: This year, the BEA Kodo team delivered a major release for EJB3 (Kodo 4.0) and released that technology to the open source community via Open JPA. We are also nearing the release for JDO2 (Kodo 4.1).
    e.     Adding staff and additional trainings in preparation for future releases of Kodo.
    I hope this answers some of the questions raised here. I encourage you to contact me if you have concerns about the support you are receiving from BEA.
    Thanks for offering us feedback and for your support of Kodo.
    Terry Clearkin
    WW SVP, BEA Support

  • DB2 9.1 support

    Hi,
    Can someone tell me when kodo support for DB2 9.1 will be added?
    Thanks,
    Jim
    http://edocs.bea.com/kodo/docs41/supp_configs/supp_configs.html

    Thank you for your response. ok ..So Note 116845 says that End of Support Date for DB2 8.1 will be 31-12-2015 ..So it is end of regular maintenance support or end of Extended Support from SAP ?
    Thanks  in Advance.
    Regards,
    Saurabh

  • Kodo & non relational data storage

    I noticed you are working on LDAP adapter for Kodo. That's nice
    I was wondering why didn't you try to have support for Oracle Objects. It
    should be relatively easy to map JDO onto oracle objects. JDQL might be
    tricky but mapping itself should be pretty straightforward
    I think the primary reason people do not use oracle objects much because
    oracle did not provide any reasonable client binding mechanism. Their
    JPublisher is pretty useless but given JDO frontent it will be nice
    Alex

    Alex,
    Kodo supports Versant object database as persistent storage in
    Kodo/Versant JDO version.
    Pinaki
    Alex Roytman wrote:
    I noticed you are working on LDAP adapter for Kodo. That's nice
    I was wondering why didn't you try to have support for Oracle Objects. It
    should be relatively easy to map JDO onto oracle objects. JDQL might be
    tricky but mapping itself should be pretty straightforward
    I think the primary reason people do not use oracle objects much because
    oracle did not provide any reasonable client binding mechanism. Their
    JPublisher is pretty useless but given JDO frontent it will be nice
    Alex

  • JDOHelper cannot be used in place of KodoHelper

    Environment: _
    kodo-jdo-3.0.0RC1 on Windows XP Pro SP1
    Hi all,
    I think we have found a bug regarding Kodo licensing and JDOHelper. I have a test case, based on Kodo's tutorial, which demonstrates this, available on demand.
    As far as we can see, you have no other choice than using KodoHelper class, which will pick-up kodo.properties properly.
    If you use JDOHelper class instead you get a license error - See stack below.
    We feel this is a regression since using JDOHelper was working fine with Kodo 3.0 beta release.
    Could you please confirm there is a bug here ?
    I have modified the JDOFactory class in the tutorial to either use KodoHelper or use JDOHelper, based on a parameter:
    PersistenceManager pm _ JDOFactory.getPersistenceManager (JDOFactory.KODO_HELPER);
    or
    PersistenceManager pm _ JDOFactory.getPersistenceManager (JDOFactory.JDO_HELPER);
    In JDOFactory.java:
    if ( mode __ KODO_HELPER ) {
    /* Solution 1 : use KodoHelper.
    * This is currently the only working solution._
    factory _ KodoHelper.getPersistenceManagerFactory("kodo.properties");
    } else if ( mode __ JDO_HELPER ) {
    /* Solution 2 : use JDOHelper.
    * This is the standard solution. But it does not work._
    Properties properties _ new Properties();
    properties.setProperty(
    "javax.jdo.PersistenceManagerFactoryClass",
    "kodo.versant.ObjectPersistenceManagerFactory");
    properties.setProperty("javax.jdo.option.ConnectionURL", "jdodb");
    properties.setProperty("javax.jdo.option.ConnectionUserName",
    System.getProperty("user.name"));
    factory _ JDOHelper.getPersistenceManagerFactory(properties);
    Using KodoHelper we get the following:
    [c:\myarea\dev\jdo\tutorial kodo]java tutorial.SeedDatabase
    Created 5 new dogs.
    Using JDOHelper we get the following:
    Exception in thread "main" javax.jdo.JDOFatalUserException: Exception thrown by getPersistenceManagerFactory(Properties)
    NestedThrowables:
    java.lang.reflect.InvocationTargetException
    at javax.jdo.JDOHelper.getPersistenceManagerFactory(Unknown Source)
    at javax.jdo.JDOHelper.getPersistenceManagerFactory(Unknown Source)
    at tutorial.JDOFactory.getPersistenceManagerFactory(JDOFactory.java:49)
    at tutorial.JDOFactory.getPersistenceManager(JDOFactory.java:64)
    at tutorial.SeedDatabase.main(SeedDatabase.java:30)
    Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    .... 5 more
    Caused by: com.solarmetric.license.LicenseException: No product license key was found. Please ensure that your license key is specified in y
    our kodo.properties file (or in the "General" tab of your IDE's configuration dialog), that the key has not expired, and that it is the corr
    ect key for the version of the product that you are running. If you need to request an evaluation key, please go to http://www.solarmetric.c
    om, or contact [email protected].
    at com.solarmetric.license.License.<init>(License.java:43)
    at kodo.conf.JDOConfigurationImpl.getLicense(JDOConfigurationImpl.java:311)
    at kodo.runtime.PersistenceManagerFactoryImpl.<init>(PersistenceManagerFactoryImpl.java:79)
    at kodo.versant.ObjectPersistenceManagerFactory.<init>(ObjectPersistenceManagerFactory.java:35)
    at kodo.versant.ObjectPersistenceManagerFactory.getPersistenceManagerFactory(ObjectPersistenceManagerFactory.java:47)
    .... 9 more
    Thanks,
    P@trick
    Patrick Guillot Versant France Support Technique
    tel.: 0 810 810 664 http://www.versant.fr [email protected]

    Patrick-
    Excuse the interruption, and if I am stating the obvious, but I don't
    see a "kodo.LicenseKey" property in the Properties object that you create:
    Properties properties = new Properties();
    properties.setProperty(
    "javax.jdo.PersistenceManagerFactoryClass",
    "kodo.versant.ObjectPersistenceManagerFactory");
    properties.setProperty("javax.jdo.option.ConnectionURL", "jdodb");
    properties.setProperty("javax.jdo.option.ConnectionUserName",
    System.getProperty("user.name"));
    factory = JDOHelper.getPersistenceManagerFactory(properties);
    Are you expecting Kodo to pick it up from a kodo.properties file in the
    CLASSPATH? If so, then that isn't the way it works: Kodo will only use
    the kodo.properties file if you maually specify it. You need to include
    the license key in your properties object.
    In article <[email protected]>, Guillot wrote:
    This is exactly what I did! I reproduce the issue not only with Versant,
    but also with JDBC, using MySQL.
    If you allow, I can send you the very simple test case and all information
    you'll ask me to send.
    Thanks,
    Stephen Kim wrote:
    My guess is that Versant's ObjectPersistenceManagerFactory creates a new
    JDOConfiguration with the loadDefaults option set to false. If you can
    replicate this with JDBCPersistenceManagerFactory, we can continue
    discussing this problem here. Otherwise, I would point you to Versant's
    internal Kodo support system.
    Guillot wrote:
    But my classpath does not change between my test using KodoHelper and
    the one using JDOHelper. I use the same command window and run one test
    after the other. So, why does KodoHelper find kodo.properties while
    JDOHelper does not?
    More over, kodo.properties is located in the directory where I have the
    tutorial package. So, if it was a classpath issue, I would get a
    ClassNotFound Exception when using tutorial.SeedDatabase. Which is not the
    case.
    I agree that using FileInputStream to load kodo.properties is a working
    work-around. But the method I use should also work - and it used t work.
    In the past, we have never been setting the license key in a property, in
    the source code. It has always been picked up by kodo in kodo.properties.
    Cheers,
    P@trick
    Stephen Kim wrote:
    This is not a bug as we use JDOHelper for most of our internal tests for
    JDO compliance. My guess is that you do not have kodo.properties at the
    root of your system classpath, and thus when you initialize your
    properties object, there is no license key. Instead of setting
    properties (in which case you should be setting the kodo.LicenseKey
    property), try using a FileInputStream to load kodo.properties.
    support.versant wrote:
    Environment:
    kodo-jdo-3.0.0RC1 on Windows XP Pro SP1
    Hi all,
    I think we have found a bug regarding Kodo licensing and JDOHelper. I
    have a test case, based on Kodo's tutorial, which demonstrates this,
    available on demand.
    As far as we can see, you have no other choice than using KodoHelper
    class, which will pick-up kodo.properties properly.
    If you use JDOHelper class instead you get a license error - See stack
    below.
    We feel this is a regression since using JDOHelper was working fine with
    Kodo 3.0 beta release.
    Could you please confirm there is a bug here ?
    I have modified the JDOFactory class in the tutorial to either use
    KodoHelper or use JDOHelper, based on a parameter:
    PersistenceManager pm = JDOFactory.getPersistenceManager
    (JDOFactory.KODO_HELPER);
    or
    PersistenceManager pm = JDOFactory.getPersistenceManager
    (JDOFactory.JDO_HELPER);
    In JDOFactory.java:
    if ( mode == KODO_HELPER ) {
    /* Solution 1 : use KodoHelper.
    * This is currently the only working solution.
    factory = KodoHelper.getPersistenceManagerFactory("kodo.properties");
    } else if ( mode == JDO_HELPER ) {
    /* Solution 2 : use JDOHelper.
    * This is the standard solution. But it does not work.
    Properties properties = new Properties();
    properties.setProperty(
    "javax.jdo.PersistenceManagerFactoryClass",
    "kodo.versant.ObjectPersistenceManagerFactory");
    properties.setProperty("javax.jdo.option.ConnectionURL", "jdodb");
    properties.setProperty("javax.jdo.option.ConnectionUserName",
    System.getProperty("user.name"));
    factory = JDOHelper.getPersistenceManagerFactory(properties);
    Using KodoHelper we get the following:
    =====================================
    [c:myareadevjdotutorial kodo]java tutorial.SeedDatabase
    Created 5 new dogs.
    Using JDOHelper we get the following:
    =====================================
    Exception in thread "main" javax.jdo.JDOFatalUserException: Exception
    thrown by getPersistenceManagerFactory(Properties)
    NestedThrowables:
    java.lang.reflect.InvocationTargetException
    at javax.jdo.JDOHelper.getPersistenceManagerFactory(Unknown Source)
    at javax.jdo.JDOHelper.getPersistenceManagerFactory(Unknown Source)
    at tutorial.JDOFactory.getPersistenceManagerFactory(JDOFactory.java:49)
    at tutorial.JDOFactory.getPersistenceManager(JDOFactory.java:64)
    at tutorial.SeedDatabase.main(SeedDatabase.java:30)
    Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    ... 5 more
    Caused by: com.solarmetric.license.LicenseException: No product license
    key was found. Please ensure that your license key is specified in y
    our kodo.properties file (or in the "General" tab of your IDE's
    configuration dialog), that the key has not expired, and that it is thecorr
    ect key for the version of the product that you are running. If you need
    to request an evaluation key, please go to http://www.solarmetric.c
    om, or contact [email protected].
    at com.solarmetric.license.License.<init>(License.java:43)
    at
    kodo.conf.JDOConfigurationImpl.getLicense(JDOConfigurationImpl.java:311)
    at
    kodo.runtime.PersistenceManagerFactoryImpl.<init>(PersistenceManagerFactoryImpl.java:79)
    at
    kodo.versant.ObjectPersistenceManagerFactory.<init>(ObjectPersistenceManagerFactory.java:35)
    at
    kodo.versant.ObjectPersistenceManagerFactory.getPersistenceManagerFactory(ObjectPersistenceManagerFactory.java:47)
    ... 9 more
    Thanks,
    P@trick
    Patrick Guillot Versant France SupportTechnique
    tel.: 0 810 810 664 http://www.versant.fr
    [email protected] <mailto:[email protected]>
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • 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

  • Query.setRange() not available on standard javax.jdo.Query interface?

    Hi Kodo people, I'm trying out Kodo 3.2.0, most specifically for the
    spiffy new setRange() functionality. However, I'm somewhat confused
    because while the docs clearly indicate that the setRange() method is
    available on the standard javax.jdo.Query interface, it's not available
    on the javax.jdo.Query class that ships with Kodo 3.2.0. I have to cast
    my query to a KodoQuery in order for this to work. Is this expected?
    Thanks,
    -Mike
    Michael Allen
    Technical Lead
    PGP Corporation

    I think you missed the note at the beginning of the query chapter in the docs:
    Much of the functionality we discuss in this chapter is new to JDO 2. Though
    Kodo supports all of the features defined in the following sections, many JDO
    implementations may not. Additionally, because official JDO 2 jars are not yet
    available, you will have to cast your query objects to kodo.query.KodoQuery to
    access any JDO 2 APIs. The UML diagram above depicts these APIs in bold. For
    simplicity, casts have been left out of the example code throughout the chapter.

  • Maintaining referential integrity using MS SQL server

    Some time ago I posted a question relating to the following extension:
    <extension vendor-name="kodo" key="jdbc-delete-action" value="null"/>
    Kodo generates a "on delete set null" constraint for this, however ms sql
    server does not support this. Since I don't want to matain this referential
    integrity in my java code (meaning as soon as an object is deleted, setting
    all references to it to null), I tried to implement a custom dictionary with
    the default ms sql server solution for this problem: creating a trigger by
    overriding the "getAddForeignKeySQL" method. This works fine when creating a
    database from scratch using the schema tool, however, when updating an
    existing databasebase schema, this is ignored, thereby not solving the
    problem of having the database maintenance automated. I suppose I have to
    write code for checking whether the trigger already exists. Browsing through
    the code, I couldn't figure out how this is done. Can someone give me
    suggestions on how to do this (and if this takes a lot of effort).
    I also would like to know whether solarmetric has intentions to deal with
    this problem in their framework. To be honest, I was quite surprised that
    Kodo doesnt take care of this, leaving my database in an inconsistent state.
    kind regards,
    Christiaan

    "Abe White" <[email protected]> schreef in bericht
    news:caaunu$ecj$[email protected]..
    >
    I also would like to know whether solarmetric has intentions to dealwith
    this problem in their framework. To be honest, I was quite surprisedthat
    Kodo doesnt take care of this, leaving my database in an inconsistentstate.
    >
    Well, I would say that you're the one leaving the database in an
    inconsistent state by not keeping your object model consistent :)From the manual:
    6.2.2.12. jdbc-delete-action
    If a field holds a relation to another object, you can use the
    jdbc-delete-action field extension to control the delete action of the
    database foreign key that models this relation. Possible values are:
    null: Null the column(s) of this foreign key when the related record is
    deleted.
    It does mean that if the primary key record is deleted, all foreign keys to
    the record are set to null, right? Since the jdo framework is about database
    independence, not writing sql code (and of course lots more;) and Kodo
    supports ms sql server, I would have expected that kodo to set the foreign
    key to null if the object is deleted. Even if I do know sql server supports
    does not support a 'on delete set null' sql statement;)
    >
    We have no plans to create triggers at this time.
    What do you mean when you say "it is ignored" when you're updating?
    Exactly what tool are you running, what actions are you running with, is
    the foreign key extension present, and what is the outcome?Like I said, I wrote code in the "getAddForeignKeySQL" in the dictionary, so
    a trigger is created when creating the database in the workbench (by running
    the schematool). However, if the table already exists, but not the trigger,
    refreshing the database from the workbench does not call the
    getAddForeignKeySql to add the trigger to the table.

  • About o-r mapping

    Hi all,
    I have two questions when creating database scheme:
    1, kodo use a default FlatInheritanceMapping to mapping class inheritance
    hierachy to a RDMS.But this is not always a practic way.In most time we
    mapping every leaf class in the hierachy to a separate table ,and do not
    create any table for the supperclass but mapping their persistent field to
    those leaf class table. In this way,redundant data be created indeed ,but
    the whole data model become more mainteneable and reasonable. My question
    is ,does kodo support this kind of o-r mapping ? if so, how to config the
    metadate file ?
    2, When using datastore identity,it's not nesseccary for programmers to
    implement object id.But how can i access a object's id creaded by JDO
    implemention? for example,my application want to compare tow object for
    equality by their id,how do I access the id in my program ?
    Thanks
    Gentri

    Thank you Patrick. I have another question: does kodo support non-durable
    identity ?
    Gentri
    "Patrick Linskey" <[email protected]>
    ??????:[email protected]..
    On Sat, 19 Jul 2003 18:13:41 +0800, Gentri wrote:
    Hi all,
    I have two questions when creating database scheme:
    1, kodo use a default FlatInheritanceMapping to mapping class
    inheritance
    hierachy to a RDMS.But this is not always a practic way.In most time we
    mapping every leaf class in the hierachy to a separate table ,and do not
    create any table for the supperclass but mapping their persistent fieldto
    those leaf class table. In this way,redundant data be created indeed,but
    the whole data model become more mainteneable and reasonable. Myquestion
    is ,does kodo support this kind of o-r mapping ? if so, how to configthe
    metadate file ?Kodo does not currently support this type of mapping. It's on our radar
    screens, and we anticipate supporting it in the next couple months.
    2, When using datastore identity,it's not nesseccary for programmers to
    implement object id.But how can i access a object's id creaded by JDO
    implemention? for example,my application want to compare tow object for
    equality by their id,how do I access the id in my program ?You can do:
    Object oid1 = JDOHelper.getObjectId (o1);
    Object oid2 = JDOHelper.getObjectId (o2);
    if (oid1 != null && oid1.equals (oid2))
    // do stuff
    This works with both application and datastore identity.
    Note, however, that the JDO spec guarantees that no matter how you
    navigate to an object within a given persistence manager, you will always
    obtain the same object reference within that PM, and you will always
    obtain different object references within different PMs.
    That means that if o1 and o2 were both obtained in the same PM, you can
    just do an == comparison to see if they represent the same data.
    -Patrick
    Patrick Linskey
    SolarMetric Inc.

  • How to use Enums in query ?

    Hi,
    I would like to use java 1.5 Enums in query, but i cannot find any usefull
    informations in docs.
    I use Kodo 4.0.0EA3.
    I have a class with a field that is an enum, and i would like to filter the
    query on specific value. Enums are defined in an other classe.
    i imported the Enums in the query, but a received the erreor below :
    <4|false|4.0.0EA3> kodo.jdo.UserException: An error occurred while parsing the
    query filter "etat==StateEnum.SUBMITTED". Error message: Attempt to query field
    "SUBMITTED" from a class without metadata. If this is a field of an implicit
    variable, you may need to cast the variable within the filter to identify its type.
    Thanks,
    Stephane Bouchet

    Stephane Bouchet a ?crit :
    Stephane Bouchet a ?crit :
    Hi,
    I would like to use java 1.5 Enums in query, but i cannot find any usefull
    informations in docs.
    I use Kodo 4.0.0EA3.
    I have a class with a field that is an enum, and i would like to filter the
    query on specific value. Enums are defined in an other classe.
    i imported the Enums in the query, but a received the erreor below :
    <4|false|4.0.0EA3> kodo.jdo.UserException: An error occurred while parsing the
    query filter "etat==StateEnum.SUBMITTED". Error message: Attempt to query field
    "SUBMITTED" from a class without metadata. If this is a field of an implicit
    variable, you may need to cast the variable within the filter to identify its type.
    I tried to declare the Enum via declareImports and declareVariables, and i get
    now this error :
    The type "DocumentsConstants.StateEnum" as used in the parameter/variable
    declarations could not be found in the imports.
    there is the code :
    String filtre = "state.etat == aState";
    query.declareImports("import fr.emn.castor.documents.DocumentsConstants.StateEnum");
    query.declareParameters("StateEnum aState");
    List queryRes = (List) query.execute(StateEnum.SUBMITTED);I found some exemples from JPOX, that use Enum in queries :
    from the CVS
    (http://jpox.cvs.sourceforge.net/jpox/JPOX/Plugins/Java5/src/test/org/jpox/persistence/EnumMappingTest.java?view=markup)
    , i found that the query must be like :
    pm.newQuery(Palette.class,"colorOrdinal == 'RED'")
    So i tried this but i got an Exception saying just :
    JDOException : java.lang.String ???
    i suppose that is because the value is between special char, but removing them
    and i got the previously errors.
    So my question is : Does Kodo supports Enums in Queries with JDOQL ???
    Thanks for any help,
    St?phane

  • Mapping multiple objects to a same db table

    Can Kodo support mapping of multiple objects to a same table? For example,
    we have two objects PersAutoPolicy and InsuredOrPrinciple, and we want to
    map them to a same db table.

    Let me give a use case:
    class DO1 {
    long id;
    String data1;
    class DO2 {
    long id;
    String data2;
    Table table1 columns:
    id
    data1
    data2
    I want to map DO1 and DO2 to table1.
    Is this possible??
    Rick
    >>>>
    Martin van Dijken wrote:
    I'm fairly certain this works. We've got a two objects which both have a
    collection of another kind of object. I had the two collections mapped to
    the same table and that gave no problem at all. You'd have to wait for Kodo
    confirmation to be sure, but I'm 80% certain it can work.
    Martin
    "Rick Koo" <[email protected]> schreef in bericht
    news:b6rjcg$60d$[email protected]..
    Can Kodo support mapping of multiple objects to a same table? For example,
    we have two objects PersAutoPolicy and InsuredOrPrinciple, and we want to
    map them to a same db table.

Maybe you are looking for