For a deeper look into our DataScope Select REST API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
1 2 3 4

Java Code Examples not working | java.net.UnknownHostException

Hi,

I just download "Java Code Examples" and I try to run it on my eclipse with

jdk8 and my user/login datascope.

But when I try to run this program I have this error :

java.net.UnknownHostException: hosted.datascopeapi.reuters.com

On internet explorer I can access to it, but when I ping in windows prompt I have host unknow.

How can I do?

Do I have to ask changes for proxy/dns at my work place?

Please help.

David LY.

dss-rest-apidatascope-selectdssjavaerror
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@davly182

Hi,

As your query is related to DSS, I moved it to this DSS group.

Kind regards,
AHS

Hi @davly182,

Thank you for your participation in the forum.

Is the reply below satisfactory in resolving your query? If so please can you click the 'Accept' text next to the appropriate reply?

This will guide all community members who have a similar question.

Thanks

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.
Thanks,
AHS

Upvotes
Accepted
22.1k 59 14 21

@davly182

From the description, it looks like your machine is behind a proxy/firewall.

You will have to modify the DSS sample to allow for the proxy server -- something like:

HttpHost proxy = new HttpHost(proxy_ip_address, proxy_port);
httpclient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);

See Apache HTTP client for more information.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1.5k 5 6 7

It means your Java application cannot resolve "hosted.datascopeapi.reuters.com" into an IP address. It doesn't mean the address cannot be accessed, it means it cannot be resolved. Can you do a successful resolve from Windows command prompt:

nslookup hosted.datascopeapi.reuters.com

??

On my machine it returns the IP : 192.165.219.152.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 2 3 4

Thanks Lars-at-Addicticks and Gurpreet.

no IP for the commande, and I'm not administrator of my computer.

I contacted my workplace to resolve it.

thanks.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.