I'm using jena TBD version version 0.8.5, ARQ 2.8.3 and Jena 2.6.2.
And I think your calculated guess could be right.
This is the code I use for opening connection to DB (i.e. obtaining model):
private void doOpenModel() {
if (model != null) {
doCloseModel();
}
model = TDBFactory.createModel(connectionString);
}
And this is the code for closing the model:
private void doCloseModel() {
logger.trace("Closing model.");
TDB.sync(model);
TDB.closedown();
model.close();
}
In between there are CRUD operations and the doCloseModel() is always in
finally block.
So maybe I'm doing something wrong in the doCloseModel()?
Thanks,
Nadav Hoze
Senior Software Engineer
dbMotion Ltd.
Direct: +972-9-7699000
Extension number: 9037
Mobile: 972-54-4821606
E-mail: [email protected]
-----Original Message-----
From: Andy Seaborne [mailto:[email protected]] On Behalf Of Andy
Seaborne
Sent: Thursday, December 15, 2011 3:46 PM
To: [email protected]
Subject: Re: Got TDBException: Secondary index duplicate
Hi there,
A possible cause is not shutting the database down cleanly sometime earlier.
Could that have happened?
(Transactions will help a lot here).
Andy
PS Which version is this?
On 14/12/11 14:02, Nadav Hoze wrote:
> Hi
>
> I'm working with Jena TDB and my data storage is on a clustered data server.
>
> I got this exception:
>
> *com.hp.hpl.jena.tdb.TDBException: Secondary index duplicate: SPO->OSP
> -> [[000000000063A94E], [0000000000000B52], [000000000063A98C]]*
>
> at com.hp.hpl.jena.tdb.index.TupleTable.add(TupleTable.java:60)
>
> at
> com.hp.hpl.jena.tdb.nodetable.NodeTupleTable.addRow(NodeTupleTable.jav
> a:56)
>
> at com.hp.hpl.jena.tdb.store.TripleTable.add(TripleTable.java:45)
>
> at
> com.hp.hpl.jena.tdb.store.GraphTriplesTDB._performAdd(GraphTriplesTDB.
> java:44)
>
> at
> com.hp.hpl.jena.tdb.store.GraphTDBBase.performAdd(GraphTDBBase.java:89
> )
>
> at
> com.hp.hpl.jena.graph.impl.SimpleBulkUpdateHandler.add(SimpleBulkUpdat
> eHandler.java:48)
>
> at
> com.hp.hpl.jena.graph.impl.SimpleBulkUpdateHandler.add(SimpleBulkUpdat
> eHandler.java:44)
>
> at com.hp.hpl.jena.rdf.model.impl.ModelCom.add(ModelCom.java:883)
>
> There is no concurrency issues because the environment we work in is
> not federated (i.e. no multiple clients calling jena).
>
> I saw a post of Andy which implies that the datastore might be
> inconsistent which worries me allot.
>
> Can you provide some info why would this happen even though I never
> encountered this and here we don't deal with multiple concurrent requests.
>
> Could this happen let's say if data server was unavailable for a brief
> moment ?
>
> Really appreciate your help.
>
> Thanks,
>
> *Nadav Hoze*
>
> Senior Software Engineer
>
> dbMotion Ltd.
>
> Direct: +972-9-7699000
>
> Extension number: 9037
>
> Mobile: 972-54-4821606
>
> E-mail: [email protected] <mailto:[email protected]>_
>
> Description: Logo + Tagline
>
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. Please note that any disclosure, copying or
> distribution of the content of this information is strictly forbidden.
> If you have received this email message in error please notify its
> sender and then delete it from your files.
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
Please note that any disclosure, copying or distribution of the content of this
information is strictly forbidden. If you have received this email message in
error please notify its sender and then delete it from your files.