Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 371057

Summary: Exception logging when rollingback transaction in @PreUpdate
Product: z_Archived Reporter: Pie Mur <piemur2000>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: martin.grebac, tom.ware
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on:    
Bug Blocks: 454792    
Attachments:
Description Flags
The entity and session source code + log output.
none
The persistence configuration file.
none
TestEntity source file
none
TestSession source file
none
Server log after calling testRollback and testRollback2 none

Description Pie Mur CLA 2012-02-09 05:35:55 EST
Created attachment 210787 [details]
The entity and session source code + log output.

When I rollback a transaction by sending a RuntimeException in the @PreUpdate method of an entity eclipselink log the exception details several times before I can catch it.

Steps to reproduce:
1) Modify an entity in a session bean.
2) Flush the entity manager to commit the changes.
3) Throw an exception in @PreUpdate.
4) Catch the exception in the session bean.

Actual result:
The exception description and stack trace is logged twice before I can catch it.
Comment 1 Tom Ware CLA 2012-02-17 11:29:31 EST
Have you tried setting the persistence unit property: eclipselink.logging.exceptions to false?
Comment 2 Pie Mur CLA 2012-02-20 04:18:19 EST
(In reply to comment #1)
> Have you tried setting the persistence unit property:
> eclipselink.logging.exceptions to false?

Yes, I added the property to my persistence.xml file but the result is the same.
Comment 3 Pie Mur CLA 2012-02-20 04:19:43 EST
Created attachment 211260 [details]
The persistence configuration file.
Comment 4 Pie Mur CLA 2012-02-20 04:21:02 EST
Created attachment 211261 [details]
TestEntity source file
Comment 5 Pie Mur CLA 2012-02-20 04:21:28 EST
Created attachment 211262 [details]
TestSession source file
Comment 6 Pie Mur CLA 2012-02-20 04:26:13 EST
Created attachment 211263 [details]
Server log after calling testRollback and testRollback2
Comment 7 Tom Ware CLA 2012-03-02 14:52:30 EST
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 8 Eclipse Webmaster CLA 2022-06-09 10:31:57 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink