You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Loic R Julien <lj...@us.ibm.com> on 2012/02/21 21:49:39 UTC
TDB + Warning messages
I am using TDB 0.8.9 and Jena 2.6.4
1- I wonder if I initialize TDB correctly. I currently do a very
straightforward call to create my dataset. However, I do see a warning
when TDB initialize.
Code
TDBFactory.createDataset (Dir location);
Warning
WARN [Start Level Event Dispatcher] (SetupTDB.java:755) - No BGP
optimizer
2- I serialize some "internal" RDF models with relative URIs. As such, I
pass in a base URI of "" when reconstructing the corresponding Model
instance so that I can leave those untouched. I do end up, however, with
Warning messages. Is there a way to avoid printing out those warnings?
Code
this.model = ModelFactory.createDefaultModel();
RDFReader reader = this.model.getReader();
reader.read(this.model, new ByteArrayInputStream(rdf.getBytes()),
"");
Warning
WARN [1527929618@qtp-940521487-3]
(RDFDefaultErrorHandler.java:36) - file:///..-Data Removed-..(line 1
column 443): {W130} Base URI is "", relative URIs left as relative.: <
..-Data Removed-..>
I thank you for your help,
~Loic
Re: TDB + Warning messages
Posted by Milorad Tosic <mb...@yahoo.com>.
Hi,
I'm using the same versions of the libraries. I can not be sure what you are trying to do, but the following initialization procedure works for me:
File m_baseDir = new File(baseDirPath+File.separator+"tdb");
Model m = TDBFactory.createModel(m_baseDir.getPath());
Then, if I want to select a reasoner to work with, I do:
m_triplestore = ModelFactory.createInfModel(ReasonerRegistry.getOWLMiniReasoner(), m);
Regards,
Milorad
>________________________________
> From: Loic R Julien <lj...@us.ibm.com>
>To: jena-users@incubator.apache.org
>Sent: Tuesday, February 21, 2012 9:49 PM
>Subject: TDB + Warning messages
>
>I am using TDB 0.8.9 and Jena 2.6.4
>
>1- I wonder if I initialize TDB correctly. I currently do a very
>straightforward call to create my dataset. However, I do see a warning
>when TDB initialize.
>Code
> TDBFactory.createDataset (Dir location);
>Warning
> WARN [Start Level Event Dispatcher] (SetupTDB.java:755) - No BGP
>optimizer
>
>2- I serialize some "internal" RDF models with relative URIs. As such, I
>pass in a base URI of "" when reconstructing the corresponding Model
>instance so that I can leave those untouched. I do end up, however, with
>Warning messages. Is there a way to avoid printing out those warnings?
>Code
> this.model = ModelFactory.createDefaultModel();
> RDFReader reader = this.model.getReader();
> reader.read(this.model, new ByteArrayInputStream(rdf.getBytes()),
>"");
>
>Warning
> WARN [1527929618@qtp-940521487-3]
>(RDFDefaultErrorHandler.java:36) - file:///..-Data Removed-..(line 1
>column 443): {W130} Base URI is "", relative URIs left as relative.: <
>..-Data Removed-..>
>
>
>I thank you for your help,
>~Loic
>
>
Re: TDB + Warning messages
Posted by Andy Seaborne <an...@apache.org>.
On 21/02/12 20:49, Loic R Julien wrote:
> I am using TDB 0.8.9 and Jena 2.6.4
>
> 1- I wonder if I initialize TDB correctly. I currently do a very
> straightforward call to create my dataset. However, I do see a warning
> when TDB initialize.
> Code
> TDBFactory.createDataset (Dir location);
> Warning
> WARN [Start Level Event Dispatcher] (SetupTDB.java:755) - No BGP
> optimizer
Best is to put an optimizer file
http://incubator.apache.org/jena/documentation/tdb/optimizer.html
fixed.opt does an adequate job in many cases.
but you can call TDB.setOptimizerWarningFlag(false)
> 2- I serialize some "internal" RDF models with relative URIs. As such, I
> pass in a base URI of "" when reconstructing the corresponding Model
> instance so that I can leave those untouched. I do end up, however, with
> Warning messages. Is there a way to avoid printing out those warnings?
> Code
> this.model = ModelFactory.createDefaultModel();
> RDFReader reader = this.model.getReader();
> reader.read(this.model, new ByteArrayInputStream(rdf.getBytes()),
> "");
>
> Warning
> WARN [1527929618@qtp-940521487-3]
> (RDFDefaultErrorHandler.java:36) - file:///..-Data Removed-..(line 1
> column 443): {W130} Base URI is "", relative URIs left as relative.:<
> ..-Data Removed-..>
This is not a TDB issue.
RDF really should have absolute URIs - set the base to be something. At
least http://example.org/
(I think RIOT will resolve "" and so you get an absolute file: URI
Andy
>
>
> I thank you for your help,
> ~Loic