Re: AUTO_PK_SUPPORT Error

From: Mike Kienenberger (mkienen..mail.com)
Date: Thu Feb 15 2007 - 10:22:49 EST

  • Next message: edward pedersson: "saving to multiple tables"

    Open up the Cayenne modeler, go to the generate schema panel, and
    generate your primary key information to create and setup this table.

    Alternately, choose a different primary key generation strategy other
    than the default.

    On 2/15/07, Pogs <bloo_clo..ahoo.com> wrote:
    > Please advice on what to with the following error.
    >
    > Thanks,
    > Jeff
    >
    > Complete Stacktrace:
    >
    > INFO QueryLogger: Created connection pool: jdbc:derby:testdb;create=true
    > Driver class: org.apache.derby.jdbc.EmbeddedDriver
    > Min. connections in the pool: 1
    > Max. connections in the pool: 1
    > INFO QueryLogger: Opening connection: jdbc:derby:testdb;create=true
    > Login: null
    > Password: *******
    > INFO QueryLogger: +++ Connecting: SUCCESS.
    > INFO QueryLogger: Detected and installed adapter: org.objectstyle.cayenne.dba.derby.DerbyAdapter
    > INFO QueryLogger: SELECT NEXT_ID FROM AUTO_PK_SUPPORT WHERE TABLE_NAME = ? FOR UPDATE [bind: 'ARTIST']
    > INFO QueryLogger: --- transaction started.
    > INFO QueryLogger: Opening connection: jdbc:derby:testdb;create=true
    > Login: null
    > Password: *******
    > INFO QueryLogger: +++ Connecting: SUCCESS.
    > Exception in thread "main" org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2.1 August 30 2006] Commit Exception
    > at org.objectstyle.cayenne.access.DataContext.flushToParent(DataContext.java:1289)
    > at org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.java:1165)
    > at src.cayenne.tutorial.Main.main(Main.java:30)
    > Caused by: java.sql.SQLException: Table/View 'AUTO_PK_SUPPORT' does not exist.
    > at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
    > at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
    > at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
    > at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
    > at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
    > at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
    > at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
    > at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
    > at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
    > at org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Unknown Source)
    > at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
    > at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
    > at org.objectstyle.cayenne.conn.ConnectionWrapper.prepareStatement(ConnectionWrapper.java:325)
    > at org.objectstyle.cayenne.conn.ConnectionWrapper.prepareStatement(ConnectionWrapper.java:331)
    > at org.objectstyle.cayenne.access.TransactionConnectionDecorator.prepareStatement(TransactionConnectionDecorator.java:196)
    > at org.objectstyle.cayenne.dba.derby.DerbyPkGenerator.pkFromDatabase(DerbyPkGenerator.java:91)
    > at org.objectstyle.cayenne.dba.JdbcPkGenerator.generatePkForDbEntity(JdbcPkGenerator.java:326)
    > at org.objectstyle.cayenne.access.DataDomainInsertBucket.createPermIdsForObjEntity(DataDomainInsertBucket.java:194)
    > at org.objectstyle.cayenne.access.DataDomainInsertBucket.appendQueriesInternal(DataDomainInsertBucket.java:122)
    > at org.objectstyle.cayenne.access.DataDomainSyncBucket.appendQueries(DataDomainSyncBucket.java:108)
    > at org.objectstyle.cayenne.access.DataDomainFlushAction.preprocess(DataDomainFlushAction.java:211)
    > at org.objectstyle.cayenne.access.DataDomainFlushAction.flush(DataDomainFlushAction.java:167)
    > at org.objectstyle.cayenne.access.DataDomain.onSyncFlush(DataDomain.java:830)
    > at org.objectstyle.cayenne.access.DataDomain$2.transform(DataDomain.java:801)
    > at org.objectstyle.cayenne.access.DataDomain.runInTransaction(DataDomain.java:856)
    > at org.objectstyle.cayenne.access.DataDomain.onSync(DataDomain.java:798)
    > at org.objectstyle.cayenne.access.DataContext.flushToParent(DataContext.java:1261)
    > ... 2 more
    >
    >
    >
    > ---------------------------------
    > Now that's room service! Choose from over 150,000 hotels
    > in 45,000 destinations on Yahoo! Travel to find your fit.



    This archive was generated by hypermail 2.0.0 : Thu Feb 15 2007 - 10:23:23 EST