This looks like an initialisation problem Jena changed how it was initialised in the 3.x releases hence why you get an NPE
This is probably the same problem as discussed in the following thread: http://mail-archives.apache.org/mod_mbox/jena-users/201603.mbox/%[email protected]%3E] the suggested solution there is to create an appropriate META-INF/services/org.apache.jena.system.JenaSubsystemLifecycle file and included that on your class path if there is not currently one in the JDBC packages then please file a bug Rob On 08/08/2016 03:32, "Will" <[email protected]> wrote: I am trying to use the Jena JDBC driver in a ColdFusion application server. Details as follows: Added to classpath: jena-jdbc-driver-bundle-3.1.0.jar I register the following driver with the ColdFusion server: org.apache.jena.jdbc.remote.RemoteEndpointDriver with the following connection string: jdbc:jena:remote:query=http://localhost:3030/ds/query&update=http://localhost:3030/ds/update Fuseki is running in a docker container with 3030 exposed (no issues there) Every single query I try to execute using the ColdFusion query engine results in "Not a valid SPARQL query". The 2 test queries are SELECT ?s ?p ?o WHERE {?s ?p ?o} and SELECT DISTINCT ?type WHERE { ?s a ?type } LIMIT 100 Looking at the logs, I see the following: INFO org.apache.jena.jdbc.statements.JenaStatement - Received input command text: SELECT DISTINCT ?type WHERE { ?s a ?type } LIMIT 100 12582870 [/bluedragon/administrator/datasources/_controller.cfm] INFO org.apache.jena.jdbc.statements.JenaStatement - Command text after pre-processing: SELECT DISTINCT ?type WHERE { ?s a ?type } LIMIT 100 12582884 [/bluedragon/administrator/datasources/_controller.cfm] ERROR org.apache.jena.jdbc.statements.JenaStatement - Invalid SPARQL query java.lang.NullPointerException at org.apache.jena.query.ARQ.isTrue(ARQ.java:629) at org.apache.jena.sparql.lang.ParserBase.<init>(ParserBase.java:291) at org.apache.jena.sparql.lang.SPARQLParserBase.<init>(SPARQLParserBase.java:49) at org.apache.jena.sparql.lang.sparql_11.SPARQLParser11Base.<init>(SPARQLParser11Base.java:22) at org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.<init>(SPARQLParser11.java:4974) at org.apache.jena.sparql.lang.ParserSPARQL11.perform(ParserSPARQL11.java:92) at org.apache.jena.sparql.lang.ParserSPARQL11.parse$(ParserSPARQL11.java:52) at org.apache.jena.sparql.lang.SPARQLParser.parse(SPARQLParser.java:34) at org.apache.jena.query.QueryFactory.parse(QueryFactory.java:147) at org.apache.jena.query.QueryFactory.create(QueryFactory.java:79) at org.apache.jena.query.QueryFactory.create(QueryFactory.java:52) at org.apache.jena.query.QueryFactory.create(QueryFactory.java:40) at org.apache.jena.jdbc.statements.JenaStatement.executeQuery(JenaStatement.java:562) Not sure why there is a NullPointerException. There is no other code since this is all within ColdFusion, but I am guessing this has something to do with ColdFusion not registering the Driver correctly. But if it's not and someone can shed some light, it would be really appreciated since this could make my ColdFusion application so '2016'. Many Thanks, William Greenly
