Unable to query d2rq ttl file from Jena -


i trying query d2rq-generated ttl file. following code snippet:

        modeld2rq m = new modeld2rq("file:c:\\users\\599782\\downloads\\d2rq-0.8.1\\northwind.ttl");         string sparql =              "prefix vocab: <http://localhost:2020/resource/vocab/>" +             "select ?firstname ?lastname where{"+                 "?x vocab:employees_country 'usa'."+                 "?x vocab:employees_firstname ?firstname."+                 "?x vocab:employees_lastname ?lastname."+             "}";         query q = queryfactory.create(sparql);          resultset rs = queryexecutionfactory.create(q, m).execselect();         resultsetformatter.out(system.out, rs, q);         m.close(); 

and shows exception:

exception in thread "main" java.lang.incompatibleclasschangeerror: class com.hp.hpl.jena.sparql.algebra.op.opproject not implement requested interface org.openjena.atlas.io.printable @ org.openjena.atlas.io.printutils.tostring(printutils.java:28) @ de.fuberlin.wiwiss.d2rq.engine.queryengined2rq.translate(queryengined2rq.java:70) @ de.fuberlin.wiwiss.d2rq.engine.queryengined2rq.modifyop(queryengined2rq.java:60) @ com.hp.hpl.jena.sparql.engine.queryenginebase.createplan(queryenginebase.java:94) @ com.hp.hpl.jena.sparql.engine.queryenginebase.getplan(queryenginebase.java:87) @ de.fuberlin.wiwiss.d2rq.engine.queryengined2rq$queryenginefactoryd2rq.create(queryengined2rq.java:110) @ com.hp.hpl.jena.sparql.engine.queryexecutionbase.getplan(queryexecutionbase.java:513) @ com.hp.hpl.jena.sparql.engine.queryexecutionbase.startqueryiterator(queryexecutionbase.java:490) @ com.hp.hpl.jena.sparql.engine.queryexecutionbase.execresultset(queryexecutionbase.java:498) @ com.hp.hpl.jena.sparql.engine.queryexecutionbase.execselect(queryexecutionbase.java:194) @ com.jenaproj.hellojena.main(hellojena.java:159) 

anyone have idea might going on.

java.lang.incompatibleclasschangeerror 

you have incompatible versions of jars on classpath.

if use jena jars d2rq should correct version, otherwise need version of d2rq compiled against jena jars wish use.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -