[Neo4j] [SDN] [REST] Random exception on findBy...() method (in repository)

14 views
Skip to first unread message

Marc de Verdelhan

unread,
May 3, 2012, 8:15:44 AM5/3/12
to ne...@googlegroups.com
Hi there,

I wrote a small project with Neo4j and SDN. It's a JSON web service.
When I run my unit tests everything works fine. But when I start Jetty then I call the REST entry points I get the following error:
java.lang.NullPointerException
at org.springframework.data.neo4j.support.conversion.EntityResultConverter.doConvert(EntityResultConverter.java:62)
at org.springframework.data.neo4j.conversion.DefaultConverter.convert(DefaultConverter.java:43)
at org.springframework.data.neo4j.support.conversion.EntityResultConverter.convert(EntityResultConverter.java:94)
at org.springframework.data.neo4j.conversion.QueryResultBuilder$1.convert(QueryResultBuilder.java:102)
at org.springframework.data.neo4j.conversion.QueryResultBuilder$1.singleOrNull(QueryResultBuilder.java:95)
...
Here is the full stack-trace: http://gist.github.com/2585139

Note: this NPE occurs randomly on the User user = userRepository.findByObjectId(userId); statement.

I shared a small project with this error here: http://www.verdelhan.eu/wiki/lib/exe/fetch.php?media=sdntest.zip
If you want to test:
1) Posting a user (works): curl -i -H "Content-type: application/json" -X POST -d '{"objectId":"u1"}' http://localhost:8080/users
2) Getting all users (works): curl -i -X GET http://localhost:8080/users
3) Getting the user "u1" (random exception/error 500 which doesn't occur on every call): curl -i -X GET http://localhost:8080/users/u1

This time it's pretty urgent. So thank you for your help.

Cheers,

Marc

Peter Neubauer

unread,
May 7, 2012, 4:57:00 AM5/7/12
to ne...@googlegroups.com
Marc,
is this resolved by Michaels latest snapshot builds?

Cheers,

/peter neubauer

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

If you can write, you can code - @coderdojomalmo
If you can sketch, you can use a graph database - @neo4j

Marc de Verdelhan

unread,
May 7, 2012, 5:21:48 AM5/7/12
to ne...@googlegroups.com
Peter,


And sorry for the duplicate.

Cheers,

Marc

Peter Neubauer

unread,
May 7, 2012, 5:22:34 AM5/7/12
to ne...@googlegroups.com
Cool,
just wanted to get that out of my inbox :)

Cheers,

/peter neubauer

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

If you can write, you can code - @coderdojomalmo
If you can sketch, you can use a graph database - @neo4j


On Mon, May 7, 2012 at 11:21 AM, Marc de Verdelhan
Reply all
Reply to author
Forward
0 new messages