我们在使用neo4j的java插件时遇到了问题。直到今天,我们在GeoPipeline上使用toSpatialDatabaseRecordList方法没有问题。我们刚刚修改了一些错误,现在我们在方法调用上得到了一个NullPointerException。
以下是代码:
try (Transaction tx = graphDb.beginTx()) {
geoPoints = GeoPipeline
.startNearestNeighborLatLonSearch(layer, point, radius)
.toSpatialDatabaseRecordList();
tx.success();
}
[编辑]这是完整的堆栈:
Unable to search trips [500]:
Headers: Array
(
[Content-Type] => application/json; charset=UTF-8; stream=true
[Access-Control-Allow-Origin] => *
[Server] => Jetty(9.0.5.v20130815)
)
Body: Array
(
[exception] => NullPointerException
[fullname] => java.lang.NullPointerException
[stacktrace] => Array
(
[0] => org.neo4j.gis.spatial.rtree.filter.AbstractSearchEnvelopeIntersection.needsToVisit(AbstractSearchEnvelopeIntersection.java:38)
[1] => org.neo4j.gis.spatial.rtree.RTreeIndex$SearchEvaluator.checkPosition(RTreeIndex.java:268)
[2] => org.neo4j.gis.spatial.rtree.RTreeIndex$SearchEvaluator.isStopNode(RTreeIndex.java:283)
[3] => org.neo4j.kernel.impl.traversal.OldTraverserWrapper$Pruner.evaluate(OldTraverserWrapper.java:260)
[4] => org.neo4j.graphdb.traversal.Evaluator$AsPathEvaluator.evaluate(Evaluator.java:69)
[5] => org.neo4j.kernel.impl.traversal.MultiEvaluator.evaluate(MultiEvaluator.java:62)
[6] => org.neo4j.kernel.impl.traversal.MonoDirectionalTraverserIterator.evaluate(MonoDirectionalTraverserIterator.java:59)
[7] => org.neo4j.kernel.impl.traversal.TraversalBranchImpl.evaluate(TraversalBranchImpl.java:125)
[8] => org.neo4j.kernel.impl.traversal.TraversalBranchImpl.initialize(TraversalBranchImpl.java:130)
[9] => org.neo4j.kernel.impl.traversal.TraversalBranchImpl.next(TraversalBranchImpl.java:151)
[10] => org.neo4j.kernel.impl.traversal.TraversalBranchWithState.next(TraversalBranchWithState.java:32)
[11] => org.neo4j.kernel.impl.traversal.StartNodeTraversalBranch.next(StartNodeTraversalBranch.java:50)
[12] => org.neo4j.graphdb.traversal.PreorderDepthFirstSelector.next(PreorderDepthFirstSelector.java:49)
[13] => org.neo4j.kernel.impl.traversal.MonoDirectionalTraverserIterator.fetchNextOrNull(MonoDirectionalTraverserIterator.java:68)
[14] => org.neo4j.kernel.impl.traversal.MonoDirectionalTraverserIterator.fetchNextOrNull(MonoDirectionalTraverserIterator.java:35)
[15] => org.neo4j.helpers.collection.PrefetchingIterator.peek(PrefetchingIterator.java:60)
[16] => org.neo4j.helpers.collection.PrefetchingIterator.hasNext(PrefetchingIterator.java:46)
[17] => org.neo4j.helpers.collection.PrefetchingIterator.next(PrefetchingIterator.java:75)
[18] => org.neo4j.kernel.impl.traversal.OldTraverserWrapper$TraverserImpl.next(OldTraverserWrapper.java:86)
[19] => org.neo4j.kernel.impl.traversal.OldTraverserWrapper$TraverserImpl.next(OldTraverserWrapper.java:47)
[20] => org.neo4j.gis.spatial.filter.SearchRecords.next(SearchRecords.java:53)
[21] => org.neo4j.gis.spatial.filter.SearchRecords.next(SearchRecords.java:29)
[22] => org.neo4j.gis.spatial.pipes.GeoPipeline$1.next(GeoPipeline.java:134)
[23] => org.neo4j.gis.spatial.pipes.GeoPipeline$1.next(GeoPipeline.java:126)
[24] => org.neo4j.gis.spatial.pipes.impl.LastElementIterator.next(LastElementIterator.java:19)
[25] => org.neo4j.gis.spatial.pipes.impl.IdentityPipe.processNextStart(IdentityPipe.java:18)
[26] => org.neo4j.gis.spatial.pipes.impl.AbstractPipe.next(AbstractPipe.java:72)
[27] => org.neo4j.gis.spatial.pipes.AbstractGeoPipe.processNextStart(AbstractGeoPipe.java:49)
[28] => org.neo4j.gis.spatial.pipes.AbstractGeoPipe.processNextStart(AbstractGeoPipe.java:31)
[29] => org.neo4j.gis.spatial.pipes.impl.AbstractPipe.next(AbstractPipe.java:72)
[30] => org.neo4j.gis.spatial.pipes.AbstractGeoPipe.processNextStart(AbstractGeoPipe.java:49)
[31] => org.neo4j.gis.spatial.pipes.AbstractGeoPipe.processNextStart(AbstractGeoPipe.java:31)
[32] => org.neo4j.gis.spatial.pipes.impl.AbstractPipe.next(AbstractPipe.java:72)
[33] => org.neo4j.gis.spatial.pipes.impl.Pipeline.next(Pipeline.java:113)
[34] => org.neo4j.gis.spatial.pipes.GeoPipeline.toSpatialDatabaseRecordList(GeoPipeline.java:998)
[35] => org.neo4j.ecolutis.server.plugins.WayPointsSearcher.getWayPointsSimpleWay(WayPointsSearcher.java:80)
[36] => org.neo4j.ecolutis.server.plugins.WayPointsSearcher.getWayPoints(WayPointsSearcher.java:52)
[37] => org.neo4j.ecolutis.server.plugins.SearchTrips.searchTrips(SearchTrips.java:76)
[38] => java.lang.reflect.Method.invoke(Method.java:606)
[39] => org.neo4j.server.plugins.PluginMethod.invoke(PluginMethod.java:61)
[40] => org.neo4j.server.plugins.PluginManager.invoke(PluginManager.java:159)
[41] => org.neo4j.server.rest.web.ExtensionService.invokeGraphDatabaseExtension(ExtensionService.java:312)
[42] => org.neo4j.server.rest.web.ExtensionService.invokeGraphDatabaseExtension(ExtensionService.java:134)
[43] => java.lang.reflect.Method.invoke(Method.java:606)
[44] => org.neo4j.server.rest.transactional.TransactionalRequestDispatcher.dispatch(TransactionalRequestDispatcher.java:139)
[45] => java.lang.Thread.run(Thread.java:745)
)
)
您对如何处理此问题有所了解吗?这是数据问题吗?
此致
没有