Fabio Ricci
Fabio Ricci

Reputation: 99

LOADING RDF with TDBLOADER on OSX YOSEMITE BLOCKS without any message

First of all a happy new year 2015 to everybody!

I am a newbye in Jena and the first thing I do taking an RDF processing tool is loading some data into some separate graphs to test later SPARQL access on them.

My env is YOSEMITE with Java 1.8 (JDK 1.8)

I would like to load an RDF data set - here in the file named "pp_project_semweb.rdf" into a graph named http://semweb.ch/SEMWEB using the following command line:

tdbloader --tdb=jenatest.ttl --verbose

And the following Assembler file:

@prefix dc:      <http://purl.org/dc/elements/1.1/> .
@prefix tdb:     <http://jena.hpl.hp.com/2008/tdb#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .

[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
tdb:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .
tdb:GraphTDB    rdfs:subClassOf  ja:Model      .

<#dataset> rdf:type tdb:DatasetTDB ;
    tdb:location "DB" ;
    ja:namedGraph
        [ ja:graphName      <http://semweb.ch/SEMWEB> ;
          ja:graph          <#graph_semweb> ] ;
  .
<#graph_semweb> a ja:MemoryModel ;
      ja:content [ja:externalContent <file:/Users/fabio/Documents/workspace/JenaPrototype/Assembling/JenaRDFData/thesauri/pp_project_semweb.rdf>] ;
    .

What the loader says is the following:

Java maximum memory: 954728448
symbol:http://jena.hpl.hp.com/ARQ#constantBNodeLabels = true
symbol:http://jena.hpl.hp.com/ARQ#regexImpl = symbol:http://jena.hpl.hp.com/ARQ#javaRegex
symbol:http://jena.hpl.hp.com/ARQ#stageGenerator = com.hp.hpl.jena.tdb.solver.StageGeneratorDirectTDB@313ac989
symbol:http://jena.hpl.hp.com/ARQ#strictSPARQL = false
symbol:http://jena.hpl.hp.com/ARQ#enablePropertyFunctions = true
13:41:53 INFO  loader               :: -- Start triples data phase
13:41:53 INFO  loader               :: ** Load empty triples table
13:41:53 INFO  loader               :: -- Start quads data phase
13:41:53 INFO  loader               :: ** Load empty quads table
13:41:53 INFO  loader               :: Load: - -- 2015/01/02 13:41:53 CET

Then the tdbloader BLOCKS ... it comsumes no CPU and you can wait forever...

Does anybody know what is here wrong?

Could anyone please tell me ho I can debug or look at some logfiles on that?

Thank you very much in advance!!!

Kind regards

Upvotes: 1

Views: 162

Answers (1)

user205512
user205512

Reputation: 8888

There's nothing wrong, you just haven't explicitly provided anything to load. In this situation tdbloader will take triples from <STDIN>, until it reached EOF. Try typing ctrl-d which signals end-of-transmission to exit.

Given what you're trying to do all you need is:

$ tdbloader2 --loc DB /Users/fabio/Documents/workspace/JenaPrototype/Assembling/JenaRDFData/thesauri/pp_project_semweb.rdf

(tdbloader2 is a faster variant of the same tool, DB is the directory holding the rdf database)

Then you can query with:

$ tdbquery --loc DB --query my_query_file.rq

Upvotes: 2

Related Questions