You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Rajeev Jha <jh...@gmail.com> on 2008/03/25 13:00:55 UTC

NPE in subquery

Hi
I have a very simple sub query. when I try to execute this sub query I
get NPE . looking at stack trace it seems to come from query
expression parser. The JQL is

 select stgrp from  Stagegroup stgrp  " +
			" where stgrp.dumpId = :dumpId and stgrp.name  "  +
			" IN ( select xname from group grp  " +
			" where  grp.prop1 = :value1)

I have also looked at openJPA-16 and OpenJPA-157. I am not supplying
null values anywhere. is this some known issue , any further clues or
how I can go about making sure its a code bug and not openJPA or
vice-versa ?

openJPA version is => openjpa-1.0.1-r420667:592145

.
Caused by: java.lang.NullPointerException
	at org.apache.openjpa.jdbc.kernel.exps.PCPath.initialize(PCPath.java:445)
	at org.apache.openjpa.jdbc.kernel.exps.SubQ.initialize(SubQ.java:104)
	at org.apache.openjpa.jdbc.kernel.exps.InSubQExpression.initialize(InSubQExpression.java:48)
	at org.apache.openjpa.jdbc.kernel.exps.AndExpression.initialize(AndExpression.java:48)
	at org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.initialize(SelectConstructor.java:178)
	at org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.newSelect(SelectConstructor.java:119)
	at org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.evaluate(SelectConstructor.java:73)
	at org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.createWhereSelects(JDBCStoreQuery.java:331)
	at org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.executeQuery(JDBCStoreQuery.java:171)
	at org.apache.openjpa.kernel.ExpressionStoreQuery$DataStoreExecutor.executeQuery(ExpressionStoreQuery.java:676)
	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:988)
	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:842)



Thanks

- rajeev