jenafuseki

"HttpException: 500 - Read-only block manager" when loading data using Apache Jena into Fuseki


I cant get google or stackoverflow to tell me how to load into my Fuseki server a named grapah from a ttl file.

My Java function is

public static void uploadTtl(String ttlFileLocation, String graphname) {
    RDFConnection conn = RDFConnectionFactory.connect(serviceURL);
    if (graphname == null)
        conn.load(ttlFileLocation);
    else
        conn.load(graphname, ttlFileLocation);
    conn.close();
}

If graphname = null; Then loads fine

If graphname = "graphname"; Then

Exception in thread "main" org.apache.jena.atlas.web.HttpException: 500 - Read-only block manager
    at org.apache.jena.riot.web.HttpOp.exec(HttpOp.java:1093)
    at org.apache.jena.riot.web.HttpOp.execHttpPost(HttpOp.java:721)
    at org.apache.jena.riot.web.HttpOp.execHttpPost(HttpOp.java:665)
    at org.apache.jena.rdfconnection.RDFConnectionRemote.lambda$doPutPost$3(RDFConnectionRemote.java:320)
    at org.apache.jena.rdfconnection.RDFConnectionRemote.exec(RDFConnectionRemote.java:518)
    at org.apache.jena.rdfconnection.RDFConnectionRemote.doPutPost(RDFConnectionRemote.java:315)
    at org.apache.jena.rdfconnection.RDFConnectionRemote.upload(RDFConnectionRemote.java:297)
    at org.apache.jena.rdfconnection.RDFConnectionRemote.load(RDFConnectionRemote.java:240)
    at modelDTriplestore.MdFuseki_uploadFile.uploadTtl(MdFuseki_uploadFile.java:36)
    at modelDTriplestore.MdFuseki_uploadFile.main(MdFuseki_uploadFile.java:15)

What is giving exception from?

conn.load(graphname, ttlFileLocation);

Envionment details include: Fuseki Version 3.14.0 Running inside stain/jena-fuseki docker image Jave 8 POM

<dependency>
    <groupId>org.apache.jena</groupId>
    <artifactId>apache-jena-libs</artifactId>
    <type>pom</type>
    <version>3.17.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.jena/jena -->
<dependency>
    <groupId>org.apache.jena</groupId>
    <artifactId>jena-shaded-guava</artifactId>
    <version>3.17.0</version>
    <type>pom</type>
</dependency>

Solution

  • The calling code is fine.

    The 500 error coming from the server and passed on by the client.

    The server log file will have details but it looks like the server is running on an read-only file area for a TDB database.