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: <openjpa-2.2.1-SNAPSHOT-r422266:1363644 fatal general error> org.apache.openjpa.persistence.PersistenceException: DB2 SQL Error: SQLCODE=-727, SQLSTATE=56098, SQLERRMC=2;-551;42501;<user>|DELETE|<table_name>, DRIVER=3.63.75 FailedObject: prepstmnt -1693313274 DELETE FROM <table_name> 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;<user>|DELETE|<table_name>, 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.