java.net.ConnectException with java libs

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

java.net.ConnectException with java libs

Inma-3
The first, I'm sorry for my english, it's rusty!!!

I'm getting started with Cloud Made Java Libraries, I'm testing the first examples (avalaibles in Cloud Made's website) and I get a "java.net.ConnectException"

I added all .jar files and I'm using netbeans jdk.

My settings are jdk 1.6 update 12 and Windows XP.

This is the stack trace:

Exception in thread "main" com.cloudmade.api.HTTPError: java.net.ConnectException: Connection refused: connect
        at com.cloudmade.api.CMClient.callService(CMClient.java:172)
        at com.cloudmade.api.CMClient.find(CMClient.java:236)
        at probandocloudmade.FindClosest.main(FindClosest.java:22)
Caused by: java.net.ConnectException: Connection refused: connect
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:519)
        at java.net.Socket.connect(Socket.java:469)
        at java.net.Socket.<init>(Socket.java:366)
        at java.net.Socket.<init>(Socket.java:240)
        at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)
        at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122)
        at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
        at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
        at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
        at com.cloudmade.api.CMClient.callService(CMClient.java:165)
        ... 2 more

Thanks in advance!!!


Charlas más divertidas con el nuevo Windows Live Messenger
_______________________________________________
Dev site list
[hidden email]
http://lists.cloudmade.com/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: java.net.ConnectException with java libs

Igor Shubovych
Hello Inma,

You might have network problem. I suppose it is caused by Windows firewall . Just turn it off temporary, or enable your Java application on 80 port.

Best regards,
Igor Shubovych
Software Engineer @ CloudMade


2009/3/25 Inma <[hidden email]>
The first, I'm sorry for my english, it's rusty!!!

I'm getting started with Cloud Made Java Libraries, I'm testing the first examples (avalaibles in Cloud Made's website) and I get a "java.net.ConnectException"

I added all .jar files and I'm using netbeans jdk.

My settings are jdk 1.6 update 12 and Windows XP.

This is the stack trace:

Exception in thread "main" com.cloudmade.api.HTTPError: java.net.ConnectException: Connection refused: connect
        at com.cloudmade.api.CMClient.callService(CMClient.java:172)
        at com.cloudmade.api.CMClient.find(CMClient.java:236)
        at probandocloudmade.FindClosest.main(FindClosest.java:22)
Caused by: java.net.ConnectException: Connection refused: connect
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:519)
        at java.net.Socket.connect(Socket.java:469)
        at java.net.Socket.<init>(Socket.java:366)
        at java.net.Socket.<init>(Socket.java:240)
        at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)
        at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122)
        at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
        at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
        at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
        at com.cloudmade.api.CMClient.callService(CMClient.java:165)
        ... 2 more

Thanks in advance!!!


Charlas más divertidas con el nuevo Windows Live Messenger

_______________________________________________
Dev site list
[hidden email]
http://lists.cloudmade.com/listinfo/dev


_______________________________________________
Dev site list
[hidden email]
http://lists.cloudmade.com/listinfo/dev