You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Pogs <bl...@yahoo.com> on 2007/02/15 16:16:56 UTC
AUTO_PK_SUPPORT Error
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.
Re: AUTO_PK_SUPPORT Error
Posted by Pogs <bl...@yahoo.com>.
Please advice on how am I able to see the entire database. Just have to start with the basics then I'll switch with MySql after I finish my test project.
Mike Kienenberger <mk...@gmail.com> wrote: After you have executed the sql, did you verify that the database
actually contains these tables?
The sql you posted looks fine.
On 2/16/07, Pogs wrote:
> Here are the SQL Statements being generated.
>
> Thanks,
> Jeff
>
> CREATE TABLE GALLERY (GALLERY_ID INTEGER NOT NULL, GALLERY_NAME VARCHAR (200), PRIMARY KEY (GALLERY_ID))
> ;
>
> CREATE TABLE ARTIST (ARTIST_DATE_OF_BIRTH DATE, ARTIST_ID INTEGER NOT NULL, ARTIST_NAME VARCHAR (200), PRIMARY KEY (ARTIST_ID))
> ;
>
> CREATE TABLE PAINTING (PAINTING_ID INTEGER NOT NULL, PAINTING_NAME VARCHAR (200), PRIMARY KEY (PAINTING_ID))
> ;
>
> CREATE TABLE AUTO_PK_SUPPORT ( TABLE_NAME CHAR(100) NOT NULL, NEXT_ID INTEGER NOT NULL, PRIMARY KEY(TABLE_NAME))
> ;
>
> DELETE FROM AUTO_PK_SUPPORT WHERE TABLE_NAME IN ('ARTIST', 'GALLERY', 'PAINTING')
> ;
>
> INSERT INTO AUTO_PK_SUPPORT (TABLE_NAME, NEXT_ID) VALUES ('ARTIST', 200)
> ;
>
> INSERT INTO AUTO_PK_SUPPORT (TABLE_NAME, NEXT_ID) VALUES ('GALLERY', 200)
> ;
>
> INSERT INTO AUTO_PK_SUPPORT (TABLE_NAME, NEXT_ID) VALUES ('PAINTING', 200)
> ;
>
>
> Michael Gentry wrote: Can you send us the SQL (when you choose Generate Database Schema) it
> is showing so we can see the PK statements the modeler is generating
> for you?
>
> Thanks,
>
> /dev/mrg
>
>
> On 2/16/07, Pogs wrote:
> > The only options available are as follows:
> >
> > Drop Tables (unchecked)
> > Drop Primary Key Support (unchecked)
> > Create Tables (checked)
> > Create FK Support (checked)
> > Create Primary Key Support (checked
> >
> > I believe these should create the table AUTO_PK_SUPPORT as I can see it on the SQL convertion. But still I receive this exception. What other strategies should I use for generating my primary keys? Please advice.
> >
> > Thanks,
> > Jeff
> >
> > Mike Kienenberger wrote: 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 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.(Unknown Source)
> > > at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.(Unknown Source)
> > > at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.(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.
> >
> >
> >
> > ---------------------------------
> > Be a PS3 game guru.
> > Get your game face on with the latest PS3 news and previews at Yahoo! Games.
>
>
>
> ---------------------------------
> Want to start your own business? Learn how on Yahoo! Small Business.
---------------------------------
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
Re: AUTO_PK_SUPPORT Error
Posted by Aristedes Maniatis <ar...@ish.com.au>.
On 17/02/2007, at 1:17 AM, Pogs wrote:
> Please advice on how am I able to see the entire database.
For Derby, one of the best tools to examine the structure and data
we've found is Squirrel. It has JDBC adaptors for just about
everything. I think you'll find it on Sourceforge somewhere.
Ari
-------------------------->
ish
http://www.ish.com.au
Level 1, 30 Wilson Street Newtown 2042 Australia
phone +61 2 9550 5001 fax +61 2 9550 4001
GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A
Re: AUTO_PK_SUPPORT Error
Posted by Pogs <bl...@yahoo.com>.
Please advice on how am I able to see the entire database. Just have to start with the basics then I'll switch with MySql after I finish my test project.
Mike Kienenberger <mk...@gmail.com> wrote: After you have executed the sql, did you verify that the database
actually contains these tables?
The sql you posted looks fine.
On 2/16/07, Pogs wrote:
> Here are the SQL Statements being generated.
>
> Thanks,
> Jeff
>
> CREATE TABLE GALLERY (GALLERY_ID INTEGER NOT NULL, GALLERY_NAME VARCHAR (200), PRIMARY KEY (GALLERY_ID))
> ;
>
> CREATE TABLE ARTIST (ARTIST_DATE_OF_BIRTH DATE, ARTIST_ID INTEGER NOT NULL, ARTIST_NAME VARCHAR (200), PRIMARY KEY (ARTIST_ID))
> ;
>
> CREATE TABLE PAINTING (PAINTING_ID INTEGER NOT NULL, PAINTING_NAME VARCHAR (200), PRIMARY KEY (PAINTING_ID))
> ;
>
> CREATE TABLE AUTO_PK_SUPPORT ( TABLE_NAME CHAR(100) NOT NULL, NEXT_ID INTEGER NOT NULL, PRIMARY KEY(TABLE_NAME))
> ;
>
> DELETE FROM AUTO_PK_SUPPORT WHERE TABLE_NAME IN ('ARTIST', 'GALLERY', 'PAINTING')
> ;
>
> INSERT INTO AUTO_PK_SUPPORT (TABLE_NAME, NEXT_ID) VALUES ('ARTIST', 200)
> ;
>
> INSERT INTO AUTO_PK_SUPPORT (TABLE_NAME, NEXT_ID) VALUES ('GALLERY', 200)
> ;
>
> INSERT INTO AUTO_PK_SUPPORT (TABLE_NAME, NEXT_ID) VALUES ('PAINTING', 200)
> ;
>
>
> Michael Gentry wrote: Can you send us the SQL (when you choose Generate Database Schema) it
> is showing so we can see the PK statements the modeler is generating
> for you?
>
> Thanks,
>
> /dev/mrg
>
>
> On 2/16/07, Pogs wrote:
> > The only options available are as follows:
> >
> > Drop Tables (unchecked)
> > Drop Primary Key Support (unchecked)
> > Create Tables (checked)
> > Create FK Support (checked)
> > Create Primary Key Support (checked
> >
> > I believe these should create the table AUTO_PK_SUPPORT as I can see it on the SQL convertion. But still I receive this exception. What other strategies should I use for generating my primary keys? Please advice.
> >
> > Thanks,
> > Jeff
> >
> > Mike Kienenberger wrote: 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 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.(Unknown Source)
> > > at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.(Unknown Source)
> > > at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.(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.
> >
> >
> >
> > ---------------------------------
> > Be a PS3 game guru.
> > Get your game face on with the latest PS3 news and previews at Yahoo! Games.
>
>
>
> ---------------------------------
> Want to start your own business? Learn how on Yahoo! Small Business.
---------------------------------
It's here! Your new message!
Get new email alerts with the free Yahoo! Toolbar.
Re: AUTO_PK_SUPPORT Error
Posted by Mike Kienenberger <mk...@gmail.com>.
After you have executed the sql, did you verify that the database
actually contains these tables?
The sql you posted looks fine.
On 2/16/07, Pogs <bl...@yahoo.com> wrote:
> Here are the SQL Statements being generated.
>
> Thanks,
> Jeff
>
> CREATE TABLE GALLERY (GALLERY_ID INTEGER NOT NULL, GALLERY_NAME VARCHAR (200), PRIMARY KEY (GALLERY_ID))
> ;
>
> CREATE TABLE ARTIST (ARTIST_DATE_OF_BIRTH DATE, ARTIST_ID INTEGER NOT NULL, ARTIST_NAME VARCHAR (200), PRIMARY KEY (ARTIST_ID))
> ;
>
> CREATE TABLE PAINTING (PAINTING_ID INTEGER NOT NULL, PAINTING_NAME VARCHAR (200), PRIMARY KEY (PAINTING_ID))
> ;
>
> CREATE TABLE AUTO_PK_SUPPORT ( TABLE_NAME CHAR(100) NOT NULL, NEXT_ID INTEGER NOT NULL, PRIMARY KEY(TABLE_NAME))
> ;
>
> DELETE FROM AUTO_PK_SUPPORT WHERE TABLE_NAME IN ('ARTIST', 'GALLERY', 'PAINTING')
> ;
>
> INSERT INTO AUTO_PK_SUPPORT (TABLE_NAME, NEXT_ID) VALUES ('ARTIST', 200)
> ;
>
> INSERT INTO AUTO_PK_SUPPORT (TABLE_NAME, NEXT_ID) VALUES ('GALLERY', 200)
> ;
>
> INSERT INTO AUTO_PK_SUPPORT (TABLE_NAME, NEXT_ID) VALUES ('PAINTING', 200)
> ;
>
>
> Michael Gentry <bl...@gmail.com> wrote: Can you send us the SQL (when you choose Generate Database Schema) it
> is showing so we can see the PK statements the modeler is generating
> for you?
>
> Thanks,
>
> /dev/mrg
>
>
> On 2/16/07, Pogs wrote:
> > The only options available are as follows:
> >
> > Drop Tables (unchecked)
> > Drop Primary Key Support (unchecked)
> > Create Tables (checked)
> > Create FK Support (checked)
> > Create Primary Key Support (checked
> >
> > I believe these should create the table AUTO_PK_SUPPORT as I can see it on the SQL convertion. But still I receive this exception. What other strategies should I use for generating my primary keys? Please advice.
> >
> > Thanks,
> > Jeff
> >
> > Mike Kienenberger wrote: 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 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.(Unknown Source)
> > > at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.(Unknown Source)
> > > at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.(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.
> >
> >
> >
> > ---------------------------------
> > Be a PS3 game guru.
> > Get your game face on with the latest PS3 news and previews at Yahoo! Games.
>
>
>
> ---------------------------------
> Want to start your own business? Learn how on Yahoo! Small Business.
Re: AUTO_PK_SUPPORT Error
Posted by Pogs <bl...@yahoo.com>.
Yes. It is also being created on the same schema. The modeler generated it automatically.
Mike Kienenberger <mk...@gmail.com> wrote: I'm not sure if this is relevent in derby, but is your auto_pk_table
being created in the same schema as your other tables? I know that
this can be an issue with schemas in recent versions of hsqldb.
On 2/16/07, Michael Gentry wrote:
> Can you send us the SQL (when you choose Generate Database Schema) it
> is showing so we can see the PK statements the modeler is generating
> for you?
>
> Thanks,
>
> /dev/mrg
>
>
> On 2/16/07, Pogs wrote:
> > The only options available are as follows:
> >
> > Drop Tables (unchecked)
> > Drop Primary Key Support (unchecked)
> > Create Tables (checked)
> > Create FK Support (checked)
> > Create Primary Key Support (checked
> >
> > I believe these should create the table AUTO_PK_SUPPORT as I can see it on the SQL convertion. But still I receive this exception. What other strategies should I use for generating my primary keys? Please advice.
> >
> > Thanks,
> > Jeff
> >
> > Mike Kienenberger wrote: 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 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.(Unknown Source)
> > > at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.(Unknown Source)
> > > at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.(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.
> >
> >
> >
> > ---------------------------------
> > Be a PS3 game guru.
> > Get your game face on with the latest PS3 news and previews at Yahoo! Games.
>
---------------------------------
8:00? 8:25? 8:40? Find a flick in no time
with theYahoo! Search movie showtime shortcut.
Re: AUTO_PK_SUPPORT Error
Posted by Mike Kienenberger <mk...@gmail.com>.
I'm not sure if this is relevent in derby, but is your auto_pk_table
being created in the same schema as your other tables? I know that
this can be an issue with schemas in recent versions of hsqldb.
On 2/16/07, Michael Gentry <bl...@gmail.com> wrote:
> Can you send us the SQL (when you choose Generate Database Schema) it
> is showing so we can see the PK statements the modeler is generating
> for you?
>
> Thanks,
>
> /dev/mrg
>
>
> On 2/16/07, Pogs <bl...@yahoo.com> wrote:
> > The only options available are as follows:
> >
> > Drop Tables (unchecked)
> > Drop Primary Key Support (unchecked)
> > Create Tables (checked)
> > Create FK Support (checked)
> > Create Primary Key Support (checked
> >
> > I believe these should create the table AUTO_PK_SUPPORT as I can see it on the SQL convertion. But still I receive this exception. What other strategies should I use for generating my primary keys? Please advice.
> >
> > Thanks,
> > Jeff
> >
> > Mike Kienenberger <mk...@gmail.com> wrote: 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 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.(Unknown Source)
> > > at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.(Unknown Source)
> > > at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.(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.
> >
> >
> >
> > ---------------------------------
> > Be a PS3 game guru.
> > Get your game face on with the latest PS3 news and previews at Yahoo! Games.
>
Re: AUTO_PK_SUPPORT Error
Posted by Pogs <bl...@yahoo.com>.
Here are the SQL Statements being generated.
Thanks,
Jeff
CREATE TABLE GALLERY (GALLERY_ID INTEGER NOT NULL, GALLERY_NAME VARCHAR (200), PRIMARY KEY (GALLERY_ID))
;
CREATE TABLE ARTIST (ARTIST_DATE_OF_BIRTH DATE, ARTIST_ID INTEGER NOT NULL, ARTIST_NAME VARCHAR (200), PRIMARY KEY (ARTIST_ID))
;
CREATE TABLE PAINTING (PAINTING_ID INTEGER NOT NULL, PAINTING_NAME VARCHAR (200), PRIMARY KEY (PAINTING_ID))
;
CREATE TABLE AUTO_PK_SUPPORT ( TABLE_NAME CHAR(100) NOT NULL, NEXT_ID INTEGER NOT NULL, PRIMARY KEY(TABLE_NAME))
;
DELETE FROM AUTO_PK_SUPPORT WHERE TABLE_NAME IN ('ARTIST', 'GALLERY', 'PAINTING')
;
INSERT INTO AUTO_PK_SUPPORT (TABLE_NAME, NEXT_ID) VALUES ('ARTIST', 200)
;
INSERT INTO AUTO_PK_SUPPORT (TABLE_NAME, NEXT_ID) VALUES ('GALLERY', 200)
;
INSERT INTO AUTO_PK_SUPPORT (TABLE_NAME, NEXT_ID) VALUES ('PAINTING', 200)
;
Michael Gentry <bl...@gmail.com> wrote: Can you send us the SQL (when you choose Generate Database Schema) it
is showing so we can see the PK statements the modeler is generating
for you?
Thanks,
/dev/mrg
On 2/16/07, Pogs wrote:
> The only options available are as follows:
>
> Drop Tables (unchecked)
> Drop Primary Key Support (unchecked)
> Create Tables (checked)
> Create FK Support (checked)
> Create Primary Key Support (checked
>
> I believe these should create the table AUTO_PK_SUPPORT as I can see it on the SQL convertion. But still I receive this exception. What other strategies should I use for generating my primary keys? Please advice.
>
> Thanks,
> Jeff
>
> Mike Kienenberger wrote: 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 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.(Unknown Source)
> > at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.(Unknown Source)
> > at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.(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.
>
>
>
> ---------------------------------
> Be a PS3 game guru.
> Get your game face on with the latest PS3 news and previews at Yahoo! Games.
---------------------------------
Want to start your own business? Learn how on Yahoo! Small Business.
Re: AUTO_PK_SUPPORT Error
Posted by Michael Gentry <bl...@gmail.com>.
Can you send us the SQL (when you choose Generate Database Schema) it
is showing so we can see the PK statements the modeler is generating
for you?
Thanks,
/dev/mrg
On 2/16/07, Pogs <bl...@yahoo.com> wrote:
> The only options available are as follows:
>
> Drop Tables (unchecked)
> Drop Primary Key Support (unchecked)
> Create Tables (checked)
> Create FK Support (checked)
> Create Primary Key Support (checked
>
> I believe these should create the table AUTO_PK_SUPPORT as I can see it on the SQL convertion. But still I receive this exception. What other strategies should I use for generating my primary keys? Please advice.
>
> Thanks,
> Jeff
>
> Mike Kienenberger <mk...@gmail.com> wrote: 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 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.(Unknown Source)
> > at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.(Unknown Source)
> > at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.(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.
>
>
>
> ---------------------------------
> Be a PS3 game guru.
> Get your game face on with the latest PS3 news and previews at Yahoo! Games.
Re: AUTO_PK_SUPPORT Error
Posted by Pogs <bl...@yahoo.com>.
The only options available are as follows:
Drop Tables (unchecked)
Drop Primary Key Support (unchecked)
Create Tables (checked)
Create FK Support (checked)
Create Primary Key Support (checked
I believe these should create the table AUTO_PK_SUPPORT as I can see it on the SQL convertion. But still I receive this exception. What other strategies should I use for generating my primary keys? Please advice.
Thanks,
Jeff
Mike Kienenberger <mk...@gmail.com> wrote: 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 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.(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.(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.
---------------------------------
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
Re: AUTO_PK_SUPPORT Error
Posted by Mike Kienenberger <mk...@gmail.com>.
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 <bl...@yahoo.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.