#5 NullPointerException in QueryEvaluator when querying Extent

closed-fixed
Marco Schulze
None
6
2012-05-15
2012-04-03
Marco Schulze
No

When creating a query on an Extent (instead of a class) like this:

pm.newQuery(pm.getExtent(InheritanceHierarchy0.class, false));

the following NPE occurs:

java.lang.NullPointerException
at org.cumulus4j.store.query.QueryEvaluator.<init>(QueryEvaluator.java:133)
at org.cumulus4j.store.query.JDOQueryEvaluator.<init>(JDOQueryEvaluator.java:38)
at org.cumulus4j.store.query.JDOQLQuery.performExecute(JDOQLQuery.java:117)
at org.datanucleus.store.query.Query.executeQuery(Query.java:1791)
at org.datanucleus.store.query.Query.executeWithArray(Query.java:1667)
at org.datanucleus.store.query.Query.execute(Query.java:1640)
at org.datanucleus.api.jdo.JDOQuery.execute(JDOQuery.java:221)
at org.cumulus4j.store.test.inheritance.InheritanceTest.persistAndQueryExcludingSubclassesUsingExtent(InheritanceTest.java:140)
...

The same query can be formulated and executed successfully when using JDOQL like this:

SELECT FROM org.cumulus4j.store.test.inheritance.InheritanceHierarchy0 EXCLUDE SUBCLASSES

Discussion

  • Marco Schulze
    Marco Schulze
    2012-04-03

    • summary: NullPointerException in QueryEvaluator when using Extent --> NullPointerException in QueryEvaluator when querying Extent
     
  • Marco Schulze
    Marco Schulze
    2012-05-15

    • assigned_to: nobody --> nlmarco
     
  • Marco Schulze
    Marco Schulze
    2012-05-15

    • status: open --> closed-fixed