Posts

Showing posts with the label graphdb

Writing to Ontotext GraphDB using Jena

Writing to Ontotext GraphDB using Jena I am trying to use Jena to write to a local free standalone GraphDB (version 8.5.0) repository. What I have tried (1) Direct use from Jena I used this Jena 3.7.0 code snippet: String strInsert = "INSERT DATA {" + "<http://dbpedia.org/resource/Grace_Hopper> " + "<http://dbpedia.org/ontology/birthDate>" + " "1906-12-9"^^<http://www.w3.org/2001/XMLSchema#date> .}"; UpdateRequest updateRequest = UpdateFactory.create(strInsert); UpdateProcessor updateProcessor = UpdateExecutionFactory.createRemote(updateRequest, "http://localhost:7200/repositories/PersonData"); updateProcessor.execute(); which results in the following exception org.apache.jena.atlas.web.HttpException: 415 - at org.apache.jena.riot.web.HttpOp.exec(HttpOp.java:1091) at org.apache.jena.riot.web.HttpOp.execHttpPost(HttpOp.java:718) at org.apache.jena.riot.web.HttpOp.execHttpPost(HttpOp.java:501) ...