Bug 405959 - org.eclipse.persistence.exceptions.OptimisticLockException thrown instead of javax.persistence.OptimisticLockException
Summary: org.eclipse.persistence.exceptions.OptimisticLockException thrown instead of ...
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-18 05:29 EDT by Robert Franz CLA
Modified: 2022-06-09 10:20 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Franz CLA 2013-04-18 05:29:21 EDT
In the method 
org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitTransaction(RepeatableWriteUnitOfWork.java:647) [eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345] the eclipselink internal Exception is not catched. But this is done in commitToDatabase:RepeatableWriteUnitOfWork.java:635. There is thrown a javax.persistence.OptimisticLockException.

In my opinion this is the correct handling as there is furthermore the following comment in the code:
   * Wraps the org.eclipse.persistence.exceptions.OptimisticLockException in a  
   * javax.persistence.OptimisticLockException. This conforms to the EJB3 specs
   * @param commitTransaction 


Part of the stacktrace:
at org.eclipse.persistence.exceptions.OptimisticLockException.batchStatementExecutionFailure(OptimisticLockException.java:79) [eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
	at org.eclipse.persistence.internal.databaseaccess.ParameterizedSQLBatchWritingMechanism.executeBatchedStatements(ParameterizedSQLBatchWritingMechanism.java:149) [eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.writesCompleted(DatabaseAccessor.java:1714) [eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.commitTransaction(DatabaseAccessor.java:410) [eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
	at org.eclipse.persistence.internal.sessions.AbstractSession.basicCommitTransaction(AbstractSession.java:603) [eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
	at org.eclipse.persistence.sessions.server.ClientSession.basicCommitTransaction(ClientSession.java:164) [eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
	at org.eclipse.persistence.internal.sessions.AbstractSession.commitTransaction(AbstractSession.java:798) [eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitTransaction(UnitOfWorkImpl.java:1578) [eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
	at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitTransaction(RepeatableWriteUnitOfWork.java:647) [eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitTransactionAfterWriteChanges(UnitOfWorkImpl.java:1593) [eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
	at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.issueSQLbeforeCompletion(RepeatableWriteUnitOfWork.java:353) [eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
	at org.eclipse.persistence.transaction.AbstractSynchronizationListener.beforeCompletion(AbstractSynchronizationListener.java:157) [eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
	at org.eclipse.persistence.transaction.JTASynchronizationListener.beforeCompletion(JTASynchronizationListener.java:68) [eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
Comment 1 Tom Ware CLA 2013-05-09 08:59:17 EDT
Setting target and priority.  See the following page for the meanings of these fields:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines

Community: Please vote for this bug if it is important to you.  Votes are one of the main criteria we use to determine which bugs to fix next.
Comment 2 Eclipse Webmaster CLA 2022-06-09 10:20:05 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink