405此方法不支持HTTP方法PUT

时间:2016-04-21 10:49:54

标签: jena owl ontology fuseki apache-jena

我使用此配置启动了Fuseki服务器:

@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#> .
@prefix sdb: <http://jena.hpl.hp.com/2007/sdb#> .

[] rdf:type fuseki:Server ;

   fuseki:services (
     <#memory>
     <#tdb>
     #<#mysql>
   ) .

# Custom code.
[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
#[] ja:loadClass "com.hp.hpl.jena.sdb.SDB" .


########################################################################
#In Memory    

<#memory>  rdf:type fuseki:Service ;
    fuseki:name              "memory" ;             # http://host/inf
    fuseki:serviceQuery      "sparql" ;          # SPARQL query service
    fuseki:serviceUpdate     "update" ;
    fuseki:dataset           <#dataset1> ;       #select which set to 
    .                                            #use

<#dataset1> rdf:type       ja:RDFDataset ;
    ja:defaultGraph       <#model_inf_1> ;
    .

<#model_inf_1> rdfs:label "Inf-1" ;
        ja:reasoner
         [ ja:reasonerURL 
           <http://jena.hpl.hp.com/2003/OWLFBRuleReasoner>];
    . 

########################################################################
# TDB
<#tdb>  rdf:type fuseki:Service ;
    fuseki:name              "tdb" ;             # http://host/inf
    fuseki:serviceQuery      "sparql" ;          # SPARQL query service
    fuseki:serviceUpdate     "update" ;
    fuseki:dataset           <#dataset2> ;       #select which set to 
    .                                            #use
tdb:GraphTDB    rdfs:subClassOf  ja:Model .

<#dataset2> rdf:type ja:RDFDataset ;
    ja:defaultGraph <#model2>; 
    .         

<#model2> a ja:InfModel;
    ja:baseModel <#tdbGraph>;
    ja:reasoner
         [ ja:reasonerURL 
           <http://jena.hpl.hp.com/2003/OWLFBRuleReasoner>];
    .
<#tdbGraph> rdf:type tdb:GraphTDB;
                     tdb:location "DB";
    .

然后我尝试按如下方式上传本体:

./s-put http://localhost:3030/tdb/data default /home/gosper/Desktop/tools/jena-fuseki1-1.3.1/Data/pizza.owl

它给了我以下错误:

405 HTTP method PUT is not supported by this URL http://localhost:3030/tdb/data?default

我也尝试了以下网址,但没有任何作用。:

http://localhost:3030/dataset/data
http://localhost:3030/dataset2/data

知道如何解决这个问题吗?

1 个答案:

答案 0 :(得分:1)

您没有名为数据的端点支持配置中定义的SPARQL图形存储协议。 尝试添加fromValue