openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pankajpriyadarshi <pankydud...@gmail.com>
Subject Re: Savepoint issue with OpenJPA
Date Thu, 27 Dec 2012 19:37:03 GMT
Hello Pinaki,
           I have 2 new files to the JIRA issue: a) the latest jar file
along with b) a small SQL script to be run on
openjpa-persistence-jdbc\target\database\openjpa-derby-database Derby
database. This script will add foreign constraints to the tables.

With this latest jar you can see the testInsertWithoutSavepoint passing but
testInsertWithSavepoint failing when doing a commit. I also tried the
<property name="openjpa.jdbc.SynchronizeMappings"
value="buildSchema(ForeignKeys=true)"/> but it makes no difference to this
issue.

Please let me know if you need anything else from me. This is the URL to the
JIRA issue where I have added the 2 new files:

https://issues.apache.org/jira/browse/OPENJPA-2291?page=com.atlassian.jirafisheyeplugin:fisheye-issuepanel#comment-13538436.

The exception that I got was:

Caused by: <openjpa-2.3.0-SNAPSHOT-runknown fatal general error>
org.apache.openjpa.persistence.PersistenceException: INSERT on table
'PER_JDBC_KERN_STORY' caused a violation of foreign key constraint
'SQL121227131511400' for key (25).  The statement has been rolled back.
{prepstmnt 1898869038 INSERT INTO PER_JDBC_KERN_STORY (ID, TASK_ID, VERSION)
VALUES (?, ?, ?) [params=?, ?, ?]} [code=20000, state=23503]
FailedObject: org.apache.openjpa.jdbc.kernel.Story1@73607360
	at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4940)
	at
org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4906)
	at
org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:137)
	at
org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:78)
	at
org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:144)
	at
org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushAndUpdate(BatchingPreparedStatementManagerImpl.java:79)
	at
com.ibm.ws.persistence.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:63)
	at
org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:100)
	at
org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:88)
	at
org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:550)
	at
org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:106)
	at
org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:59)
	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)

Thank You,
Pankaj Priyadarshi



--
View this message in context: http://openjpa.208410.n2.nabble.com/Savepoint-issue-with-OpenJPA-tp7581548p7582368.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.

Mime
View raw message