我正在尝试对示例图执行树查询。但是它总是给我一个StackOverflow异常。 遵循这两个文档:
http://tinkerpop.incubator.apache.org/docs/3.0.1-incubating/#tree-step https://github.com/tinkerpop/gremlin/wiki/Tree-Pattern
重现错误:
Neo4j 2.3.2
neo4j-gremlin-plugin
on:Ubuntu 14.04
创建图表:
GET http://localhost:7474/tp/gremlin/execute?script=g.addV("Label1").property("name", "Mark").as("v1").addV("Label2").property( "street", "myStreet").as("v2").addV("Label3").property( "number", 11).as("v3").addE("r1").from("v1").to("v2").addE("r2").from("v2").to("v3")
了解查询
GET http://localhost:7474/tp/gremlin/execute?script=g.V().out("r1").out("r2").tree()
Neo4j日志:
2016-03-17 22:13:56.651+0100 INFO Remote interface ready and available at http://localhost:7474/
2016-03-17 22:22:58.731+0100 ERROR The exception contained within MappableContainerException could not be mapped to a response, re-throwing to the HTTP container
java.lang.StackOverflowError
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._doFindSuperInterfaceChain(TypeFactory.java:1065)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._findSuperInterfaceChain(TypeFactory.java:1060)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._doFindSuperInterfaceChain(TypeFactory.java:1071)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._findSuperInterfaceChain(TypeFactory.java:1060)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._findSuperTypeChain(TypeFactory.java:1014)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory.findTypeParameters(TypeFactory.java:285)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory.findTypeParameters(TypeFactory.java:275)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._fromParamType(TypeFactory.java:862)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._constructType(TypeFactory.java:390)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeBindings._resolveBindings(TypeBindings.java:267)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeBindings._resolveBindings(TypeBindings.java:326)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeBindings._resolve(TypeBindings.java:212)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeBindings.findType(TypeBindings.java:126)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._fromVariable(TypeFactory.java:902)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._constructType(TypeFactory.java:399)
[... lines omitted ....]
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory.findTypeParameters(TypeFactory.java:303)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory.findTypeParameters(TypeFactory.java:275)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._fromParamType(TypeFactory.java:862)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._constructType(TypeFactory.java:390)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeBindings._resolveBindings(TypeBindings.java:267)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeBindings._resolveBindings(TypeBindings.java:326)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeBindings._resolve(TypeBindings.java:212)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeBindings.findType(TypeBindings.java:126)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._fromVariable(TypeFactory.java:902)
javax.servlet.ServletException: java.lang.StackOverflowError
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:420)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:800)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
at ch.qos.logback.access.servlet.TeeFilter.doFilter(TeeFilter.java:55)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.neo4j.server.rest.dbms.AuthorizationFilter.doFilter(AuthorizationFilter.java:116)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.neo4j.server.rest.web.CollectUserAgentFilter.doFilter(CollectUserAgentFilter.java:69)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:497)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:620)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:540)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.StackOverflowError
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._doFindSuperInterfaceChain(TypeFactory.java:1065)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._findSuperInterfaceChain(TypeFactory.java:1060)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._doFindSuperInterfaceChain(TypeFactory.java:1071)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._findSuperInterfaceChain(TypeFactory.java:1060)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._findSuperTypeChain(TypeFactory.java:1014)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory.findTypeParameters(TypeFactory.java:285)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory.findTypeParameters(TypeFactory.java:275)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._fromParamType(TypeFactory.java:862)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._constructType(TypeFactory.java:390)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeBindings._resolveBindings(TypeBindings.java:267)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeBindings._resolveBindings(TypeBindings.java:326)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeBindings._resolve(TypeBindings.java:212)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeBindings.findType(TypeBindings.java:126)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._fromVariable(TypeFactory.java:902)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._constructType(TypeFactory.java:399)
[... lines omitted ....]
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory.findTypeParameters(TypeFactory.java:303)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory.findTypeParameters(TypeFactory.java:275)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._fromParamType(TypeFactory.java:862)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._constructType(TypeFactory.java:390)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeBindings._resolveBindings(TypeBindings.java:267)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeBindings._resolveBindings(TypeBindings.java:326)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeBindings._resolve(TypeBindings.java:212)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeBindings.findType(TypeBindings.java:126)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._fromVariable(TypeFactory.java:902)
2016-03-17 22:22:59.106+0100 WARN java.lang.StackOverflowError
javax.servlet.ServletException: java.lang.StackOverflowError
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:420)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:800)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
at ch.qos.logback.access.servlet.TeeFilter.doFilter(TeeFilter.java:55)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.neo4j.server.rest.dbms.AuthorizationFilter.doFilter(AuthorizationFilter.java:116)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.neo4j.server.rest.web.CollectUserAgentFilter.doFilter(CollectUserAgentFilter.java:69)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:497)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:620)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:540)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.StackOverflowError
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._doFindSuperInterfaceChain(TypeFactory.java:1065)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._findSuperInterfaceChain(TypeFactory.java:1060)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._doFindSuperInterfaceChain(TypeFactory.java:1071)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._findSuperInterfaceChain(TypeFactory.java:1060)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._findSuperTypeChain(TypeFactory.java:1014)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory.findTypeParameters(TypeFactory.java:285)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory.findTypeParameters(TypeFactory.java:275)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._fromParamType(TypeFactory.java:862)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._constructType(TypeFactory.java:390)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeBindings._resolveBindings(TypeBindings.java:267)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeBindings._resolveBindings(TypeBindings.java:326)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeBindings._resolve(TypeBindings.java:212)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeBindings.findType(TypeBindings.java:126)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._fromVariable(TypeFactory.java:902)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory._constructType(TypeFactory.java:399)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory.findTypeParameters(TypeFactory.java:303)
at org.apache.tinkerpop.shaded.jackson.databind.type.TypeFactory.findTypeParameters(TypeFactory.java:275)
[... lines omitted ....]
你能帮我解决一下这个问题吗? 非常感谢
答案 0 :(得分:2)
这可能是一个TinkerPop问题:this IDEONE demo(实际上是最近刚刚在2.7.x中得到修复的TINKERPOP-732)并且应该在3.1.2版本中得到修复。