Reputation: 37
Im trying to send a big Sparql-Update String to GraphDB by using RDF4J. It works for small Sparql-Update Strings, but for a big String (ca. 8000 INSERT DATA-Statements) it fails with the HTTP-Exception
org.eclipse.rdf4j.repository.http.HTTPUpdateExecutionException: Unsupported MIME type: application/x-www-form-urlencoded
My RDF4J code looks like this:
HTTPRepository repository = new HTTPRepository("http://localhost:7200", "test");
repository.initialize();
try (RepositoryConnection conn = repository.getConnection()) {
conn.prepareUpdate(SPARLQString).execute();
}
I already tried to set the Header to "application/sparql-update" but i got the same exception.
Is this behavior intended? How do i work around / fix this issue?
Ive used Fuseki before and never had this Problem.
Upvotes: 1
Views: 402
Reputation: 1140
You could use the HTTPRepository(String repositoryURL) instead and it should work.
HTTPRepository repository = new HTTPRepository("http://localhost:7200/repositories/test");
For update operations the endpoint is /repositories/test/statements.
Upvotes: 1