I've got a sample project which uses Spring Data Neo4j's advanced mapping using aspectj. It's failing in a test with NullPointerException due to the entityState attribute being null at the time when the entity is being persisted.
I can also replicate this when the server itself is spun up and I execute:
curl -i -X POST -H "Content-Type:application/json" -d '{ "firstName" : "Test", "lastName" : "Person" }' http://localhost:8080/people
The project is at https://github.com/dhallam/spring-data-neo4j-demo and the Travis build with the logs is at https://travis-ci.org/dhallam/spring-data-neo4j-demo/builds/22538972.
I'm not sure whether I'm missing something or there is a bug that would require me to raise a JIRA issue.
Any ideas? Many thanks in advance.
Edit 1:
Versions: Java v1.7; SDNeo4j v3.1.0.M1; SDRest v2.1.0.M1; Neo4j v2.0.1; Jetty v9.0.5.v20130815; AspectJ v1.7.4
Tried adding @JsonIgnoreProperties to the Person (@NodeEntity)from Michael's comment below and it's still failing. The bit of code that is failing is when I run:
Person p = new Person();
// setters ...
p.persist();
The persist()
calls
public <T extends NodeBacked> T NodeBacked.persist() {
return (T)this.entityState.persist();
}
but entityState
is null.