Hmm strange. The default node types should be there. See /org/apache/jackrabbit/oak/plugins/nodetype/write/builtin_nodetypes.cnd Maybe there something wrong in how the http remoting is being set up? Michael On 25.1.13 15:16, Tommaso Teofili wrote: > I managed to go a little further by commenting out the new TypeValidatorProvider() in oak-run Main.HttpServer#createDefaultValidatorProvider (line 223) which prevented me to create anything just because no node type is registered. > Then with the following I could add some content: > http -f -v -a admin:admin http://localhost:8080/ < samplenode.json > where > samplenode.json is > {"test2" : > { > "jcr:primaryType" : "nt:unstructured", > "name" : "some other name" > } > } > > Maybe adding a small set of node types (the default ones nt:*) would help to prevent having to do this workaround. > Hope this helps, > Tommaso > > > On 25/gen/2013, at 12:51, Tommaso Teofili wrote: > >> Hi all, >> >> I'm trying to access an Oak repository over HTTP as explained at [1] so I assumed I had to use oak-run as explained at [2]. >> >> If I try with curl: >> curl -d foo=bar http://localhost:8080/test >> >> I get: >> >> >> >> Error 500 String index out of range: -1 >> >> >>

HTTP ERROR: 500

>>

Problem accessing /test. Reason: >>

    String index out of range: -1

>>
Powered by Jetty:// >> ... >> >> If I try with httpie: >> http -b http://localhost:8080/ test:={} >> >> I get: >> >> >> >> Error 500 Cannot add node 'test' at / >> >> >>

HTTP ERROR: 500

>>

Problem accessing /. Reason: >>

    Cannot add node 'test' at /

>>
Powered by Jetty:// >> >> or trying: >> http POST http://localhost:8080/node name=John >> >> I get: >> >> >> >> Error 500 String index out of range: -1 >> >> >>

HTTP ERROR: 500

>>

Problem accessing /node. Reason: >>

    String index out of range: -1

>>
Powered by Jetty:// >> >> So neither using httpie nor using curl I can create a node, is the wiki outdated or am I missing something? >> >> The StringIndexOutOfRange seems to be due to the missing final slash on the sent URL (http://localhost:8080/test) so I wonder if that's a bug. >> >> Thanks in advance, >> Tommaso >> >> [1] : http://wiki.apache.org/jackrabbit/Oak-over-HTTP >> [2] : http://markmail.org/message/vq52qfhpdyqr2ojv >