Community
Participate
Working Groups
Build Identifier: Version: 4.1.0 Build id: I20110805-1200 When defining a query without specify query statement, an NPE will be throw complaining null text range like: java.lang.NullPointerException: Null text range for message ID: QUERY_STATEMENT_UNDEFINED at org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages.buildMessage(DefaultJpaValidationMessages.java:52) at org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaQuery.validateQuery(AbstractJavaQuery.java:212) at org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaQuery.validate(AbstractJavaQuery.java:192) Full stack trace is attached. Similar problem was found with validating generator name and EclipseLink converter name. Reproducible: Always
Created attachment 203489 [details] stack trace
Just to clarify, this is specific to eclipse platform 4.1/4.2? I can't reproduce with eclipse platform 3.7
Yes, I got this with Eclipse platform 4.1. I remember I didn't reproduce this problem with 3.7, but I launched both builds directly instead of targeting to them.
OK. I tried with launching Eclipse through target platforms. This problem only exists on 4.1.
Nan, I can't seem to reproduce this one, could you attach an example project that shows this error?
Created attachment 203696 [details] sample project Karen, I attach a sample project with which I can reproduce the problem. It's pretty simple. There are few things: 1) You need to target to 4.x platform. 2) you need to create a query without query statement through UI, not through directly typing in the editor. 3) The exception occurs once you save the file.4) This problem seems only appearing for Java. Let me know if you still cannot reproduce it. Thanks!
The thing I wasn't doing was adding the query through the JPA details view. I had no idea that would lead to different results, but now I can reproduce the issue. thanks!
*** Bug 357946 has been marked as a duplicate of this bug. ***
fixed for M2
Verified in Build I-3.4.0-20110922230524 Verified you can add a query without a statement and save without errors. See the link to view test steps for verification. http://wiki.eclipse.org/Dali_3.1_M2