On Wed, Jul 6, 2011 at 7:55 AM, Igor Dovgiy <ivd.cu...@gmail.com> wrote:

> When trying to process POSTing to batch-path of something like...
>
> [{"id":1,
>  "method":"POST",
>  "to":"/node",
>  "body":{"user_properties":[]}
> }]
>
> ...server fails with...
>  "exception" : "java.lang.RuntimeException",
>  "stacktrace" : [
>
> "org.neo4j.server.rest.web.BatchOperationService.performJob(BatchOperationService.java:137)",
>
> "org.neo4j.server.rest.web.BatchOperationService.performBatchOperations(BatchOperationService.java:83)",
> "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
> "sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)",
> "sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)",
> "java.lang.reflect.Method.invoke(Unknown Source)" etc.
>
> A bug, or have I missed something in Neo4j docs?
>

This is actually expected behaviour. The server cannot use an empty array to
set a property, because it doesn't know what type of array it is (and the
database requires typed arrays).

It does uncover two issues though - one is that the error reporting in the
batch API does not relay the underlying errors very well at all, I'll fix
that.

The other is that I think the expected behavior here should change. Empty
arrays shouldn't be a special case, in my opinion, and it would be easy for
us to just default to an empty boolean array or something.

/jake


> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Jacob Hansson
Phone: +46 (0) 763503395
Twitter: @jakewins
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to