You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Davide Rossi <da...@gmail.com> on 2013/09/07 16:40:05 UTC

Re: Null values returned after stop JVM

Hi everybody,
few days ago I finally solved the problem. I found here
http://mail-archives.apache.org/mod_mbox/jena-users/201211.mbox/%3C50A1302B.9030500@apache.org%3Ethat
was a little problem of tdb 0.9.3 version.

First of all, I tried to remove the instruction
Dataset tdbDataset = TDBFactory.createDataset(f.getAbsolutePath());
but sometimes I had the same problem when I stopped JVM: my program
write continuously
in TDB using Fuseki and when I stopped JVM after some write, sometimes I
found some null resources.
So I passed to TDB 0.9.4 and Fuseki 0.2.5 and I have no problems trying to
do the same things.

Thanks a lot for your support: it was very precious.
Regards
Davide



2013/8/28 Andy Seaborne <an...@apache.org>

> On 28/08/13 08:24, Davide Rossi wrote:
>
> Davide,
>
>
>  First of all, thanks for your answers.
>>
>> When I start Fuseki, I bind it to a still existing (empty) dataset. First
>> I
>> create dataset:
>> File f = new File("myDataset");
>> if (!f.exists()) {
>>      f.mkdirs();
>> Dataset tdbDataset = TDBFactory.createDataset(f.**getAbsolutePath());
>>
>> and then start Fuseki:
>> FusekiCmd.main(
>>                  "--update",
>>                  "--loc=" + getAbsolutePath(),
>>                  "/mydataset");
>>
>
> so you are starting Fuseki inside another JVM process?
>
> You can not reliably access the same database from inside and outside
> Fuseki in the version you are using. (Actually, I have no idea if it's safe
> or not).
>
>
>  I never access the database from TDB directly,
>>
>
> then why are you opening it in the first code snippet above?  Fuseki opens
> the database.  No other code must do so.
>
> (32 or 64 bit JVM? Which OS?)
>
>
>  but always by Fuseki.
>> I try to do the same operation using Fuseki 0.2.5 and TDB 0.9.4 and I
>> don't
>> have this problem of null resource in triples, so I think was a bug of the
>> versions I'm using.
>>
>> I can't upgrade Fuseki or TDB because I use them in a project that still
>> use jena, arq and so on and the library required by Fuseki but 'cause of
>> compatibility versions problem I can't upgrade them (I know, it's a boring
>> problem).
>>
>
> Which library?  Maybe porting the current codebase, or 0.2.5 codebase, is
> an option.
>
> The differences between 0.2.5 and 0.2.4 aren't going to be very large.
>
>
>  So, concluding, can I do something (using Fuseki) to "force" the dataset
>> to
>> synchronize data and persist them? (I think the problem could be this)
>>
>
> You haven't said what operation you can calling to update the data. SPARQL
> Update? File upload? PUT or POST an RDF file?
>
>         Andy
>
>
>
>> Thanks a lot
>> Regards
>> Davide
>>
>>
>>
>> 2013/8/27 Andy Seaborne <an...@apache.org>
>>
>>  On 27/08/13 19:25, Rob Vesse wrote:
>>>
>>>  But If I
>>>>
>>>>> stop the JVM of my Fuseki server (and TDB) from my IDE console, restart
>>>>> it
>>>>> and then query the dataset, the query returns to me null values for
>>>>> some
>>>>> elements of some triples.
>>>>>
>>>>>
>>>> How do you stop the JVM?  Also what is your TDB setup?
>>>>
>>>>
>>>> This sounds like one of two things:
>>>>
>>>> 1 - Dataset corruption possibly caused by non-graceful shutdown of the
>>>> server, once the dataset is corrupted you typically need to start
>>>> afresh.
>>>> 2 - Your TDB dataset is not persistent (are you using the --memTDB
>>>> option?)
>>>>
>>>> Usually dataset corruption would be indicated by error messages in the
>>>> logs so if you didn't see those I would lean more towards it being
>>>> option
>>>> 2
>>>>
>>>> Rob
>>>>
>>>>
>>> Why can't you upgrade? Fuseki is a standalone.  I hope you are not
>>> accessing the database from TDB directly at the same time that Fuseki is
>>> running.  That will corrupt the data.
>>>
>>>          Andy
>>>
>>>
>>>
>>>  On 8/27/13 11:08 AM, "Davide Rossi" <da...@gmail.com> wrote:
>>>>
>>>>   Hi everyone,
>>>>
>>>>> I'm using Fuseki 0.2.4 with TDB 0.9.3 (I know that are old version, but
>>>>> unfortunately I can't change to another version). The problem is the
>>>>> seguent: I write triples using Fuseki, than I query the dataset (using
>>>>> Fuseku, of course) and the query returns all values correctly. But If I
>>>>> stop the JVM of my Fuseki server (and TDB) from my IDE console, restart
>>>>> it
>>>>> and then query the dataset, the query returns to me null values for
>>>>> some
>>>>> elements of some triples.
>>>>> My question is: is this a bug of TDB or Fuseki version I'm using (I
>>>>> thinks
>>>>> TDB can't persist all inserted data) and than solved in new versions ?
>>>>> If
>>>>> is not, can I do something to solve it?
>>>>>
>>>>> Thanks a lot
>>>>> Regards
>>>>> Davide
>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>