Closed GoogleCodeExporter closed 9 years ago
There is a single object loaded in the extent. I have wrapped the
extent.closeAll() method call with a try/catch block that grabs and logs the
NullPointerException so my application can continue to run.
Original comment by derek.berube
on 21 Sep 2012 at 2:01
Also caused when I invoke the closeAll() method on a Query object.
Caused by: java.lang.NullPointerException
at com.google.appengine.datanucleus.query.StreamingQueryResult.cacheQueryResults(StreamingQueryResult.java:116)
at com.google.appengine.datanucleus.query.StreamingQueryResult.closeResults(StreamingQueryResult.java:109)
at org.datanucleus.store.query.AbstractQueryResult.close(AbstractQueryResult.java:143)
at org.datanucleus.store.query.Query.close(Query.java:2124)
at org.datanucleus.store.query.Query.closeAll(Query.java:2139)
at org.datanucleus.api.jdo.JDOQuery.closeAll(JDOQuery.java:85)
at com.wildstartech.justocrm.jdo.GroupDAOImpl.findByName(GroupDAOImpl.java:106)
at com.wildstartech.justocrm.jdo.GroupDAOImpl.findByName(GroupDAOImpl.java:1)
at com.wildstartech.justocrm.ui.BasicTicketForm.setAssignedGroupName(BasicTicketForm.java:82)
at com.wildstartech.justocrm.ui.IssueEditorForm.<init>(IssueEditorForm.java:34)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.google.appengine.tools.development.agent.runtime.Runtime.newInstance_(Runtime.java:127)
at com.google.appengine.tools.development.agent.runtime.Runtime.newInstance(Runtime.java:148)
at com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:188)
Original comment by derek.berube
on 21 Sep 2012 at 2:34
To eliminate the NullPointerException, I modified the cacheQueryResults()
method of the StreamingQueryResult class found in the
com.google.appengine.datanucleus.query package from the following:
protected void cacheQueryResults() {
if (query.useResultsCaching()) {
lazyResult.resolveAll();
query.getQueryManager().addDatastoreQueryResult(query, query.getInputParameters(), lazyResult.getEntityKeys());
}
}
to the following:
protected void cacheQueryResults() {
if (query != null) {
if (query.useResultsCaching()) {
lazyResult.resolveAll();
query.getQueryManager().addDatastoreQueryResult(query, query.getInputParameters(), lazyResult.getEntityKeys());
}
} // END if (query != null)
}
Original comment by derek.berube
on 21 Sep 2012 at 3:27
Current SVN trunk likely works, left as an exercise to check it
Original comment by googleco...@yahoo.co.uk
on 27 Sep 2012 at 11:07
[deleted comment]
We are getting this exception too on calling query.closeAll(). We are currently
using the latest dist version 2.0. How do we get the latest fix?
Original comment by amit.san...@gmail.com
on 17 Oct 2012 at 4:14
Any guidance as to when the 2.1.2 version of the
datanucleus-appengine-2.1.2.jar is going to be formerly released?
Original comment by derek.be...@wildstartech.com
on 11 Nov 2012 at 5:39
You get the latest fix by checking out from SVN of this project and typing "mvn
clean install". When its released is for Google to decide ...
Original comment by googleco...@yahoo.co.uk
on 26 Nov 2012 at 9:14
Original issue reported on code.google.com by
derek.berube
on 21 Sep 2012 at 1:54