Cannot initiate transaction operation

1 view
Skip to first unread message

timmy....@gmail.com

unread,
Jan 8, 2015, 8:52:08 AM1/8/15
to sta...@clarkparsia.com
Hi,

I'm using the latest Stardog Community edition together with the Apache Jena API. Whenever I call end() on com.hp.hpl.jena.query.Dataset, I'm getting the following exception:

com.hp.hpl.jena.shared.JenaException: com.complexible.stardog.StardogException: Cannot initiate transaction operation, transaction credentials are missing.
 at com
.complexible.stardog.jena.StardogDatasetGraph.abort(StardogDatasetGraph.java:260)
 at com
.complexible.stardog.jena.StardogDatasetGraph.end(StardogDatasetGraph.java:269)
 at com
.hp.hpl.jena.sparql.core.DatasetImpl.end(DatasetImpl.java:158)
       
....

Am I missing a fital configuration item? For the record, I'm on Windows and have a valid sdpass.conf in AppData/Roaming/stardog. Thanks in advance!

Evren Sirin

unread,
Jan 8, 2015, 9:28:46 AM1/8/15
to Stardog
The error message here is misleading. The problem is the transaction
already finished so calling end() raises an exception. Stardog
behavior here does not match the Jena documentation exactly here. But
as the javadoc [1] says calling end() after commit() or rollback() is
optional. So you can use the end() only for read transactions and
never use it for write transactions and you'll be fine. We'll fix this
mismatch in the next release anyway.

Best,
Evren

[1] http://jena.apache.org/documentation/javadoc/arq/com/hp/hpl/jena/sparql/core/Transactional.html
> --
> -- --
> You received this message because you are subscribed to the C&P "Stardog"
> group.
> To post to this group, send email to sta...@clarkparsia.com
> To unsubscribe from this group, send email to
> stardog+u...@clarkparsia.com
> For more options, visit this group at
> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

timmy....@gmail.com

unread,
Jan 9, 2015, 3:32:02 AM1/9/15
to sta...@clarkparsia.com
Thanks for that, it does seem to do the trick! Still running into some oth issues though. Will post a topic about this later.

Op donderdag 8 januari 2015 15:28:46 UTC+1 schreef Evren Sirin:
Reply all
Reply to author
Forward
0 new messages