Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 371057 - Exception logging when rollingback transaction in @PreUpdate
Summary: Exception logging when rollingback transaction in @PreUpdate
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 454792
  Show dependency tree
 
Reported: 2012-02-09 05:35 EST by Pie Mur CLA
Modified: 2022-06-09 10:31 EDT (History)
2 users (show)

See Also:


Attachments
The entity and session source code + log output. (19.03 KB, text/plain)
2012-02-09 05:35 EST, Pie Mur CLA
no flags Details
The persistence configuration file. (812 bytes, text/xml)
2012-02-20 04:19 EST, Pie Mur CLA
no flags Details
TestEntity source file (845 bytes, application/octet-stream)
2012-02-20 04:21 EST, Pie Mur CLA
no flags Details
TestSession source file (1.48 KB, application/octet-stream)
2012-02-20 04:21 EST, Pie Mur CLA
no flags Details
Server log after calling testRollback and testRollback2 (16.11 KB, text/plain)
2012-02-20 04:26 EST, Pie Mur CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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