You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "ArthurVaisse-Lesteven (JIRA)" <ji...@apache.org> on 2013/06/04 10:52:20 UTC

[jira] [Created] (JENA-466) a QueryEngineHTTP doesn't handle the returned content type after an execModel() call.

ArthurVaisse-Lesteven created JENA-466:
------------------------------------------

             Summary: a QueryEngineHTTP doesn't handle the returned content type after an execModel() call.
                 Key: JENA-466
                 URL: https://issues.apache.org/jira/browse/JENA-466
             Project: Apache Jena
          Issue Type: Bug
          Components: ARQ
    Affects Versions: Jena 2.10.0
            Reporter: ArthurVaisse-Lesteven


When executing this simple piece of code : 

public class test {

	public static void main(String[] argv){
		String request = "Ask from <http://example.com#graphe> where {<http://example.com#ProofOfConcept> ?p ?o}";
		String endpoint = "http://localhost:3030/shield/query";

		Query query;
		try{
		query = QueryFactory.create(request);
		}
		catch(Exception e){
			throw e;
		}		
		QueryEngineHTTP query_engine = new QueryEngineHTTP(endpoint, query);
		try{
			SPARQLResult spqlr = new SPARQLResult(query_engine.execDescribe());
		}
		finally{
			query_engine.close();
		}
	}

}

I got the following exception :
Exception in thread "main" com.hp.hpl.jena.query.QueryException: Endpoint returned Content Type: application/sparql-results+xml which is not a valid RDF Graph syntax
	at com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP.execModel(QueryEngineHTTP.java:275)
	at com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP.execDescribe(QueryEngineHTTP.java:251)
	at com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP.execDescribe(QueryEngineHTTP.java:248)
	at test.main(test.java:29)

The same error occurs when I change the endpoint to a Sesame repository. So I think the problem come from the code who receive the repository response and check content type. He probably wait another content type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira