Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 62873 invoked from network); 16 Feb 2007 13:21:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Feb 2007 13:21:30 -0000 Received: (qmail 5961 invoked by uid 500); 16 Feb 2007 13:21:37 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 5944 invoked by uid 500); 16 Feb 2007 13:21:37 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 5935 invoked by uid 99); 16 Feb 2007 13:21:36 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Feb 2007 05:21:36 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of blacknext@gmail.com designates 64.233.166.177 as permitted sender) Received: from [64.233.166.177] (HELO py-out-1112.google.com) (64.233.166.177) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Feb 2007 05:21:26 -0800 Received: by py-out-1112.google.com with SMTP id h31so500974pyc for ; Fri, 16 Feb 2007 05:21:06 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=s2XgCRcdzzCoo49EBfR+HY/lJTWbF410AjkUVKM+iRf3Ks03dpXdm2r10KJL0Euvs4PrUGLEXpXWefVOsf+ITCx5rtRNPW5tDY2lE/n2zESgyu46tCsrXQWk80yDloVvw03meMB1l0TLjN10PzqvrbBV9wTds+cedEOV11gp7GI= Received: by 10.35.17.12 with SMTP id u12mr633618pyi.1171632066013; Fri, 16 Feb 2007 05:21:06 -0800 (PST) Received: by 10.35.126.20 with HTTP; Fri, 16 Feb 2007 05:21:05 -0800 (PST) Message-ID: Date: Fri, 16 Feb 2007 08:21:05 -0500 From: "Michael Gentry" To: user@cayenne.apache.org Subject: Re: AUTO_PK_SUPPORT Error In-Reply-To: <110923.25994.qm@web53704.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8f985b960702150722m314211d3vd111d48249c87b5f@mail.gmail.com> <110923.25994.qm@web53704.mail.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org 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.