RE: java.sql.SQLException: No rows for 'payment_items'

From: Philip Copeland (pcopelan..voka.com)
Date: Sat Apr 29 2006 - 00:03:46 EDT

  • Next message: Andrus Adamchik: "Re: how to catch updates just before commit"

    Guys,

    Just tracked this down - its very subtle - and I think qualifies as a
    bug in Cayenne. The problem is that the select for the AutoPKSupport is
    not using
    A fully qualified table name - the query is "SELECT NEXT_ID FROM
    AUTO_PK_SUPPORT WHERE etc". I belive it should be "SELECT NEXT_ID FROM
    DBSCHEMA.AUTO_PK_SUPPORT WHERE etc". I had a couple of different schemas
    - but was using 1 common user to connect. In most cases this was Ok
    because the table names are qualified - except for the Atop_support
    table.

    To fix my problem I'm adding separate users for each schema.

    Thanks

    Phil

    -----Original Message-----
    From: Andrus Adamchik [mailto:andru..bjectstyle.org]
    Sent: Friday, 28 April 2006 11:30 PM
    To: cayenne-use..ncubator.apache.org
    Subject: Re: java.sql.SQLException: No rows for 'payment_items'

    On Apr 28, 2006, at 6:44 AM, Philip Copeland wrote:

    > Caused by: java.sql.SQLException: No rows for 'payment_items'
    >
    > As I say the code works fine on my machine and another developers
    > computer - its just failing on our 2 test servers. We are all using
    > MySQL and are using Cayenne 1.2B2 - although we initially saw the
    > problem in 1.2M8.

    Hi Philip,

    So I assume you can run the PK query from phpMyAdmin and/or mysql
    command line on the failing database and get a row for 'payment_items'?
    I guess the only other thing that can be wrong is MySQL driver version -
    are they the same on all machine?

    Andrus



    This archive was generated by hypermail 2.0.0 : Sat Apr 29 2006 - 00:04:18 EDT