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

Bug 367782

Summary: NPE with dynamic persistence and jpql validation
Product: [WebTools] Dali JPA Tools Reporter: Karen Butzke <karenfbutzke>
Component: JPAAssignee: Pascal Filion <pascal.filion>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jolene.moffitt, neil.hauge
Version: 3.1   
Target Milestone: 3.2 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
example entity-mappings.xml
none
npe stack trace none

Description Karen Butzke CLA 2012-01-03 12:45:21 EST
Created attachment 208952 [details]
example entity-mappings.xml

Given an EclipseLink JPA project with the attached entity-mappings.xml and no java files an NPE occurs when attempting the JPQL validation. This is an example of EclipseLink dynamic persistence .http://wiki.eclipse.org/EclipseLink/Examples/JPA/Dynamic
Comment 1 Karen Butzke CLA 2012-01-03 12:45:44 EST
Created attachment 208953 [details]
npe stack trace
Comment 2 Neil Hauge CLA 2012-01-03 12:59:06 EST
I guess the approach we are looking at is tolerating this type of situation in a standard JPA project?  Dynamic persistence will probably be handled in a separate JPA project, so these type of issues will perhaps be lower on the priority list.
Comment 3 Karen Butzke CLA 2012-01-03 14:11:22 EST
Yeah, probably doesn't matter that it's related to dynamic persistence. We wouldn't want the NPEs anyway if they happen to have incorrectly specified the entity name in the JPQL.
Comment 4 Pascal Filion CLA 2012-01-24 15:38:20 EST
Added a null check for the type name, which can happen with dynamic persistence and potentially invalid attributes.
Comment 5 Jolene Moffitt CLA 2012-01-31 10:55:48 EST
Verified in Build I-3.4.0-20120119095402 

Verified when you use the attached entity-mappings.xml file and validate no NPE errors appear.  See the link to view test steps for verification.  http://wiki.eclipse.org/Dali_3.2_M5