Hi there,

Could someone please explain why I’m getting null pointer exceptions?

I’m using spring data neo4j and trying to marshal a node using 
createEntityFromStoredType.  In my tests it works, but in the production code 
it fails with a null pointer… not at all sure why - very confusing!

       def result = ee.execute(“match (b) return b)
       result.columnAs('b').collect { def n ->
           neo4jTemplate.createEntityFromStoredType(n, null)
       }

In my test code it returns a list of nodes correctly mapped, but in my 
production code I’m getting:

[Assertion failed] - this argument is required; it must not be null. Stacktrace 
follows:
Message: [Assertion failed] - this argument is required; it must not be null
   Line | Method
->>   30 | doCall                  in 
db.repositories.SearchGraphService$_getLocatedObjectsOfType_closure2
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|     23 | getLocatedObjectsOfType in 
db.repositories.SearchGraphService$$EP5V0ixU


Where the createEntityFromStoredType is on line 23.

The spring wiring in both cases looks identical, and so I presume that any 
mappers are auto wired correctly.


Been scratching my head for hours! Could really do with a hand! :)

Thanks,
Joe


-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to