On 17/05/15 13:06, rasha fawzy wrote:
Hello,

i tried to load a file using jena tdb and to reason this file by pellet
  but i get this exception.

Exception in thread "main" org.apache.jena.riot.RiotException: [line: 5,
col: 1 ] Broken IRI (newline): !DOCTYPE rdf:RDF [

You are reading and XML; maybe RDF/XML or not.


at org.apache.jena.riot.system.ErrorHandlerFactory$ErrorHandlerStd.fatal(
ErrorHandlerFactory.java:132)

at org.apache.jena.riot.lang.LangEngine.raiseException(LangEngine.java:169
)

at org.apache.jena.riot.lang.LangEngine.nextToken(LangEngine.java:116)

at org.apache.jena.riot.lang.LangNQuads.parseOne(LangNQuads.java:63)

Your are using the N-Quads parser because ...


at org.apache.jena.riot.lang.LangNQuads.runParser(LangNQuads.java:54)

at org.apache.jena.riot.lang.LangBase.parse(LangBase.java:42)

at org.apache.jena.riot.RiotReader.parse(RiotReader.java:116)

at com.hp.hpl.jena.tdb.store.bulkloader.BulkLoader.loadQuads$(
BulkLoader.java:170)

at com.hp.hpl.jena.tdb.store.bulkloader.BulkLoader.loadDataset(
BulkLoader.java:128)

at com.hp.hpl.jena.tdb.TDBLoader.loadDataset$(TDBLoader.java:290)

at com.hp.hpl.jena.tdb.TDBLoader.loadDataset(TDBLoader.java:204)

at com.hp.hpl.jena.tdb.TDBLoader.load(TDBLoader.java:87)

(not sure what version fo the code you are running)
the javadoc of operations aroudn taht location in the file say:

/** Load the contents of URL into a dataset.  Input is NQUADS.




at org.apache.jena.examples.ExampleTDB_02.main(ExampleTDB_02.java:53)

Use RDFDataMgr to load your file.

Unless your file is extremely large, the bulk loader is going to do nothing much for you.

And if it is extremely large, convert to N-Triples first to check the data is valid and load the N-triples.

        Andy


cheers,

Rasha



Reply via email to