Bug 380699 - IllegalStateException: drag and drop entity to diagram editor
Summary: IllegalStateException: drag and drop entity to diagram editor
Status: RESOLVED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: Diagram Editor (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P1 major (vote)
Target Milestone: 3.2 RC2   Edit
Assignee: Project Inbox CLA
QA Contact: Petya Sabeva CLA
URL:
Whiteboard: PMC
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-25 12:00 EDT by Nan Li CLA
Modified: 2012-05-29 12:26 EDT (History)
3 users (show)

See Also:
neil.hauge: pmc_approved? (david_williams)
neil.hauge: pmc_approved? (raghunathan.srinivasan)
neil.hauge: pmc_approved? (naci.dai)
neil.hauge: pmc_approved? (deboer)
neil.hauge: pmc_approved+
neil.hauge: pmc_approved? (kaloyan)
neil.hauge: pmc_approved? (cbridgha)
neil.hauge: review+


Attachments
IllegalStateException stack trace (5.43 KB, text/plain)
2012-05-25 12:02 EDT, Nan Li CLA
no flags Details
StackOverflowError stack trace (109.79 KB, text/plain)
2012-05-25 12:02 EDT, Nan Li CLA
no flags Details
Fix IlligalStateException (13.72 KB, patch)
2012-05-28 10:58 EDT, Petya Sabeva CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nan Li CLA 2012-05-25 12:00:10 EDT
Build Identifier: I-3.4.0-20120525034758

Graphiti: org.eclipse.graphiti.site_0.9.0M7.201205091113.zip

When trying to drag and drop an existing Java entity to the diagram editor, the following exception is thrown and the operation just fails:

java.lang.IllegalStateException: Cannot modify resource set without a write transaction

A full stack trace is attached.

If there is any diagram in the editor before doing this, a StackOverflowError will be thrown if trying to create a new entity in the editor. The stack trace is also attached.




Reproducible: Always
Comment 1 Nan Li CLA 2012-05-25 12:02:39 EDT
Created attachment 216296 [details]
IllegalStateException stack trace
Comment 2 Nan Li CLA 2012-05-25 12:02:59 EDT
Created attachment 216297 [details]
StackOverflowError stack trace
Comment 3 Neil Hauge CLA 2012-05-25 12:34:31 EDT
I have reproduced this in the RC2 candidate.
Comment 4 Petya Sabeva CLA 2012-05-28 10:58:53 EDT
Created attachment 216350 [details]
Fix IlligalStateException

The same exception occurs when an entity is removed from the diagram (with and without saving the changes). The patch fixes all three issues. 
All automated tests have been passed successfully and the fix is tested manually. The changes are small, so I think the risk of applying the patch is low.
Comment 5 Neil Hauge CLA 2012-05-29 08:28:02 EDT
    Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such. 

P1, drag and drop does not work in the diagram editor.  This is the standard use case.

    Is there a work-around? If so, why do you believe the work-around is insufficient? 

No workaround.

    How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? 

Automated and manual tests.

    Give a brief technical overview. Who has reviewed this fix? 

This bug is a result of the move to Graphiti 0.9, where apparently some of the transaction mechanics have changed.  This patch updates the code to conform to this.

    What is the risk associated with this fix? 

Medium to high risk.  Affects core aspects of functionality.  Given that current state is unusable, this risk is acceptable.
Comment 6 Neil Hauge CLA 2012-05-29 10:38:54 EDT
Approving this so we can move forward with a re-spin.
Comment 7 Tran Le CLA 2012-05-29 12:26:27 EDT
Patch committed and released.
Resolved in RC2.