[
https://issues.jboss.org/browse/AS7-5555?page=com.atlassian.jira.plugin.s...
]
Scott Marlow commented on AS7-5555:
-----------------------------------
The AS7 "JPA/Hibernate" jira component is for reporting bugs in our EE JPA
container side implementation (e.g. @PersistenceContext injection is implemented by the
container org.jboss.as.jpa.* codebase). The JPA subsystem is also responsible for
deployment of the persistence units. AS7 management console shows Hibernate JPA statistics
which is made possible by integration code in the AS7 JPA subsystem. To upgrade to a
newer version of Hibernate in AS7, creating an AS7 jira is also the place to do that.
For bugs that are in the Hibernate codebase, creating a
[
HHH|https://hibernate.onjira.com/browse/HHH] jira is right.
NullPointerException at
org.hibernate.hql.internal.ast.HqlSqlWalker.createFromJoinElement(HqlSqlWalker.java:393)
---------------------------------------------------------------------------------------------------------------------
Key: AS7-5555
URL:
https://issues.jboss.org/browse/AS7-5555
Project: Application Server 7
Issue Type: Bug
Components: JPA / Hibernate
Affects Versions: 7.1.2.Final (EAP)
Reporter: Ondrej Zizka
Assignee: Scott Marlow
Labels: NPE, NullPointerException, UX, usability
A query
{code}
SELECT pr FROM ProductRelease pr LEFT JOIN pr.line pl ORDER BY pl.name
{code}
on a simple entity in other entity causes a NPEx:
{code}
Caused by: java.lang.NullPointerException
at
org.hibernate.hql.internal.ast.HqlSqlWalker.createFromJoinElement(HqlSqlWalker.java:393)
[hibernate-core-4.1.5.SP1.jar:4.1.5.SP1]
at
org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.joinElement(HqlSqlBaseWalker.java:3516)
[hibernate-core-4.1.5.SP1.jar:4.1.5.SP1]
at
org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:3302)
[hibernate-core-4.1.5.SP1.jar:4.1.5.SP1]
at
org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:3180)
[hibernate-core-4.1.5.SP1.jar:4.1.5.SP1]
at
org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:706)
[hibernate-core-4.1.5.SP1.jar:4.1.5.SP1]
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:562)
[hibernate-core-4.1.5.SP1.jar:4.1.5.SP1]
at
org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:299)
[hibernate-core-4.1.5.SP1.jar:4.1.5.SP1]
at
org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:247)
[hibernate-core-4.1.5.SP1.jar:4.1.5.SP1]
at
org.hibernate.hql.internal.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:248)
[hibernate-core-4.1.5.SP1.jar:4.1.5.SP1]
at
org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:183)
[hibernate-core-4.1.5.SP1.jar:4.1.5.SP1]
at
org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136)
[hibernate-core-4.1.5.SP1.jar:4.1.5.SP1]
at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:105)
[hibernate-core-4.1.5.SP1.jar:4.1.5.SP1]
at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:80)
[hibernate-core-4.1.5.SP1.jar:4.1.5.SP1]
at
org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:168)
[hibernate-core-4.1.5.SP1.jar:4.1.5.SP1]
at
org.hibernate.internal.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:219)
[hibernate-core-4.1.5.SP1.jar:4.1.5.SP1]
at org.hibernate.internal.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:197)
[hibernate-core-4.1.5.SP1.jar:4.1.5.SP1]
at org.hibernate.internal.SessionImpl.createQuery(SessionImpl.java:1736)
[hibernate-core-4.1.5.SP1.jar:4.1.5.SP1]
at
org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:291)
[hibernate-entitymanager-4.1.5.SP1.jar:4.1.5.SP1]
at
org.jboss.as.jpa.container.AbstractEntityManager.createQuery(AbstractEntityManager.java:425)
[jboss-as-jpa-7.1.2.Final.jar:7.1.2.Final]
{code}
I'm filling this here since in Hibernate jira NPEx are (or used to be FWIR) ignored,
whereas for AS 7 / EAP 6 we agreed that NPEx is not a good way to let user know that
something's wrong. In this case, it's missing N:1 mapping annotation.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira