- Did you reload the data ? No, I did not know that. How can I reload the data ?
- We are using the Apache Jena 3.1.1 instead of 3.4.0 because this is integrated in a product with a big release cycle... - Is there a transaction ? Yes all the queries are made in transactions - Here is a minimal example String sparql = "SELECT ?annotationDimension WHERE { < http://www.telemis.com/ImageAnnotation/000b3231-a9c3-42b1-bb71-2d416f729db8-msr> <http://www.telemis.com/annotationDimension> ?annotationDimension . }"; Dataset dataset = TDBFactory.createDataset("C:/tdb"); dataset.begin(ReadWrite.READ); try { try (QueryExecution queryExecution = QueryExecutionFactory.create(sparql, dataset)) { ResultSet resultSet = queryExecution.execSelect(); while (resultSet.hasNext()) { // <=== No result QuerySolution querySolution = resultSet.nextSolution(); RDFNode rdfNode = querySolution.get("annotationDimension"); if(rdfNode != null) { if(rdfNode.isLiteral()) { // ... } else if(rdfNode.isResource()) { // ... } } } } } finally { dataset.end(); } - Do you need a larger data sample ? Thank you for your help. Laurent On 26 September 2017 at 16:40, Andy Seaborne <a...@apache.org> wrote: > Did you reload the data? > > https://jena.apache.org/documentation/migrate_jena2_jena3.html > > > > On 26/09/17 15:08, Laurent Rucquoy wrote: > >> Hello, >> >> We are currently migrating an Apache Jena 2.10.1 (jena-tdb 0.10.1) dataset >> to a new model with Apache Jena 3.1.1 >> > > 3.1.1 is old - 3.4.0 is current. > > >> Some SPARQL select queries on the source dataset don't return any solution >> when the where pattern includes a triple having a resource as object >> (others patterns have a literal as object)... however we are sure that the >> missing solution exists. >> >> Here is an example of query where ?annotationDimension is a resource: >> >> SELECT ?annotationDimension >> WHERE { >> < >> http://www.telemis.com/ImageAnnotation/000b3231-a9c3-42b1- >> bb71-2d416f729db8-msr> >> <http://www.telemis.com/annotationDimension> ?annotationDimension . >> } >> >> These queries are executed through >> >> > Is there a transaction? > > QueryExecution queryExecution = QueryExecutionFactory.create(sparql, >> dataset, initialJenaQuerySolutionMap) >> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > ResultSet resultSet = queryExecution.execSelect(); >> >> >> What can I do to retrieve the missing solution ? >> >> Thank you in advance for your help. >> > > Please provide a complete, minimal example. As described, I can't > recreate a test case because it is about the data. > > Andy > > >> Regards, >> Laurent >> >>