Sparql 使用Fuseki 0.2.6和Pellet 2.3.1删除失败

Sparql 使用Fuseki 0.2.6和Pellet 2.3.1删除失败,sparql,fuseki,pellet,Sparql,Fuseki,Pellet,我被迫在Fuseki服务器中包含外部推理器小球。到目前为止,一切都很好,尽管我无法删除包含字符串或整数等文本的三元组。 我的设置:Fuseki 0.2.6配置了Pellet 2.3.1作为推理机。 最小示例配置: @prefix : <#> . @prefix fuseki: <http://jena.apache.org/fuseki#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-sy

我被迫在Fuseki服务器中包含外部推理器小球。到目前为止,一切都很好,尽管我无法删除包含字符串或整数等文本的三元组。 我的设置:Fuseki 0.2.6配置了Pellet 2.3.1作为推理机。
最小示例配置:

@prefix :        <#> .
@prefix fuseki:  <http://jena.apache.org/fuseki#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tdb:     <http://jena.hpl.hp.com/2008/tdb#> .
@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .

[] rdf:type fuseki:Server ;
   fuseki:services (
     <#mem>
   ) .  

## ---------------------------------------------------------------
## Updatable in-memory dataset.

<#mem> rdf:type fuseki:Service ;
    # URI of the dataset -- http://host:port/mem
    fuseki:name                        "mem" ; 
    fuseki:serviceQuery                "sparql" ;
    fuseki:serviceQuery                "query" ;
    fuseki:serviceUpdate               "update" ;
    fuseki:serviceUpload               "upload" ;
    fuseki:serviceReadWriteGraphStore  "data" ;     
    fuseki:serviceReadGraphStore       "get" ;
    fuseki:dataset                     <#emptyDataset> ;
    .

## In-memory, initially empty.
<#emptyDataset> rdf:type ja:RDFDataset ;
                ja:defaultGraph       <#model_inf1> ;
 .

<#model_inf1> rdfs:label "Inf-model" ;
 ja:reasoner
 [ ja:reasonerClass 
 "org.mindswap.pellet.jena.PelletReasonerFactory";]
 . 
查询与“Alfred”链接的所有三元组显示,插入成功:

PREFIX test: <http://www.semanticweb.org/ontologies/2014/9/test.owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

Select *
Where{test:Alfred ?p ?o}

--------------------------------------------------------------------------------------------
| p                                      | o                                               |
============================================================================================
| rdfs:type                              | test:human                                      |
| rdfs:type                              | <http://www.w3.org/2002/07/owl#Thing>           |
| <http://www.w3.org/2002/07/owl#sameAs> | test:Alfred                                     |
| test:hasAge                            | 43                                              |
| test:hasName                           | "Alfred"^^xsd:string                            |
| rdfs:type                              | <http://www.w3.org/2002/07/owl#NamedIndividual> |
-------------------------------------------------------------------------------------------
但无论我尝试哪种删除模式,文字都无法删除。我检查了SPARQL更新语法,没有出现错误。不包含任何文字的三元组可以毫无问题地插入和删除。我认为pellet插件可能会引发这种行为,因为所有删除操作都使用fuseki服务器的默认jena推理器。升级到Fuseki 1.1.1不是一个选项,因为这似乎会导致兼容性/可见性问题,显示错误:

Error 500: tried to access field com.hp.hpl.jena.reasoner.BaseInfGraph.isPrepared from class org.mindswap.pellet.jena.PelletInfGraph
Fuseki - version 1.1.1 (Build date: 2014-10-02T16:36:17+0100)

我还用TDB数据库尝试了这一点,最终得到了相同的结果,即我无法删除任何带有文本的三元组。有人能复制这种行为吗?有人知道解决方案或变通方法吗?我错过什么了吗?如有任何提示,我将不胜感激。感谢您的支持和努力-Michael

错误看起来像是您使用的Pellet版本是Expected和Jena的旧版本,反之亦然。有东西试图访问
isPrepared
字段,但它不在那里。我不认为这本质上与文字有太多关系,尽管您提到它适用于没有文字的三元组,但是使用文字所做的事情会触发尝试刷新模型的代码的某些部分或其他内容。如果您搜索特定的错误消息(如果没有错误500,这是HTTP错误,我认为这只是因为底层错误正在被包装),有一些可能会有所帮助。例如,提到“从Jena 2.10.1开始(从GIT上的这一变化中可以看出)此iPrepared的可见性已从受保护降低为私有。好消息是,您可以继续使用2.10.0,在该版本中,可见性很好。”您可能会考虑使用StAlFor,它有耶拿绑定,如果您喜欢该API并包含最新版本的Pulter。谢谢您的回复。我不担心错误500。FuiKi1.1.1似乎不兼容Pult2.3.1造成错误。因此,我使用FusiKi 0.2.6,尽管删除TR,但它工作得很好。包含文字的iples。因此,错误500并不真正困扰我,因为它适用于较旧的fuseki版本。有人可以用fuseki 0.2.6和pellet 2.3.1复制我的配置(见上文)中的错误,或者有任何建议来克服我描述的配置中的此问题吗?非常感谢您的帮助
PREFIX test: <http://www.semanticweb.org/ontologies/2014/9/test.owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

Select *
Where{test:Alfred ?p ?o}

--------------------------------------------------------------------------------------------
| p                                      | o                                               |
============================================================================================
| rdfs:type                              | test:human                                      |
| rdfs:type                              | <http://www.w3.org/2002/07/owl#Thing>           |
| <http://www.w3.org/2002/07/owl#sameAs> | test:Alfred                                     |
| test:hasAge                            | 43                                              |
| test:hasName                           | "Alfred"^^xsd:string                            |
| rdfs:type                              | <http://www.w3.org/2002/07/owl#NamedIndividual> |
-------------------------------------------------------------------------------------------
delete data {test:Alfred test:hasAge "43"^^xsd:integer}
delete data {test:Alfred test:hasName "Alfred"^^xsd:string}
Error 500: tried to access field com.hp.hpl.jena.reasoner.BaseInfGraph.isPrepared from class org.mindswap.pellet.jena.PelletInfGraph
Fuseki - version 1.1.1 (Build date: 2014-10-02T16:36:17+0100)