As I said on Stackoverflow, please show the SPARQL query String that is
created by getStringForQuery()

I looks like this query has somes yntax error such that the endpoint
returns an HTML error page instead of the resultset format.

> Hello there!
>
> Excuse me, I was not subscribed for replies, If someone replied, please
> resend It.
> Thank you!
>
> ---------- Forwarded message ----------
> From: Олег Герасин <[email protected]>
> Date: 2017-01-30 1:00 GMT+03:00
> Subject: Endpoint returned Content-Type: text/html
> To: [email protected]
>
> Hello!
>
> Please, help me!
>
> When I try to send a sparql query to some endpoint, for example:
>
>> QueryExecution qe = QueryExecutionFactory.sparqlService("http://data.
>> open.ac.uk/sparql",
>>                 getStringForQuery());
>>         ResultSet results = qe.execSelect();
> I get
>
>> Exception in thread "main" org.apache.jena.query.QueryException: Endpoint
>> returned Content-Type: text/html which is not currently supported for
>> SELECT queries
>> at org.apache.jena.sparql.engine.http.QueryEngineHTTP.execResultSetInner(
>> QueryEngineHTTP.java:372)
>> at org.apache.jena.sparql.engine.http.QueryEngineHTTP.
>> execSelect(QueryEngineHTTP.java:334)
>
> And this is nit the only one endpoint, to which I can't send query,
>
> What should I do to get results in other content-type? I try to google it,
> but I found that it can happen if I send query to bad html (not sparql
> endpoint), but http://data.open.ac.uk/sparql is good endpoint, I send
> sparql query to it via python and everything was good,
>
> Best regards,
> Oleg Gerasin
>
-- 
Lorenz Bühmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center

Reply via email to