Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342041 - Non-recoverable error while moving a opened Test Case
Summary: Non-recoverable error while moving a opened Test Case
Status: CLOSED FIXED
Alias: None
Product: Jubula
Classification: Technology
Component: Core (show other bugs)
Version: 0.9.0   Edit
Hardware: All All
: P3 blocker (vote)
Target Milestone: 1.0   Edit
Assignee: Zeb Ford-Reitz CLA
QA Contact: Oliver Goetz CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 342406
  Show dependency tree
 
Reported: 2011-04-06 12:10 EDT by Tim Winselmann CLA
Modified: 2011-04-15 05:18 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 Tim Winselmann CLA 2011-04-06 12:10:59 EDT
1. Create a New Test Case and a New Category
2. Open the New Test Case
3. Move the New Test Case into the New Category (while the Test Case is opened)

--> 
At first four DatabaseLoadFailed-errors appear, than appears a Non-recoverable-error:

An error occurred.
Reason:
2001: Database load failed.

An error occurred.
Reason:
7007: Non-recoverable error. Please restart the application.

In GUIdancer 4.3 it was possible to move a opened Test Case into a category.
We should decide if it should be possible to move opened test cases or we should modify the error message text to "object is in use by another transaction".
Comment 1 Zeb Ford-Reitz CLA 2011-04-08 11:09:47 EDT
The problem seems to be caused by a combination of EntityManager management, JFace TreeViewers, and Decorators. When the Test Case Editor is opened, the Workbench's Managed Decorator is triggered. As a result, the elements in the Tree Viewer in the TCB are updated (the TreeItems receive new data). This confuses EclipseLink, because there is a "new" object (not Java identical, or ==, to any other managed object) in the EntityManager. This is what causes the error: At some point later, a JPA query is executed, and the pre-query flush causes an exception because the PK constraint for the Test Case (the object that is recognized by EclipseLink as "new") is violated.
Comment 2 Zeb Ford-Reitz CLA 2011-04-08 11:14:14 EDT
A possible fix might be to somehow separate the Decorators by EntityManager. This would mean that each Editor has its own set of Decorators, and the views that use the master session would share a set of Decorators.
Comment 4 Oliver Goetz CLA 2011-04-15 05:18:31 EDT
Bug fixed, tested manually