Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357946 - JPA validation stop working with invalid query statement
Summary: JPA validation stop working with invalid query statement
Status: CLOSED DUPLICATE of bug 357948
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: JPA (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.1 M2   Edit
Assignee: Neil Hauge CLA
QA Contact:
URL:
Whiteboard: wtp4x
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-16 10:10 EDT by Nan Li CLA
Modified: 2011-09-21 09:31 EDT (History)
1 user (show)

See Also:


Attachments
stack trace (3.36 KB, text/plain)
2011-09-16 10:11 EDT, Nan Li CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nan Li CLA 2011-09-16 10:10:25 EDT
Build Identifier: Version: 4.1.0 Build id: I20110805-1200

When creating a "named query" with invalid query statement, JPA validation will stop working with exceptions:

Exception 1: 
JPA Validator finished validating: file...

Exception 2:
java.lang.NullPointerException
	at org.eclipse.jpt.jpa.core.internal.jpql.JpaJpqlQueryHelper.buildProblem(JpaJpqlQueryHelper.java:135)
	at org.eclipse.jpt.jpa.core.internal.jpql.JpaJpqlQueryHelper.validate(JpaJpqlQueryHelper.java:232)
	at org.eclipse.jpt.jpa.core.internal.jpa2.context.java.GenericJavaNamedQuery2_0.validateQuery_(GenericJavaNamedQuery2_0.java:101)
	at org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaQuery.validateQuery(AbstractJavaQuery.java:221)

Full stack trace is attached. 

Reproducible: Always

Steps to Reproduce:
1. Create a named query for an entity
2. Go to JPA Details -> Queries and add a named query
3. Input query statement like "blabla" and save it
Comment 1 Nan Li CLA 2011-09-16 10:11:47 EDT
Created attachment 203488 [details]
stack trace
Comment 2 Neil Hauge CLA 2011-09-20 23:37:29 EDT
I am able to reproduce on 4.2 base.  I cannot reproduce on 3.8.
Comment 3 Karen Butzke CLA 2011-09-21 09:31:53 EDT
The fix for this is the same as bug 357948, so I am marking it as a duplicate.

*** This bug has been marked as a duplicate of bug 357948 ***