[ 
https://issues.apache.org/jira/browse/JENA-750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14074878#comment-14074878
 ] 

Dimitris Kontokostas commented on JENA-750:
-------------------------------------------

You are right, I also read the foaf ontology in the model

the code is open source (1) and The exact place where I get the exception is in 
(2)

To replicate the error you  can run the following on the root directory
{code}
bin/rdfunit-dev -d http://dbpedia.org/resource/Berlin -s foaf -r rlog
{code}


(1) http://github.com/AKSW/RDFUnit \\
(2) 
https://github.com/AKSW/RDFUnit/blob/master/rdfunit-core/src/main/java/org/aksw/rdfunit/tests/executors/RLOGTestExecutor.java#L77



> Inconsistent state of QuerySolution
> -----------------------------------
>
>                 Key: JENA-750
>                 URL: https://issues.apache.org/jira/browse/JENA-750
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: Jena
>    Affects Versions: Jena 2.11.1
>         Environment: Ubuntu 14.02
>            Reporter: Dimitris Kontokostas
>
> Steps to reproduce:
> 1) create an ontology Model
> {code}
> ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM, 
> ModelFactory.createDefaultModel());
> {code}
> 2) read the following URI: http://dbpedia.org/resource/Berlin
> with model.read()
> 3) run this query against the model
> {code}
> SELECT DISTINCT  ?resource
> WHERE
>   { ?resource <http://xmlns.com/foaf/0.1/age> ?c }
> GROUP BY ?resource
> HAVING ( count(?c) != 1 )
> {code}
> ===================
> "resource" variable does not exists in the query solution and I get a  
> NullPointerException
> {code}
> while (results.hasNext()) {
>                 QuerySolution qs = results.next();
>                 String resource = qs.get("resource").toString();
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to