Hi Andy,
It does seem weird. Just for completeness, I changed my first example to:
Model model = dataset.getDefaultModel();
model.add(new StatementImpl(
ModelFactory.createDefaultModel().createResource("http://example.org/thing
"),
FOAF.name,
On 02/03/18 18:02, Chris Wood wrote:
Hi Andy,
I've answered one question, but got another...
Your comment "What is more, I can't line the stacktrace line numbers up
with the code. Jena 3.0.1 lines up better" made me sheepishly realise that
my tdbquery path was pointing to an old version of
Hi Andy,
I've answered one question, but got another...
Your comment "What is more, I can't line the stacktrace line numbers up
with the code. Jena 3.0.1 lines up better" made me sheepishly realise that
my tdbquery path was pointing to an old version of Jena I had locally
(although this was
Hi Chris,
I am on Linux, with Apache Maven 3.5.2, java openjdk version "1.8.0_151".
It works for me.
What is more, I can't line the stacktrace line numbers up with the code.
Jena 3.0.1 lines up better on
JournalControl.recoverSegment(JournalControl.java:185)
because that is a call to
Hi Andy (et al.),
I hope this is a minimal, reproducible example - and shows that I still get
the error after compilation with maven. If I run the same code as an
independent project in Eclipse (i.e. without maven integration) then it
works as expected and the final tdbquery command returns the
Hi Andy,
Yeh, that was on my debugging list! I've seemingly tracked it down to a
maven problem. I'm working in eclipse: when I created a new project and
copied all the files across and ran it in eclipse, it worked; as soon as I
built and packed via maven, I got the error. I'll do some more
Chris,
It looks like details matter - could you send a complete, minimal
example (i.e. standalone and runnable)?
Thanks
Andy
On 28/02/18 17:26, Chris Wood wrote:
Yeh, I thought I was doing that! I've taken that line of code out anyway
but it seems to make no difference...
On 28
Yeh, I thought I was doing that! I've taken that line of code out anyway
but it seems to make no difference...
On 28 February 2018 at 16:55, Rob Vesse wrote:
> Notice that Andy specifically said in his response:
>
> call this very early (before any TDB related activity)
Notice that Andy specifically said in his response:
call this very early (before any TDB related activity)
Rob
On 28/02/2018, 16:21, "Chris Wood" wrote:
Hi Rob - sorry, that was an over-simplification of the psedocode; I do call
Hi Rob - sorry, that was an over-simplification of the psedocode; I do call
dataset.begin(ReadWrite.WRITE);
after initialising it.
I had also wondered if setFileMode makes any difference - I was using it
because of this Andy's comment here:
Two things look odd:
- You never call dataset.begin() to start the transaction yet you later try to
commit() it
- Calling SystemTDB.setFileMode() after opening a dataset probably doesn't have
any effect on already open datasets though I could be wrong on this point
Rob
On 28/02/2018, 13:08,
Hi Andy,
It's probably a bit more complicated than I originally suggested. Inside my
try statement I do a bit of processing in a separate class (I create a new
in-memory Dataset, and return the model from it, so I can add it to my my
main dataset); but I also use this class to initialise the
Chris,
Is the dataset TDB (from TDBFactory) or a dataset holding a model, maybe
with added inference, where the base graph is backed by TDB?
It is better to put changes to the dataset inside a transaction. Failing
that, it should be sync'ed -- TDB.sync().
Andy
I've got a small application that follows the standard recommended pattern:
// initialise dataset / model
...
try {
// ... add statements
StmtIterator r = this.my_model.listStatements();
System.out.println(r.toList().size());
this.dataset.commit();
} catch
14 matches
Mail list logo