Wednesday, 15 February 2012

java - HttpException: 500 when running a SPARQL query on remote endpoint -


I am very new to semantic web programming. How to code java code to check SPARQL endpoint using Jena API Write, I'm learning about it.

Here is my Java code:

  public class testJena {public static void main (string [] args) {string query string = "prefix owl:  

When I run the query, I get the following exceptions:

  Exceptions to the thread "Main" HTTP Exception: 500 com. Hp. Hpl.jena.sparql.engine.http.httpQuery.rewrap (HttpQuery.java:414) com.hp.pl.jena.sparql.engine.http.Http on http://www.quite.co.uk (HttpQuery.java358) com.hp. On. HPL.jena.sparql.engine.http.HttpQuery.exec (httpQuery.javaociety95) at com.hp.hpl.jena.sparql.engine.http .QueryEngineHTTP.execResultSetInner (QueryEngineHTTP.java:346) com.hp. On. Hpl.jena.sparql.engine.http.QueryEngineHTTP.execSelect (QueryEngineHTTP.java:338) at com.TestJena .example.TestJena.Main (TestJena.java.3)  

When I Run the above queries on overpoint http: // localhost: 8890 / sparql , it runs fine.

Can anyone tell me where the problem is? Why is it throwing a HttpException: 500 ?

Thank you! Closing point HTTP error code 500 (Internal Server Failure) Returning client code looks OK, probably

An older version of Jena is running because it typically prints more details (if the remote end provides any).

When you use it, there is probably an HTML form, not a SPARQL endpoint Additional parameters may be required - see the documentation of that server.


No comments:

Post a Comment