Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO/Hibernate] NPE: at org.hibernate.hql.internal.ast.HqlSqlWalker.createFromJoinElement(HqlSqlWalk
[CDO/Hibernate] NPE: at org.hibernate.hql.internal.ast.HqlSqlWalker.createFromJoinElement(HqlSqlWalk [message #900523] Tue, 07 August 2012 07:46
Erdal Karaca is currently offline Erdal Karaca
Messages: 703
Registered: July 2009
Senior Member
I am trying to query for a EClass reference in a hql which looks like this:

select s from MyBusinessType s
inner join s.type as t
where t.name = 'MyType'


EClass MyBusinessType
- type : EClass 1..1


If I execute that query I will get a NPE:

java.lang.NullPointerException
	at org.hibernate.hql.internal.ast.HqlSqlWalker.createFromJoinElement(HqlSqlWalker.java:395)
	at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.joinElement(HqlSqlBaseWalker.java:3477)
	at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:3263)
	at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:3141)
	at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:694)
	at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:550)
	at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:287)
	at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:235)
	at org.hibernate.hql.internal.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:248)
	at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:183)
	at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136)
	at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:106)
	at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:81)
	at org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:167)
	at org.hibernate.internal.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:217)
	at org.hibernate.internal.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:195)
	at org.hibernate.internal.SessionImpl.createQuery(SessionImpl.java:1649)
	at org.eclipse.emf.cdo.server.internal.hibernate.HibernateQueryHandler.executeQuery(HibernateQueryHandler.java:71)
	at org.eclipse.emf.cdo.internal.server.QueryManager$QueryContext.run(QueryManager.java:293)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)


Is that a valid hql? What might be wrong?
Previous Topic:[EMF] [CommandStack] Best Practices to use ChangeCommand around UI Dialog
Next Topic:How to create Bookmark in skeleton JET
Goto Forum:
  


Current Time: Mon Apr 21 11:39:20 EDT 2014

Powered by FUDForum. Page generated in 0.01610 seconds