Batch Loading of Semantic Data
758212Mar 5 2010 — edited Mar 15 2010I am trying to load an N3 file into an Oracle 11g instance. Basically it's the same data that is in the family example (here: http://tinyurl.com/yl9zqtl) that I put into an N3 file. I'm executing a command like below (according to: http://tinyurl.com/yjp4olv)
java -Ddb.user=<dbuser> -Ddb.password=<pass> -Ddb.host=127.0.0.1 -Ddb.port=11521 -Ddb.sid=oracle -cp sdordf.jar:ojdbc6.jar oracle.spatial.rdf.client.BatchLoader family.n3 family_rdf_data rdf_tablespace fam
The "family.n3" file looks like:
@prefix fam: <http://www.example.org/family.rdf#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
fam:John rdf:type fam:Male;
fam:fatherOf fam:Suzie;
fam:fatherOf fam:Matt.
fam:Janice fam:motherOf fam:Suzie;
fam:motherOf fam:Matt.
fam:Sammy fam:fatherOf fam:Cathy;
fam:fatherOf fam:Jack.
...etc
I then get an error message from the BatchLoader program:
Batch loading started...
Subject: @prefix
Property: rdf:
Object: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
Loading up to rows = 2
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1937)
at oracle.spatial.rdf.client.NTripleTokenizer.parse(NTripleTokenizer.java:71)
at oracle.spatial.rdf.client.NTripleConverter.loadNTriple(NTripleConverter.java:534)
at oracle.spatial.rdf.client.BatchLoader.main(BatchLoader.java:302)
It errors on the first line if I remove the second line above. Am I doing something wrong? I pasted the N3 file into an N3 validator (found here: http://www.rdfabout.com/demo/validator/) and it validates, so the N3 file at least looks like it is working fine.
Thanks,
Ryan