You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Atharva Patel (JIRA)" <ji...@apache.org> on 2013/10/05 08:40:41 UTC
[jira] [Created] (JENA-556) serviceURI should allow sparql
endpoints running on port other that 80
Atharva Patel created JENA-556:
----------------------------------
Summary: serviceURI should allow sparql endpoints running on port other that 80
Key: JENA-556
URL: https://issues.apache.org/jira/browse/JENA-556
Project: Apache Jena
Issue Type: Improvement
Affects Versions: TDB 1.0.0
Reporter: Atharva Patel
While trying to do simple query operation like this:
{code:java}
String sparqlEndpoint = "http://192.168.1.100:8890/sparql";
String queryString ="...";
QueryExecution queryExecution = new QueryEngineHTTP(sparqlEndpoint, queryString);
{code}
It gives exception like this:
Caused by: HttpException: -1
at com.hp.hpl.jena.sparql.engine.http.HttpQuery.execGet(HttpQuery.java:340)
at com.hp.hpl.jena.sparql.engine.http.HttpQuery.exec(HttpQuery.java:276)
at com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP.execSelect(QueryEngineHTTP.java:346)
Caused by: java.net.UnknownHostException: 192.168.1.100:8890: nodename nor servname provided, or not known
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:866)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1258)
at java.net.InetAddress.getAllByName0(InetAddress.java:1211)
at java.net.InetAddress.getAllByName(InetAddress.java:1127)
at java.net.InetAddress.getAllByName(InetAddress.java:1063)
at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.resolveHostname(DefaultClientConnectionOperator.java:278)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:162)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:641)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:480)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
at org.apache.http.impl.client.DecompressingHttpClient.execute(DecompressingHttpClient.java:130)
at org.apache.http.impl.client.DecompressingHttpClient.execute(DecompressingHttpClient.java:116)
at org.apache.jena.riot.web.HttpOp.exec(HttpOp.java:1011)
at org.apache.jena.riot.web.HttpOp.execHttpGet(HttpOp.java:291)
at org.apache.jena.riot.web.HttpOp.execHttpGet(HttpOp.java:353)
at com.hp.hpl.jena.sparql.engine.http.HttpQuery.execGet(HttpQuery.java:326)
... 20 more
The issue seems to be the way Jena tries to parse the serviceURI internally where there is likely to be a strong assumption that port number will never be passed by the user of this API.
--
This message was sent by Atlassian JIRA
(v6.1#6144)