Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316022 - NPE refreshing out of sync entity
Summary: NPE refreshing out of sync entity
Status: VERIFIED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: General (show other bugs)
Version: 2.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0.1   Edit
Assignee: Karen Butzke CLA
QA Contact:
URL:
Whiteboard: fix_ready
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-07 12:14 EDT by Karen Butzke CLA
Modified: 2011-08-02 15:03 EDT (History)
2 users (show)

See Also:
neil.hauge: review+


Attachments
NPE stack trace (3.76 KB, text/plain)
2010-06-07 12:14 EDT, Karen Butzke CLA
no flags Details
proposed patch against head (5.14 KB, patch)
2011-06-08 10:51 EDT, Karen Butzke CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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