Can you paste the error here? I mean the whole stack trace?
 
 

Sent: Friday, December 08, 2017 at 6:38 AM
From: "Chan Simmer" <[email protected]>
To: [email protected]
Subject: fuseki-server tdb prefix null pointer exception.

Hi,
I want to host fuseki-server for SPARQL query. I encountered 
NullPointerException when integrating inference with tdb (It's normal without 
inference). The process of tdb loading is Ok. When I start the fuseki server, 
it will throw the graph name null pointer exception and it seems the tdb goes 
wrong. I have no idea how to fix it. Have you ever encountered such problem or 
any suggestion on this problem? THX!
 
It seems it has nothing to do with fuseki version and OS. I have tested on 
fuseki-3.4.0 and fuseki-3.5.0 on win 10 as well as ubuntu.
 
By the way, the RDF (in N-Triples format) file loaded into TDB is dumped by 
dump-rdf tool of d2rq latest version 0.8.1
 
Configuration as below:
 
@PreFix[https://github.com/prefix] : <#> .
@PreFix[https://github.com/prefix] fuseki: 
http://jena.apache.org/fuseki#[http://jena.apache.org/fuseki#] .
@PreFix[https://github.com/prefix] rdf: 
http://www.w3.org/1999/02/22-rdf-syntax-ns#[http://www.w3.org/1999/02/22-rdf-syntax-ns#]
 .
@PreFix[https://github.com/prefix] rdfs: 
http://www.w3.org/2000/01/rdf-schema#[http://www.w3.org/2000/01/rdf-schema#] .
@PreFix[https://github.com/prefix] tdb: 
http://jena.hpl.hp.com/2008/tdb#[http://jena.hpl.hp.com/2008/tdb#] .
@PreFix[https://github.com/prefix] ja: 
http://jena.hpl.hp.com/2005/11/Assembler#[http://jena.hpl.hp.com/2005/11/Assembler#]
 .
[] rdf:type fuseki:Server .
[] ja:loadClass "org.apache.jena.tdb.TDB" .
tdb:DatasetTDB rdfs:subClassOf ja:RDFDataset .
tdb:GraphTDB rdfs:subClassOf ja:Model .
:service1 a fuseki:Service ;
fuseki:dataset :dataset ;
fuseki:name "chronicle_kg" ;
fuseki:serviceQuery "query" , "sparql" ;
fuseki:serviceReadGraphStore "get" ;
fuseki:serviceReadWriteGraphStore "data" ;
fuseki:serviceUpdate "update" ;
fuseki:serviceUpload "upload" .
:dataset rdf:type ja:RDFDataset ;
ja:defaultGraph
[ a ja:InfModel ;
ja:baseModel <#tdbGraph> ;
#Location of ontology file
ja:content [ja:externalContent 
<file:///D:/apache%20jena/apache-jena-fuseki-3.5.0/run/databases/chronicle_schema.ttl>
 ] ;
#Enable OWL based reasoner
ja:reasoner [ja:reasonerURL 
<http://jena.hpl.hp.com/2003/OWLFBRuleReasoner[http://jena.hpl.hp.com/2003/OWLFBRuleReasoner]>]
 ;
] ;
.
<#tdbGraph> rdf:type tdb:GraphTDB ;
tdb:dataset <#tdbDataset> .
<#tdbDataset> rdf:type tdb:DatasetTDB ;
tdb:location "D:/apache jena/tdb" .

If I don't use infmodel, I mean, with TDB dataset directly (fuseki:dataset 
<#tdbDataset>), it's completely ok. If not, error as follow will be thrown.
 
​
SimmerChan

Reply via email to