Bug 380699

Summary: IllegalStateException: drag and drop entity to diagram editor
Product: [WebTools] Dali JPA Tools Reporter: Nan Li <nan.n.li>
Component: Diagram EditorAssignee: Project Inbox <dali.diagrameditor-inbox>
Status: RESOLVED FIXED QA Contact: Petya Sabeva <petya.sabeva>
Severity: major    
Priority: P1 CC: kaloyan, neil.hauge, tranle1
Version: unspecifiedFlags: 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+
Target Milestone: 3.2 RC2   
Hardware: PC   
OS: Windows 7   
Whiteboard: PMC
Attachments:
Description Flags
IllegalStateException stack trace
none
StackOverflowError stack trace
none
Fix IlligalStateException none

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.