Forwarding reply on behalf of Damyan Onyanov:
Hi Marek,
the error you are getting is due to a version mismatch between the
jena/arq libraries we use to build our bridge and those you are using.
In recent versions of ARQ the
com.hp.hpl.jena.sparql.engine.binding.BindingMap is no longer a 'normal'
class but an interface but in our code we are still trying to
instantiate it as usually.
So you need to switch to some older versions of jena/arq that works with
owlim, e.g. jena-2.6.3 and arq-2.8.6 combo for instance - these are
exact versions we use.
HTH,
Damyan Ognyanov
Ontotext AD
On 22/02/12 16:42, Ing. Marek Smid wrote:
Hello,
I would like to ask a question about OWLIM-SE.
I downloaded the trial version (we plan to use the full one for a
project), and I tried to use its Jena API.
I built a NetBeans project, included all necessary libraries, and
created a simple test. It consists of a TTL of a repository, creation
of LocalRepositoryManager, SesameDataset and Jena Model - all based on
provided examples. I loaded it with an extract of DBpedia in a triple
file. All this seem to work fine, since when I dump the data via
model.listStatements(), the data are there.
But when I try to use SPARQL query, it fails. I load a simple query
with QueryFactory, obtain QueryExecution via QueryExecutionFactory,
and execute it with execSelect(). All OK so far. But since ResultSet
has hasNext()==true, I try to obtain a solution with ResultSet
nextSolution(), and this gives the exception:
Exception in thread "main" java.lang.InstantiationError:
com.hp.hpl.jena.sparql.engine.binding.BindingMap
at
com.ontotext.jena.SesameOpExecutor$OwlimQueryIter$1.moveToNextBinding(Unknown
Source)
at
com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.nextBinding(QueryIteratorBase.java:152)
at
com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.moveToNextBinding(QueryIterRepeatApply.java:95)
at
com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.nextBinding(QueryIteratorBase.java:152)
at
com.hp.hpl.jena.sparql.engine.iterator.QueryIterConvert.moveToNextBinding(QueryIterConvert.java:71)
at
com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.nextBinding(QueryIteratorBase.java:152)
at
com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorWrapper.moveToNextBinding(QueryIteratorWrapper.java:43)
at
com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.nextBinding(QueryIteratorBase.java:152)
at
com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorWrapper.moveToNextBinding(QueryIteratorWrapper.java:43)
at
com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.nextBinding(QueryIteratorBase.java:152)
at
com.hp.hpl.jena.sparql.engine.ResultSetStream.nextBinding(ResultSetStream.java:84)
at
com.hp.hpl.jena.sparql.engine.ResultSetStream.nextSolution(ResultSetStream.java:102)
How can I get it working, please? Am I doing something wrong?
Thank you for any help,
Marek Smid
Department of Cybernetics
Faculty of Electrical Engineering
Czech Technical University in Prague
_______________________________________________
Owlim-discussion mailing list
Owlim-discussion@ontotext.com
http://ontomail.semdata.org/cgi-bin/mailman/listinfo/owlim-discussion
_______________________________________________
Owlim-discussion mailing list
Owlim-discussion@ontotext.com
http://ontomail.semdata.org/cgi-bin/mailman/listinfo/owlim-discussion