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

Bug 325594

Summary: Problems deleting entities that are displayed in a JPA Diagram
Product: [WebTools] Dali JPA Tools Reporter: Karen Butzke <karenfbutzke>
Component: Diagram EditorAssignee: Petya Sabeva <petya.sabeva>
Status: RESOLVED FIXED QA Contact: Stefan Dimov <stefan.dimov>
Severity: normal    
Priority: P3 CC: petya.sabeva
Version: 0.5   
Target Milestone: 0.5 RC3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
NPE stack trace
none
patch that checks if resource exists
stefan.dimov: iplog+
fix tests to be compatible with the patch stefan.dimov: iplog+

Description Karen Butzke CLA 2010-09-17 09:55:41 EDT
Created attachment 179115 [details]
NPE stack trace

I have attempted to simplify this problem as much as possible, was a little difficult to isolate. I am testing with 0.5RC2

1. Create a 1.0 JPA project
2. Open the JPA diagram editor
3. Create a Java Entity in the JPA diagram (Entity1)
4. Create another Java Entity in the JPA diagram (Entity2)
5. Create a 1-1 uni-directional relationship from Entity1 to Entity2
6. Save
7. Go to the Project Explorer and delete the org.persistence package

You'll notice that Entity2 remains in the JPA Diagram. There are 2 errors in the error log:

1.Resource '/Foo/src/org/persistence/Entity2.java' does not exist. - no stack trace
2.Stack trace attached
Comment 1 Petya Sabeva CLA 2010-10-04 06:43:30 EDT
I can reproduce only the error messega that "resource does not exist" and I apply a patch only for that issue. Everything works fine by me.
Comment 2 Petya Sabeva CLA 2010-10-04 06:44:43 EDT
Created attachment 180147 [details]
patch that checks if resource exists
Comment 3 Petya Sabeva CLA 2010-10-04 06:45:12 EDT
Created attachment 180148 [details]
fix tests to be compatible with the patch
Comment 4 Stefan Dimov CLA 2010-10-11 11:20:37 EDT
The patch is submitted ...