为我的应用使用以下版本,但在创建空间图层时获得异常
neo4j = neo4j-enterprise-2.1.7
spatial = neo4j-spatial-0.13-neo4j-2.1.2-server-plugin
在使用REST API添加图层时,获得以下异常: 创建新图层' geoindex_venues'除非它已经存在 13:34:49.466 [qtp22441773-51] WARN o.e.jetty.servlet.ServletHandler - / db / data / index / node / java.util.NoSuchElementException:org.neo4j.cypher.internal.compiler.v2_1.PipeExecutionResult$$anon$1@46935c97中的多个元素。第一个元素是节点[0]'第二个元素是节点[1]' 在org.neo4j.helpers.collection.IteratorUtil.single(IteratorUtil.java:338)〜[neo4j-kernel-2.1.7.jar:2.1.7] at org.neo4j.helpers.collection.IteratorUtil.singleOrNull(IteratorUtil.java:128)~ [neo4j-kernel-2.1.7.jar:2.1.7] 在org.neo4j.helpers.collection.IteratorUtil.single(IteratorUtil.java:143)〜[neo4j-kernel-2.1.7.jar:2.1.7] at org.neo4j.gis.spatial.utilities.ReferenceNodes.getReferenceNode(ReferenceNodes.java:45)〜[neo4j-spatial-0.13-neo4j-2.1.2.jar:na] at org.neo4j.gis.spatial.SpatialDatabaseService.getSpatialRoot(SpatialDatabaseService.java:76)〜[neo4j-spatial-0.13-neo4j-2.1.2.jar:na] 在org.neo4j.gis.spatial.SpatialDatabaseService.getLayer(SpatialDatabaseService.java:108)〜[neo4j-spatial-0.13-neo4j-2.1.2.jar:na] 在org.neo4j.gis.spatial.SpatialDatabaseService.getOrCreatePointLayer(SpatialDatabaseService.java:187)〜[neo4j-spatial-0.13-neo4j-2.1.2.jar:na] 在org.neo4j.gis.spatial.indexprovider.LayerNodeIndex。(LayerNodeIndex.java:90)〜[neo4j-spatial-0.13-neo4j-2.1.2.jar:na] 在org.neo4j.gis.spatial.indexprovider.SpatialIndexImplementation.nodeIndex(SpatialIndexImplementation.java:47)〜[neo4j-spatial-0.13-neo4j-2.1.2.jar:na] at org.neo4j.kernel.impl.coreapi.IndexManagerImpl.getOrCreateNodeIndex(IndexManagerImpl.java:318)~ [neo4j-kernel-2.1.7.jar:2.1.7] at org.neo4j.kernel.impl.coreapi.IndexManagerImpl.forNodes(IndexManagerImpl.java:302)〜[neo4j-kernel-2.1.7.jar:2.1.7] 在org.neo4j.server.rest.web.DatabaseActions.createNodeIndex(DatabaseActions.java:398)〜[neo4j-server-2.1.7.jar:2.1.7] at org.neo4j.server.rest.web.RestfulGraphDatabase.jsonCreateNodeIndex(RestfulGraphDatabase.java:866)~ [neo4j-server-2.1.7.jar:2.1.7] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)〜[na:1.7.0_75] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)〜[na:1.7.0_75] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)〜[na:1.7.0_75] 在java.lang.reflect.Method.invoke(Method.java:606)〜[na:1.7.0_75] 在com.sun.jersey.spi.container.JavaMethodInvokerFactory $ 1.invoke(JavaMethodInvokerFactory.java:60)〜[jersey-server-1.9.jar:1.9] at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider $ ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)〜[jersey-server-1.9.jar:1.9] 在com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)〜[jersey-server-1.9.jar:1.9] 在org.neo4j.server.rest.transactional.TransactionalRequestDispatcher.dispatch(TransactionalRequestDispatcher.java:139)〜[neo4j-server-2.1.7.jar:2.1.7] 在com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)〜[jersey-server-1.9.jar:1.9] 在com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)〜[jersey-server-1.9.jar:1.9] 在com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)~ [jersey-server-1.9.jar:1.9] 在com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)〜[jersey-server-1.9.jar:1.9] 在com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)〜[jersey-server-1.9.jar:1.9] at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)~ [jersey-server-1.9.jar:1.9] 在com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)〜[jersey-server-1.9.jar:1.9] at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)~ [jersey-server-1.9.jar:1.9] at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)~ [jersey-server-1.9.jar:1.9] 在com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)〜[jersey-server-1.9.jar:1.9] 在com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)〜[jersey-server-1.9.jar:1.9] 在com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)〜[jersey-server-1.9.jar:1.9] 在javax.servlet.http.HttpServlet.service(HttpServlet.java:848)〜[javax.servlet-3.0.0.v201112011016.jar:na] 在org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:698)〜[jetty-servlet-9.0.5.v20130815.jar:9.0.5.v20130815] 在org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:505)[jetty-servlet-9.0.5.v20130815.jar:9.0.5.v20130815] 在org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:211)[jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815] 在org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1096)[jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815] 在org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:432)[jetty-servlet-9.0.5.v20130815.jar:9.0.5.v20130815] 在org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:175)[jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815] 在org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1030)[jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815] 在org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136)[jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)[jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815] 在org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:92)[jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815] 在org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.server.Server.handle(Server.java:445)[jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815] 在org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:268)[jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:229)[jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815] 在org.eclipse.jetty.io.AbstractConnection $ ReadCallback.run(AbstractConnection.java:358)[jetty-io-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:601)[jetty-util-9.0.5.v20130815.jar:9.0.5.v20130815] 在org.eclipse.jetty.util.thread.QueuedThreadPool $ 3.run(QueuedThreadPool.java:532)[jetty-util-9.0.5.v20130815.jar:9.0.5.v20130815] 在java.lang.Thread.run(Thread.java:745)[na:1.7.0_75]
答案 0 :(得分:0)
您似乎有空间扩展的多个根参考节点。然而,扩展期望仅找到一个参考节点作为入口点。要验证此理论,请检查您是否获得了多个结果
MATCH (n:ReferenceNode) RETURN n
如果是这样,你需要检查参考节点下面的树是否正确,并递归地删除所有其他树。