Return-Path: X-Original-To: apmail-openjpa-users-archive@minotaur.apache.org Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0F87510CEC for ; Fri, 12 Jul 2013 04:13:32 +0000 (UTC) Received: (qmail 46016 invoked by uid 500); 12 Jul 2013 04:13:31 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 45736 invoked by uid 500); 12 Jul 2013 04:13:26 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Received: (qmail 45181 invoked by uid 99); 12 Jul 2013 04:13:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Jul 2013 04:13:25 +0000 X-ASF-Spam-Status: No, hits=2.3 required=5.0 tests=SPF_SOFTFAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of mysak@us.ibm.com does not designate 216.139.236.26 as permitted sender) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Jul 2013 04:13:20 +0000 Received: from jim.nabble.com ([192.168.236.80]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1UxUj5-00026U-1r for users@openjpa.apache.org; Thu, 11 Jul 2013 21:12:59 -0700 Date: Thu, 11 Jul 2013 21:12:59 -0700 (PDT) From: mysakjs To: users@openjpa.apache.org Message-ID: <1373602378983-7584399.post@n2.nabble.com> Subject: record delete during flo MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I am seeing a strange problem where a SELECT is resulting in a subsequent and seemingly automatic delete. A subset of the stack trace follows. Any ideas what might cause this from a JPA perspective. After doing some searching it sounds like: SQLCODE=-727, SQLSTATE=56098, SQLERRMC=2 can be associated with a database being in an "error" state. If that is the case here, can that cause JPA to perform a delete after a SELECT? That doesn't sound right, but I'm not really coming up with any reasonable theories on what could be causing the DELETE. I've enabled openjpa tracing, and there's not many clues in the logs, but I'm still going over them. I can't find anywhere in our code where there is an explicit delete, and am a bit baffled at the moment, why this is happening. Thanks in advance for any insights/ ideas. Caused by: org.apache.openjpa.persistence.PersistenceException: DB2 SQL Error: SQLCODE=-727, SQLSTATE=56098, SQLERRMC=2;-551;42501;|DELETE|, DRIVER=3.63.75 FailedObject: prepstmnt -1693313274 DELETE FROM WHERE id = ? [org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement] at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4946) at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4906) at org.apache.openjpa.jdbc.sql.DB2Dictionary.newStoreException(DB2Dictionary.java:564) at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:136) at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:78) at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushBatch(BatchingPreparedStatementManagerImpl.java:226) at org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:63) at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:105) at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:78) at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:735) at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131) ... 96 more Caused by: com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-727, SQLSTATE=56098, SQLERRMC=2;-551;42501;|DELETE|, DRIVER=3.63.75 at com.ibm.db2.jcc.am.fd.a(fd.java:682) at com.ibm.db2.jcc.am.fd.a(fd.java:60) at com.ibm.db2.jcc.am.fd.a(fd.java:127) -- View this message in context: http://openjpa.208410.n2.nabble.com/record-delete-during-flo-tp7584399.html Sent from the OpenJPA Users mailing list archive at Nabble.com.