Hi all,

Pretty new to neo4j and am playing around with it to store some ontology data. 
So far my experience has been pretty good but I am running into an odd issue 
when trying to get the shortest path between two nodes using the REST API. The 
command I am using is the following:

 curl -H Accept:application/json -H Content-Type:application/json -X POST 
http://localhost:7474/db/data/node/7212/paths -d 
'{"to":"http://localhost:7474/db/data/node/2499","relationships": {"type": 
"is_a", "direction": "in"}, "algorithm": "shortestPath", "max depth": 50000}'

Which fails and prints out the following exception:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 500 Node[7025] not connected to this relationship[552]</title>
<head>
<body><h2>HTTP ERROR 500</h2>
<p>Problem accessing /db/data/node/7212/paths. Reason:
<pre>    Node[7025] not connected to this relationship[552]</pre></p><h3>Caused 
by:</h3><pre>org.neo4j.graphdb.NotFoundException: Node[7025] not connected to 
this relationship[552]
        at 
org.neo4j.kernel.impl.core.RelationshipImpl.getOtherNode(RelationshipImpl.java:107)
        at 
org.neo4j.kernel.impl.core.RelationshipProxy.getOtherNode(RelationshipProxy.java:61)
        at org.neo4j.graphalgo.impl.util.PathImpl$1$1.next(PathImpl.java:194)
        at org.neo4j.graphalgo.impl.util.PathImpl$1$1.next(PathImpl.java:207)
        at 
org.neo4j.helpers.collection.IteratorWrapper.next(IteratorWrapper.java:48)
        at 
org.neo4j.server.rest.repr.ListRepresentation.serialize(ListRepresentation.java:59)
        at org.neo4j.server.rest.repr.Serializer.serialize(Serializer.java:74)
        at 
org.neo4j.server.rest.repr.MappingSerializer.putList(MappingSerializer.java:62)
        at 
org.neo4j.server.rest.repr.ListRepresentation.putTo(ListRepresentation.java:74)
        at 
org.neo4j.server.rest.repr.ObjectRepresentation$PropertyGetter.putTo(ObjectRepresentation.java:136)
        at 
org.neo4j.server.rest.repr.ObjectRepresentation.serialize(ObjectRepresentation.java:147)
        at org.neo4j.server.rest.repr.Serializer.serialize(Serializer.java:41)
        at 
org.neo4j.server.rest.repr.ListSerializer.addMapping(ListSerializer.java:57)
        at 
org.neo4j.server.rest.repr.MappingRepresentation.addTo(MappingRepresentation.java:53)
        at 
org.neo4j.server.rest.repr.ListRepresentation.serialize(ListRepresentation.java:61)
        at 
org.neo4j.server.rest.repr.ListRepresentation.serialize(ListRepresentation.java:52)
        at org.neo4j.server.rest.repr.OutputFormat.format(OutputFormat.java:119)
        at 
org.neo4j.server.rest.repr.OutputFormat.response(OutputFormat.java:99)
        at org.neo4j.server.rest.repr.OutputFormat.ok(OutputFormat.java:49)
        at 
org.neo4j.server.rest.web.RestfulGraphDatabase.allPaths(RestfulGraphDatabase.java:718)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at 
com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:187)
        at 
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:70)
        at 
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:279)
        at 
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136)
        at 
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:86)
        at 
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136)
        at 
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:74)
        at 
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1357)
        at 
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1289)
        at 
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1239)
        at 
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1229)
        at 
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:420)
        at 
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:497)
        at 
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:684)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
        at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
        at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
        at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
        at 
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:322)
        at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
        at 
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)     
   at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at 
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
        at 
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

Only seems to crop up when I look for the shortest path as I can run allPaths 
or allSimplePaths with no problem. Any help would be appreciated here, thanks!

Cesar
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to