2
votes

I have an issue where a constraint exception is thrown on a deleted node.

The cypher statement "match (n) where ID(n)=272 return ID(n),n" returns 0 rows, but when I try to create a new record that previously had a constrained value, the exception below) is still throw.

FYI, the constraint is on a property containing a String[] - maybe constraint uniqueness is broken with arrays?

Working with NEO4J 2.0.0M06 using the Java API (OpenJDK 7) on Ubuntu 12.04 via the nodejs/java npm (v sweet combo:) )

Temporary workaround: drop the constraint and re-create it (all worked from then on).

Is there a tool/schema command to force Neo to check integrity?

Caused by: org.neo4j.kernel.impl.api.constraints.UniqueConstraintViolationKernelException: Node 272 already exists with label 1 and property 4=[Ljava.lang.String;@3e4cf524
    at org.neo4j.kernel.api.operations.ConstraintEnforcingEntityOperations.validateNoExistingNodeWithLabelAndProperty(ConstraintEnforcingEntityOperations.java:105)
    at org.neo4j.kernel.api.operations.ConstraintEnforcingEntityOperations.nodeSetProperty(ConstraintEnforcingEntityOperations.java:85)
    at org.neo4j.kernel.impl.api.LockingStatementOperations.nodeSetProperty(LockingStatementOperations.java:234)
    at org.neo4j.kernel.api.OperationsFacade.nodeSetProperty(OperationsFacade.java:462)
    at org.neo4j.kernel.impl.core.NodeProxy.setProperty(NodeProxy.java:214)
    ... 5 more
Drop constraint, recreate the node, apply constraint again worked for me.Krishna Shetty
@user2953132 a blog post about your Java/Node/NPM setup with Neo4j would be supernice!Peter Neubauer
Is this possibly related to: github.com/neo4j/neo4j/issues/1069LameCoder
@PeterNeubauer - happy to write a blog post (need to find some time to clean up my code and post it somewhere). What's the best way of getting it to you?MattAtBread