Test case:
create an entity with 2 queries:
@javax.persistence.NamedQuery(name="nn", query = "SELECT qq.id3 FROM JustData qq")
@org.hibernate.annotations.NamedQuery(name = "nn", query = "")
Observe the exception:
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:236)
at org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaQuery.validate(AbstractJavaQuery.java:216)
at org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit.validate(AbstractPersistenceUnit.java:2433)
at org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit.validateQueries(AbstractPersistenceUnit.java:2398)