Hi George, Could you provide the full stacktrace for the exception.
Regards, Johan On Wed, Dec 15, 2010 at 11:33 AM, George Ciubotaru <[email protected]> wrote: > Hi David, > > We've build our own REST service in front of Neo4j graph to interact with it > from a different environment. The operations are simple: > - create node (each node has a single property attach to it that define its > type) > > ... > Transaction tx = graphDb.beginTx(); > try > { > Node gNode = graphDb.createNode(); > gNode.setProperty(NodeTypeDefString, > vNodetype.convertToInt()); > nodeId = gNode.getId(); > > tx.success(); > } > ... > finally > { > tx.finish(); > } > ... > > - delete node (together with all its relationships): > > ... > Transaction tx = graphDb.beginTx(); > try > { > Node node = graphDb.getNodeById(nodeId); > deleteNodeRelationships(node); > node.removeProperty(NodeTypeDefString); > node.delete(); > > tx.success(); > } > ... > finally > { > tx.finish(); > } > ... > > - create relationships > > ... > Transaction tx = graphDb.beginTx(); > try > { > ... > leftSideNode.createRelationshipTo(rightSideNode, > relationshipType); > > tx.success(); > } > ... > finally > { > tx.finish(); > } > ... > > - delete relationships between 2 nodes (of certain type and direction) > > ... > Transaction tx = graphDb.beginTx(); > try > { > Iterable<Relationship> relations = > leftSideNode.getRelationships(relationshipType, direction); > > for (Relationship relation : relations) > { > Node checkNode = > relation.getOtherNode(leftSideNode); > if (checkNode.getId() == rightSideNode.getId()) > { > relation.delete(); > } > } > tx.success(); > } > ... > finally > { > tx.finish(); > } > ... > > I'm getting the InvalidRecordException when deleting a relationship in the > last case above (relation.delete()). > > Thanks, > George > > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On > Behalf Of David Montag > Sent: 15 December 2010 05:01 > To: Neo4j user discussions > Subject: Re: [Neo4j] InvalidRecordException exception > > Hi George, > > Could you please provide some background info on how you created/populated > your Neo4j graph? > > David > > On Tue, Dec 14, 2010 at 10:03 AM, George Ciubotaru < > [email protected]> wrote: > >> Hello guys, >> >> I'm getting "org.neo4j.kernel.impl.nioneo.store.InvalidRecordException: >> Record[558335] not in use" exception from time to time when deleting a >> relationship. I don't seem to find much information about this kind of >> exception. Any idea what it means? >> >> Thank you, >> George _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

