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/06 10:18:43 UTC
[jira] [Comment Edited] (JENA-556) serviceURI should allow sparql
endpoints running on port other that 80
[ https://issues.apache.org/jira/browse/JENA-556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13787527#comment-13787527 ]
Atharva Patel edited comment on JENA-556 at 10/6/13 8:18 AM:
-------------------------------------------------------------
Well, 192.168.1.100 is running on my LAN so do you think these reverse lookups will yield any fruitful results?
I tried making GET request to 192.168.1.100:8890 with Apache HTTP Client and received response successfully.
I am wondering is there any code in the Jena library which does something like this:
Given serviceURI "http://somehostname/sparql" extract the first component between "http://" and first "/" and treat it as hostname? Such thing can lead to exception like this :
Caused by: java.net.UnknownHostException: 192.168.1.100:8890
Because "somehostname" can contain port number.
was (Author: patelatharva):
Well, 192.168.1.100 is running on my LAN so do you think these reverse lookups will yield any fruitful results?
I tried making GET request to 192.168.1.100:8890 with Apache HTTP Client and received response successfully.
I am wondering is there any code in the Jena library which does something like this:
Given serviceURI "http://somehostname/sparql" extract the first component between "http://" and first "/" and treat it as hostname? Such thing can lead to exception like this :
Caused by: java.net.UnknownHostException: 192.168.1.100:8890
> 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: Bug
> Affects Versions: TDB 1.0.0
> Reporter: Atharva Patel
> Assignee: Andy Seaborne
>
> 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)