我正在使用 RDF4J Virtuoso 适配器连接到在 VirtualBox CentOS 7.3 64 位中编译和安装的 Virtuoso 7.20.3216。
我尝试使用以下代码在 Virtuoso 中加载 Turtle 文件:
Repository r = new virtuoso.rdf4j.driver.VirtuosoRepository(url, login, password);
RepositoryConnection connection = r.openConnection();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
// Turtle data written inside baos
String graphUri = ... ;
connection.add(new ByteArrayInputStream(baos.toByteArray()), RDF.NAMESPACE, RDFFormat.TURTLE, SimpleValueFactory.getInstance().createIRI(graphUri));
Virtuoso 崩溃(停止)并显示以下日志:
12:10:01 box_serial_len called with dtp 225
12:10:01 /usr/local/virtuoso-opensource/bin/virtuoso-t() [0x8c6d3a]
12:10:01 /usr/local/virtuoso-opensource/bin/virtuoso-t() [0x8c6d98]
12:10:01 /usr/local/virtuoso-opensource/bin/virtuoso-t() [0x4fba85]
12:10:01 /usr/local/virtuoso-opensource/bin/virtuoso-t() [0x629664]
12:10:01 /usr/local/virtuoso-opensource/bin/virtuoso-t() [0x629997]
12:10:01 /usr/local/virtuoso-opensource/bin/virtuoso-t() [0x622485]
12:10:01 /usr/local/virtuoso-opensource/bin/virtuoso-t() [0x65233d]
12:10:01 /usr/local/virtuoso-opensource/bin/virtuoso-t() [0x6524dd]
12:10:01 /usr/local/virtuoso-opensource/bin/virtuoso-t() [0x592328]
12:10:01 /usr/local/virtuoso-opensource/bin/virtuoso-t() [0x59a807]
12:10:01 /usr/local/virtuoso-opensource/bin/virtuoso-t() [0x59760a]
12:10:01 /usr/local/virtuoso-opensource/bin/virtuoso-t() [0x5c0e30]
12:10:01 /usr/local/virtuoso-opensource/bin/virtuoso-t() [0x5ca63b]
12:10:01 /usr/local/virtuoso-opensource/bin/virtuoso-t() [0x59370c]
12:10:01 /usr/local/virtuoso-opensource/bin/virtuoso-t() [0x597d13]
12:10:01 /usr/local/virtuoso-opensource/bin/virtuoso-t() [0x5c0e30]
12:10:01 /usr/local/virtuoso-opensource/bin/virtuoso-t() [0x5cbeee]
12:10:01 /usr/local/virtuoso-opensource/bin/virtuoso-t() [0x5d3d36]
12:10:01 /usr/local/virtuoso-opensource/bin/virtuoso-t(sf_sql_execute_w+0x7b) [0x5d3edb]
12:10:01 /usr/local/virtuoso-opensource/bin/virtuoso-t() [0x8cb297]
12:10:01 /usr/local/virtuoso-opensource/bin/virtuoso-t() [0x8d1683]
12:10:01 /lib64/libpthread.so.0(+0x7e25) [0x7fe04db7ee25]
12:10:01 /lib64/libc.so.6(clone+0x6d) [0x7fe04d3a634d]
12:10:01 GPF: search.c:326 box_serial_length not supported for data type
当上传到指挥后台时,相同的 Turtle 字符串可以正常工作。这个文件很大,所以我不能在这里粘贴它。
我们已将问题缩小到字符编码问题。turtle 文件包含带有重音字符的文字,例如"Disque à gravure directe"@fr
.
我们没有设置任何字符编码参数,无论是在 Virtuoso 配置端,还是在 JDBC 连接端。我们尝试添加charset=UTF-8
JDBC 连接字符串,但没有成功。
似乎只有当数据库为空时才会出现问题。当数据库已经包含一些数据时,Virtuoso 不会崩溃。
任何想法
- 错误信息是什么意思?
- 问题的原因可能是什么?
- 如何解决或解决这个问题?
谢谢!