Cypher 1.8: Relationship not found

134 views
Skip to first unread message

Luanne Coutinho

unread,
Oct 16, 2012, 11:22:44 PM10/16/12
to ne...@googlegroups.com
Hi,

I am puzzling over this exception in my logs and am not sure what is causing this because when I check the db after this, the node is present.
Here is the Cypher statement:

start
    n=node:units(id={id}),
   newType=node:types(id={newTypeId}),
   newGroup=node:groups(id={newGroupId})
match
   (g)<-[oldgroup?:has_group]-(n)-[old:has_type]->(oldType)
  create (newGroup)<-[:has_group]-(n)-[:has_type]->(newType)
  set n.name={name}, n.uniqueId={uniqueId}
  delete old, oldgroup

Params:

{id=21, newGroupId=3, name=Desc Chiller 1, newTypeId=11, uniqueId=Chiller 1_P1}

Exception:
Caused by: org.neo4j.graphdb.NotFoundException: Relationship[34] not found.
    at org.neo4j.kernel.impl.core.NodeManager.getRelationshipForProxy(NodeManager.java:561) ~[neo4j-kernel-1.8.jar:1.8]
    at org.neo4j.kernel.InternalAbstractGraphDatabase$3.lookupRelationship(InternalAbstractGraphDatabase.java:628) ~[neo4j-kernel-1.8.jar:1.8]
    at org.neo4j.kernel.impl.core.RelationshipProxy.delete(RelationshipProxy.java:62) ~[neo4j-kernel-1.8.jar:1.8]
    at org.neo4j.cypher.internal.mutation.DeleteEntityAction.org$neo4j$cypher$internal$mutation$DeleteEntityAction$$delete(DeleteEntityAction.scala:54) ~[neo4j-cypher-1.8.jar:1.8]
    at org.neo4j.cypher.internal.mutation.DeleteEntityAction.exec(DeleteEntityAction.scala:35) ~[neo4j-cypher-1.8.jar:1.8]
    at org.neo4j.cypher.internal.mutation.DeleteEntityAction.exec(DeleteEntityAction.scala:30) ~[neo4j-cypher-1.8.jar:1.8]
    at org.neo4j.cypher.internal.pipes.ExecuteUpdateCommandsPipe.org$neo4j$cypher$internal$pipes$ExecuteUpdateCommandsPipe$$exec(ExecuteUpdateCommandsPipe.scala:52) ~[neo4j-cypher-1.8.jar:1.8]
    at org.neo4j.cypher.internal.pipes.ExecuteUpdateCommandsPipe$$anonfun$org$neo4j$cypher$internal$pipes$ExecuteUpdateCommandsPipe$$executeMutationCommands$1$$anonfun$apply$1.apply(ExecuteUpdateCommandsPipe.scala:43) ~[neo4j-cypher-1.8.jar:1.8]
    at org.neo4j.cypher.internal.pipes.ExecuteUpdateCommandsPipe$$anonfun$org$neo4j$cypher$internal$pipes$ExecuteUpdateCommandsPipe$$executeMutationCommands$1$$anonfun$apply$1.apply(ExecuteUpdateCommandsPipe.scala:43) ~[neo4j-cypher-1.8.jar:1.8]
    at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:200) ~[scala-library-2.9.1-1.jar:na]
    at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:200) ~[scala-library-2.9.1-1.jar:na]
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59) ~[scala-library-2.9.1-1.jar:na]
    at scala.collection.immutable.List.foreach(List.scala:45) ~[scala-library-2.9.1-1.jar:na]
    at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:200) ~[scala-library-2.9.1-1.jar:na]
    at scala.collection.immutable.List.flatMap(List.scala:45) ~[scala-library-2.9.1-1.jar:na]
    at org.neo4j.cypher.internal.pipes.ExecuteUpdateCommandsPipe$$anonfun$org$neo4j$cypher$internal$pipes$ExecuteUpdateCommandsPipe$$executeMutationCommands$1.apply(ExecuteUpdateCommandsPipe.scala:43) ~[neo4j-cypher-1.8.jar:1.8]
    at org.neo4j.cypher.internal.pipes.ExecuteUpdateCommandsPipe$$anonfun$org$neo4j$cypher$internal$pipes$ExecuteUpdateCommandsPipe$$executeMutationCommands$1.apply(ExecuteUpdateCommandsPipe.scala:43) ~[neo4j-cypher-1.8.jar:1.8]
    at scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:111) ~[scala-library-2.9.1-1.jar:na]
    at scala.collection.immutable.List.foldLeft(List.scala:45) ~[scala-library-2.9.1-1.jar:na]
    at org.neo4j.cypher.internal.pipes.ExecuteUpdateCommandsPipe.org$neo4j$cypher$internal$pipes$ExecuteUpdateCommandsPipe$$executeMutationCommands(ExecuteUpdateCommandsPipe.scala:43) ~[neo4j-cypher-1.8.jar:1.8]
    at org.neo4j.cypher.internal.pipes.ExecuteUpdateCommandsPipe$$anonfun$createResults$1.apply(ExecuteUpdateCommandsPipe.scala:35) ~[neo4j-cypher-1.8.jar:1.8]
    at org.neo4j.cypher.internal.pipes.ExecuteUpdateCommandsPipe$$anonfun$createResults$1.apply(ExecuteUpdateCommandsPipe.scala:34) ~[neo4j-cypher-1.8.jar:1.8]
    at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:200) ~[scala-library-2.9.1-1.jar:na]
    at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:200) ~[scala-library-2.9.1-1.jar:na]
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59) ~[scala-library-2.9.1-1.jar:na]
    at scala.collection.immutable.List.foreach(List.scala:45) ~[scala-library-2.9.1-1.jar:na]
    at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:200) ~[scala-library-2.9.1-1.jar:na]
    at scala.collection.immutable.List.flatMap(List.scala:45) ~[scala-library-2.9.1-1.jar:na]
    at org.neo4j.cypher.internal.pipes.ExecuteUpdateCommandsPipe.createResults(ExecuteUpdateCommandsPipe.scala:34) ~[neo4j-cypher-1.8.jar:1.8]
    at org.neo4j.cypher.internal.pipes.EmptyResultPipe.createResults(EmptyResultPipe.scala:28) ~[neo4j-cypher-1.8.jar:1.8]
    at org.neo4j.cypher.internal.pipes.EmptyResultPipe.createResults(EmptyResultPipe.scala:24) ~[neo4j-cypher-1.8.jar:1.8]
    at org.neo4j.cypher.internal.pipes.CommitPipe.createResults(CommitPipe.scala:36) ~[neo4j-cypher-1.8.jar:1.8]
    at org.neo4j.cypher.internal.executionplan.ExecutionPlanImpl$$anonfun$5$$anonfun$apply$3.apply(ExecutionPlanImpl.scala:104) ~[neo4j-cypher-1.8.jar:1.8]
    at org.neo4j.cypher.internal.executionplan.ExecutionPlanImpl$$anonfun$5$$anonfun$apply$3.apply(ExecutionPlanImpl.scala:104) ~[neo4j-cypher-1.8.jar:1.8]
    at org.neo4j.cypher.PipeExecutionResult.immutableResult(PipeExecutionResult.scala:37) ~[neo4j-cypher-1.8.jar:1.8]
    at org.neo4j.cypher.EagerPipeExecutionResult.<init>(EagerPipeExecutionResult.scala:44) ~[neo4j-cypher-1.8.jar:1.8]
    at org.neo4j.cypher.internal.executionplan.ExecutionPlanImpl$$anonfun$5.apply(ExecutionPlanImpl.scala:104) ~[neo4j-cypher-1.8.jar:1.8]
    at org.neo4j.cypher.internal.executionplan.ExecutionPlanImpl$$anonfun$5.apply(ExecutionPlanImpl.scala:102) ~[neo4j-cypher-1.8.jar:1.8]
    at org.neo4j.cypher.internal.executionplan.ExecutionPlanImpl.execute(ExecutionPlanImpl.scala:34) ~[neo4j-cypher-1.8.jar:1.8]
    at org.neo4j.cypher.ExecutionEngine.execute(ExecutionEngine.scala:55) ~[neo4j-cypher-1.8.jar:1.8]
    at org.neo4j.cypher.ExecutionEngine.execute(ExecutionEngine.scala:58) ~[neo4j-cypher-1.8.jar:1.8]
    at org.neo4j.cypher.javacompat.ExecutionEngine.execute(ExecutionEngine.java:86) ~[neo4j-cypher-1.8.jar:1.8]


