]
Jiri Peterka closed JBIDE-9218.
-------------------------------
Verified in JBDS 5.0.0.M3.H24,Linux64
JPA: Null text range in HibernateQuery validation process
---------------------------------------------------------
Key: JBIDE-9218
URL:
https://issues.jboss.org/browse/JBIDE-9218
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: hibernate
Affects Versions: 3.3.0.M2
Reporter: Dmitry Geraskov
Assignee: Dmitry Geraskov
Priority: Critical
Fix For: 3.3.0.M2, 3.3.0.M3
Attachments: JBIDE-9218.patch
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)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: