Closed jar398 closed 10 years ago
It's because you're missing the -H "content-type:application/json" argument to curl. A very annoying error, I agree. Not one I think we have much ability to affect from within the neo4j plugin extensions though.
On Thu, Aug 28, 2014 at 3:20 PM, Jonathan A Rees notifications@github.com wrote:
There aren't even any numbers in the request.
curl -X POST http://api.opentreeoflife.org/oti/v1/singlePropertySearchForStudies -d '{"property": "ot:studyId", "value" : "pg_1707"}' { "message" : "1", "exception" : "ArrayIndexOutOfBoundsException", "fullname" : "java.lang.ArrayIndexOutOfBoundsException", "stacktrace" : [ "org.neo4j.server.rest.repr.formats.UrlFormFormat.readMap(UrlFormFormat.java:99)", "org.neo4j.server.rest.repr.RepresentationFormat.readParameterList(RepresentationFormat.java:97)", "org.neo4j.server.rest.web.ExtensionService.invokeGraphDatabaseExtension(ExtensionService.java:122)", "java.lang.reflect.Method.invoke(Method.java:606)", "org.neo4j.server.rest.security.SecurityFilter.doFilter(SecurityFilter.java:112)" ]
— Reply to this email directly or view it on GitHub https://github.com/OpenTreeOfLife/oti/issues/25.
You'll also need to use devapi, as the production server seems to still be using an oti version with bug that Jim tracked down a few weeks ago. This should work:
curl -X POST http://devapi.opentreeoflife.org/oti/v1/singlePropertySearchForStudies -H "content-type:application/json" -d '{"property": "ot:studyId", "value" : "pg_1707"}'
On Thu, Aug 28, 2014 at 3:45 PM, Cody Hinchliff cody.hinchliff@gmail.com wrote:
It's because you're missing the -H "content-type:application/json" argument to curl. A very annoying error, I agree. Not one I think we have much ability to affect from within the neo4j plugin extensions though.
On Thu, Aug 28, 2014 at 3:20 PM, Jonathan A Rees <notifications@github.com
wrote:
There aren't even any numbers in the request.
curl -X POST http://api.opentreeoflife.org/oti/v1/singlePropertySearchForStudies -d '{"property": "ot:studyId", "value" : "pg_1707"}' { "message" : "1", "exception" : "ArrayIndexOutOfBoundsException", "fullname" : "java.lang.ArrayIndexOutOfBoundsException", "stacktrace" : [ "org.neo4j.server.rest.repr.formats.UrlFormFormat.readMap(UrlFormFormat.java:99)", "org.neo4j.server.rest.repr.RepresentationFormat.readParameterList(RepresentationFormat.java:97)", "org.neo4j.server.rest.web.ExtensionService.invokeGraphDatabaseExtension(ExtensionService.java:122)", "java.lang.reflect.Method.invoke(Method.java:606)", "org.neo4j.server.rest.security.SecurityFilter.doFilter(SecurityFilter.java:112)" ]
— Reply to this email directly or view it on GitHub https://github.com/OpenTreeOfLife/oti/issues/25.
Thanks!
Yes, that's a hideous error from (iirc) neo4j. In this case, your call is missing the Content-Type header:
curl -X POST http://devapi.opentreeoflife.org/oti/v1/singlePropertySearchForStudies \
-d '{"property": "ot:studyId", "value" : "pg_1707"}' \
-H "Content-Type: application/json"
EDIT: I had reported another (underlying) error, but that was due to my test calling api.opentreeoflife.org. devapi should give a good result.
@jimallman, it's the same bug you tracked down before. The fix just hasn't been pushed to production yet.
On Thu, Aug 28, 2014 at 3:51 PM, Jim Allman notifications@github.com wrote:
Yes, that's a hideous error from (iirc) neo4j. In this case, your call is missing the Content-Type header:
curl -X POST http://api.opentreeoflife.org/oti/v1/singlePropertySearchForStudies \ -d '{"property": "ot:studyId", "value" : "pg_1707"}' \ -H "Content-Type: application/json"
This call now returns a more sensible error message, though I'm not sure why. (We had a similar problem with the indexing of ot:studyId properties, but this is now working in our tests for duplicate studies.)
— Reply to this email directly or view it on GitHub https://github.com/OpenTreeOfLife/oti/issues/25#issuecomment-53786266.
There aren't even any numbers in the request.
curl -X POST http://api.opentreeoflife.org/oti/v1/singlePropertySearchForStudies -d '{"property": "ot:studyId", "value" : "pg_1707"}' { "message" : "1", "exception" : "ArrayIndexOutOfBoundsException", "fullname" : "java.lang.ArrayIndexOutOfBoundsException", "stacktrace" : [ "org.neo4j.server.rest.repr.formats.UrlFormFormat.readMap(UrlFormFormat.java:99)", "org.neo4j.server.rest.repr.RepresentationFormat.readParameterList(RepresentationFormat.java:97)", "org.neo4j.server.rest.web.ExtensionService.invokeGraphDatabaseExtension(ExtensionService.java:122)", "java.lang.reflect.Method.invoke(Method.java:606)", "org.neo4j.server.rest.security.SecurityFilter.doFilter(SecurityFilter.java:112)" ]