Thanks
Luanne

Peter Neubauer

unread,
Oct 17, 2012, 4:45:57 AM10/17/12
to ne...@googlegroups.com
Luanne,
is there any chance you can reproduce this using
console.neo4j.org/usage.html ? Then we could have an issue on this.

Cheers,

/peter neubauer

G: neubauer.peter
S: peter.neubauer
P: +46 704 106975
L: http://www.linkedin.com/in/neubauer
T: @peterneubauer

Neo4j 1.8 GA - http://www.dzone.com/links/neo4j_18_release_fluent_graph_literacy.html
> --
>
>

Luanne Coutinho

unread,
Oct 17, 2012, 6:46:47 AM10/17/12
to ne...@googlegroups.com
No, I can't from the console- this is generated using a large batch of data, so I am not sure what the state of the data was to cause this.
Was hoping for some pointers into what the cause could be so I can create some data accordingly.

--



Peter Neubauer

unread,
Oct 17, 2012, 8:02:25 AM10/17/12
to ne...@googlegroups.com
Mmh,
is this happening at the same point every time? I am thinking that
this could be happening as part of a transaction deleting nodes that
then are needed by another query. Are you accessing the database from
multiple threads?

Cheers,

/peter neubauer

G: neubauer.peter
S: peter.neubauer
P: +46 704 106975
L: http://www.linkedin.com/in/neubauer
T: @peterneubauer

Neo4j 1.8 GA - http://www.dzone.com/links/neo4j_18_release_fluent_graph_literacy.html


> --
>
>

Luanne Coutinho

unread,
Oct 20, 2012, 4:03:45 AM10/20/12
to ne...@googlegroups.com
No Peter, it appears randomly. I am using a single thread. Will keep an eye out for this and let you know when it happens again.

Thanks
Luanne

--



Peter Neubauer

unread,
Oct 20, 2012, 11:42:08 AM10/20/12
to ne...@googlegroups.com
Great,
Thanks Luanne!
--



--
 
 


--

brian

unread,
Oct 20, 2012, 1:09:06 PM10/20/12
to ne...@googlegroups.com
This may or may not be hijacking this thread.  If so, we can take it up in a separate thread.  But since I also see the error Luanne describes (using a different query), I thought I'd chime in.

I am also seeing this frequently in some tests I've been running that issue queries intended to delete nodes and their links from multiple threads using the REST API.  The test is specifically designed to force deadlock exceptions by concurrently deleting nodes that share relationships. I also see the Relationship[x] not found exception during these tests. In addition I see the  "RelationshipRecord[x] not in use" error, which is even more serious since that error will be returned for any future query that would access that relationship and can be cleared only by restarting the database.

I have been discussing this issue with Johan Svensson as well and I have a test driver running under Node.js that I can give to you if that would help.

Thanks.

-brian


On Saturday, October 20, 2012 11:42:11 AM UTC-4, Peter Neubauer wrote:
Great,
Thanks Luanne!

On Saturday, October 20, 2012, Luanne Coutinho wrote:
No Peter, it appears randomly. I am using a single thread. Will keep an eye out for this and let you know when it happens again.

Thanks
Luanne

Peter Neubauer

unread,
Oct 20, 2012, 5:41:16 PM10/20/12
to ne...@googlegroups.com
Brian,
yes, please give us the info to reproduce it. You can send it to me, I
can run it when I get some minutes over. And Johan is not far away
from my working couch :)

