+ Start a Discussion
objectuserobjectuser 

connect to salesforce through post...

i am trying to connect to salesforce using post to get instance url and token..

but i am getting this error ...

how should i resolve this ??

i have also gicen proxy manually...

 

 

org.apache.http.conn.HttpHostConnectException: Connection to https://login.salesforce.com refused
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:158)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:561)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:732)
at com.sample.onpremise.ChatterIntegration.login2ForceDotCom(ChatterIntegration.java:70)
at com.sample.onpremise.ChatterIntegration.main(ChatterIntegration.java:39)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.security.ssl.SSLSocketImpl.connect(Unknown Source)
at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:375)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:148)
... 9 more

Sanchit DuaSanchit Dua

It comes when

1. You don't have the internet connection properly installed (means no internet connectivity) or,

2. The calling Java Program  needs to point to the current proxy you have set.

 

While its the general error we get during the no-internet connection.

 

Please let me know if this resolves your issue.

 

indyindy

Hi,

You can able to resolve the issue?

I am also getting the same error message in my java client application.

I used the method setproperty(proxy) also.

 

Thanks,

Indy