"HttpException: 500 - Read-only block manager" 使用 Apache Jena 将数据加载到 Fuseki 时
"HttpException: 500 - Read-only block manager" when loading data using Apache Jena into Fuseki
我无法让 google 或 Whosebug 告诉我如何从 ttl 文件加载到我的 Fuseki 服务器中一个命名的 grapah。
我的Java函数是
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();
}
如果
图名=空;
然后
加载正常
如果
图名 = "图名";
那么
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(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)
什么是例外?
conn.load(graphname, ttlFileLocation);
环境详细信息包括:
Fuseki 版本 3.14.0
运行 里面 stain/jena-fuseki docker 图片
爪哇 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>
调用代码没问题
来自服务器并由客户端传递的 500 错误。
服务器日志文件将包含详细信息,但看起来服务器 运行 在 TDB 数据库的只读文件区域。
我无法让 google 或 Whosebug 告诉我如何从 ttl 文件加载到我的 Fuseki 服务器中一个命名的 grapah。
我的Java函数是
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();
}
如果 图名=空; 然后 加载正常
如果 图名 = "图名"; 那么
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(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)
什么是例外?
conn.load(graphname, ttlFileLocation);
环境详细信息包括: Fuseki 版本 3.14.0 运行 里面 stain/jena-fuseki docker 图片 爪哇 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>
调用代码没问题
来自服务器并由客户端传递的 500 错误。
服务器日志文件将包含详细信息,但看起来服务器 运行 在 TDB 数据库的只读文件区域。