Cheers,

/peter neubauer

G: neubauer.peter
S: peter.neubauer
P: +46 704 106975
L: http://www.linkedin.com/in/neubauer
T: @peterneubauer

Neo4j 1.8 GA - http://www.dzone.com/links/neo4j_18_release_fluent_graph_literacy.html


> --
>
>

brian

unread,
Oct 21, 2012, 10:06:47 AM10/21/12
to ne...@googlegroups.com
OK.  I'll send it along.  It might not be until Monday though ;-)

-b

Mattias Persson

unread,
Mar 11, 2013, 2:53:25 AM3/11/13
to Neo4j Development
FYI the problem where seeing this exception and have it stick throughout the lifecycle of the database for a certain node, is fixed as of a couple of weeks ago.

Getting this exception tmporarily while concurrently deleting relationships can still be seen like this though.


2012/10/21 brian <blevi...@gmail.com>
--
 
 



--
Mattias Persson, [mat...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com

Eric Fulton

unread,
May 27, 2016, 7:40:31 PM5/27/16
to Neo4j, mat...@neotechnology.com
Was this problem ever resolved?  I still see it consistently.  I'm running neo4j 2.3.3, ogm version 1.1.4, and using neo4j template from spring-data-neo4j 4.0.0.RELEASE.

Michael Hunger

unread,
May 27, 2016, 11:23:44 PM5/27/16
to ne...@googlegroups.com, Mattias Persson
Can you upgrade to a more recent version?

> Am 28.05.2016 um 01:40 schrieb Eric Fulton <efu...@blueorigin.com>:
>
> Was this problem ever resolved? I still see it consistently. I'm running neo4j 2.3.3, ogm version 1.1.4, and using neo4j template from spring-data-neo4j 4.0.0.RELEASE.
>
> --
> You received this message because you are subscribed to the Google Groups "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Eric Fulton

unread,
May 31, 2016, 12:41:05 PM5/31/16
to Neo4j, mat...@neotechnology.com
Which of those dependencies should I upgrade?  You mean neo4j?

Thanks!
Eric

Michael Hunger

unread,
May 31, 2016, 8:06:52 PM5/31/16
to ne...@googlegroups.com, Mattias Persson
SDN 4.1.1 with OGM 2.0.2

Eric Fulton

unread,
Jun 1, 2016, 12:42:31 PM6/1/16
to Neo4j, mat...@neotechnology.com
I spent yesterday updating those dependencies, but I'm still getting the same exception.  Only now, it's been masked:

Caused by: org.neo4j.ogm.exception.CypherException: Error executing Cypher "Neo.DatabaseError.Statement.ExecutionFailure"
       at org.neo4j.ogm.drivers.http.response.AbstractHttpResponse.initialise(AbstractHttpResponse.java:83)
       at org.neo4j.ogm.drivers.http.response.AbstractHttpResponse.<init>(AbstractHttpResponse.java:74)
       at org.neo4j.ogm.drivers.http.response.GraphModelResponse.<init>(GraphModelResponse.java:31)
       at org.neo4j.ogm.drivers.http.request.HttpRequest.execute(HttpRequest.java:90)
       at org.neo4j.ogm.session.delegates.LoadOneDelegate.load(LoadOneDelegate.java:47)
       at org.neo4j.ogm.session.Neo4jSession.load(Neo4jSession.java:82)
       at org.springframework.data.neo4j.template.Neo4jTemplate.load(Neo4jTemplate.java:82)
       at sun.reflect.GeneratedMethodAccessor203.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:498)
       at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
       at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
       at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
       at com.sun.proxy.$Proxy85.load(Unknown Source)
...

If I dig in with a debugger, it's actually just the same exception. 

Eric Fulton

unread,
Jun 2, 2016, 1:18:54 PM6/2/16
to Neo4j, mat...@neotechnology.com
Reply all
Reply to author
Forward
0 new messages