[hibernate-issues] [Hibernate-JIRA] Commented: (EJB-438) JBPAPP-1998 - RemoveTest - Exception while processing a Optimistic Locking Exception
Gail Badner (JIRA)
noreply at atlassian.com
Tue May 19 13:26:13 EDT 2009
[ http://opensource.atlassian.com/projects/hibernate/browse/EJB-438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33202#action_33202 ]
Gail Badner commented on EJB-438:
---------------------------------
https://jira.jboss.org/jira/browse/JBPAPP-1998
> JBPAPP-1998 - RemoveTest - Exception while processing a Optimistic Locking Exception
> -------------------------------------------------------------------------------------
>
> Key: EJB-438
> URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-438
> Project: Hibernate Entity Manager
> Issue Type: Bug
> Affects Versions: 3.3.1.GA, 3.3.2.GA, 3.4.0.GA
> Environment: Entity manager v3_3_2_GA_CP / RemoveTest, hibernate.jdbc.batch_versioned_data = false
> Reporter: Juraci Paixao Krohling
> Assignee: Hardy Ferentschik
> Fix For: 3.3.3, 3.4.1, 3.5
>
>
> The test testUpdatedAndRemove on RemoveTest is failing due to a wrong exception being thrown when using hibernate.jdbc.batch_versioned_data as false (the default option).
> When it is set as "false", the exception is processed on method AbstractEntityManagerImpl#wrapStaleStateException . On line 647 it tries to load the original entity, but it doesn't exists anymore, throwing a EntityNotFoundException.
> The suggestion is to wrap line 647 in a try/catch, to catch EntityNotFoundException and rethrow the original exception as OptimisticLockException, as it is the only case I can think of that the identifier is present, it is in the context of a optimistic locking exception and the entity is not found in the database.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list