You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Charles Li <ch...@gmail.com> on 2013/08/27 07:19:25 UTC
Always got TDB model size = 0
Hi, Jena experts:
Jena v2.10.1 on Windows 7.
(1) Run TDB loader: loadRDF.cmd myDir myRdfXML.xml.
(2) Create a TDB sitting on "myDir":
model = TDBFactory.createDataset("myDir").getDefaultModel();
However, model.size() will always give 0! And any query won't return
anything!
If I start Fuseki on "myDir": fuseki-server.bat --loc myDir
--home=<fuseki_home> /myDir, I can run the same query and return rows.
Is there anything wrong with my code in step (2)?
Thanks a lot for your help!!
- Charles
Re: Always got TDB model size = 0
Posted by Andy Seaborne <an...@apache.org>.
On 27/08/13 06:19, Charles Li wrote:
> Hi, Jena experts:
>
> Jena v2.10.1 on Windows 7.
>
> (1) Run TDB loader: loadRDF.cmd myDir myRdfXML.xml.
Don't know what that does.
>
> (2) Create a TDB sitting on "myDir":
> model = TDBFactory.createDataset("myDir").getDefaultModel();
>
> However, model.size() will always give 0! And any query won't return
> anything!
>
> If I start Fuseki on "myDir": fuseki-server.bat --loc myDir
> --home=<fuseki_home> /myDir, I can run the same query and return rows.
>
> Is there anything wrong with my code in step (2)?
Maybe "myDir" is naming a different directory, maybe because the current
working directory is different. The details matter here I'm afraid. A
complete, minimal, example would help.
Andy
>
> Thanks a lot for your help!!
> - Charles
>