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

Bug 316022

Summary: NPE refreshing out of sync entity
Product: [WebTools] Dali JPA Tools Reporter: Karen Butzke <karenfbutzke>
Component: GeneralAssignee: Karen Butzke <karenfbutzke>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jolene.moffitt, neil.hauge
Version: 2.3Flags: neil.hauge: review+
Target Milestone: 3.0.1   
Hardware: PC   
OS: Windows XP   
Whiteboard: fix_ready
Attachments:
Description Flags
NPE stack trace
none
proposed patch against head none

Description Karen Butzke CLA 2010-06-07 12:14:08 EDT
Created attachment 171297 [details]
NPE stack trace

Found this while verifying bug 262859:
-Create a new project
-Create an entity
-close the workspace
-edit the entity in a text editor outside of Eclipse
-open the workspace
-open the edited entity by using the Project Explorer JPA Content tree and double clicking the entity.

You will get the attached NPE if you open the entity this way, opening it through the src folder instead will work fine.  If you refresh the file the model is not corrupted and you can continue working without problems.
Comment 1 Neil Hauge CLA 2011-06-07 14:19:41 EDT
I wonder if a more likely user path for this issue would involve working with an SCM.  If so, perhaps it is something we should look at for 3.0.1.
Comment 2 Karen Butzke CLA 2011-06-08 10:51:54 EDT
Created attachment 197608 [details]
proposed patch against head

This patch fixes this NPE as well as similar NPEs when selecting a field or property in the JPA Content tree. Also fixes Enums and enum constants in JAXB.
Comment 3 Karen Butzke CLA 2011-06-24 07:55:49 EDT
checked in to HEAD for 3.0.1
Comment 4 Jolene Moffitt CLA 2011-08-02 15:03:16 EDT
Verified in Build I-3.4.0-20110731180834

Verified you can open project (workspace) without NPE after you make changes outside of eclipse with the project closed.  See the link to view test steps for verification. http://wiki.eclipse.org/Dali_3.0.1