Ok, I don't get the exception when I use Sesame 2 alpha 3 and rewrite the
code accordingly. I should have tried it before sending the mail, sorry.
But still, is it OK to use Sesame to update the repository directly? Do you
plan to switch to the newest version of Sesame?
Regards,
Jakub
On 4/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hello,
I would like to update the data I browse using Longwell. Creating a new
repository each time some piece of information changes is not very
satisfying but it is the only way I found reading the documentation and the
archive of this maling list.
It should be possible to use Sesame to work with the repository directly,
shouldn't it? From Longwell sources I found out that the Sesame NativeStore
is used. I managed to open it using Sesame 2 beta 3 (does Longwell 2.4 use
Sesame 2 alpha 3? (I use Longwell 2.4, because Longwell 2.4.2 won't
build)) but I get an ArrayIndexOutOfBoundsException on result.next()
already when trying to list the triples.
-- The exception is: --
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at org.openrdf.sail.nativerdf.ValueStore._data2value(
ValueStore.java:537)
at org.openrdf.sail.nativerdf.ValueStore.getValue (ValueStore.java
:200)
at org.openrdf.sail.nativerdf.ValueStore._data2literal(
ValueStore.java:574)
at org.openrdf.sail.nativerdf.ValueStore._data2value(
ValueStore.java:543)
at org.openrdf.sail.nativerdf.ValueStore.getValue (ValueStore.java
:200)
at org.openrdf.sail.nativerdf.NativeStatementIterator.next(
NativeStatementIterator.java:101)
at org.openrdf.sail.nativerdf.NativeStatementIterator.next(
NativeStatementIterator.java :24)
at info.aduna.iteration.ExceptionConvertingIteration.next(
ExceptionConvertingIteration.java:86)
at info.aduna.iteration.IterationWrapper.next(
IterationWrapper.java:71)
at org.openrdf.sail.helpers.SailBaseIteration.next (
SailBaseIteration.java:57)
at info.aduna.iteration.ExceptionConvertingIteration.next(
ExceptionConvertingIteration.java:86)
at info.aduna.iteration.IterationWrapper.next(
IterationWrapper.java:71)
at doapfeedreader.RepoTest.printAll2(RepoTest.java:70)
-- The code is: --
RepositoryConnection con = repo.getConnection();
RepositoryResult result = con.getStatements(null, null, null,
true);
while (result.hasNext()) {
Statement s = (Statement)result.next(); //Line # 70
System.out.println(s.getSubject()+" "+s.getPredicate()+"
"+s.getObject());
}
-----------------
The exception is thrown on results.next() or already result.hasNext()
according to whether I do result = con.getStatements(null, null, null,
true) or result = con.getStatements (null, null, null, true,
(Resource)null).
It doesn't list any of the triples I've added to the repository using
./longwell -r .... it only lists these:
http://simile.mit.edu/2005/04/longwell#Trusted
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
http://simile.mit.edu/2005/04/longwell#SystemStatus
http://simile.mit.edu/2005/04/longwell#SystemStatus
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
http://www.w3.org/2000/01/rdf-schema#Class
http://simile.mit.edu/2005/04/longwell#Property
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
http://www.w3.org/2000/01/rdf-schema#Class
http://simile.mit.edu/2005/04/longwell#DateTimeProperty
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
http://www.w3.org/2000/01/rdf-schema#Class
http://simile.mit.edu/2005/04/longwell#TagProperty
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
http://www.w3.org/2000/01/rdf-schema#Class
http://simile.mit.edu/2005/04/flair#Facade
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
http://www.w3.org/2000/01/rdf-schema#Class
http://simile.mit.edu/2005/04/flair#QueryBasedFacade
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
http://www.w3.org/2000/01/rdf-schema#Class
What do I do wrong? Is this a Sesame 2 beta 3 bug? Does Longwell use
Sesame 2? (I don't know Maven so I'm not sure). Is there some other way to
update the repository?
Thank you in advance.
Jakub Kotowski
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general