• kaiherng
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

hi guys,

 

I am a new in salesforce and I am trying to access salesforce via java codes. Unfortunately, I am getting this error:

 

com.sforce.ws.ConnectionException: Failed to send request to https://login.salesforce.com/services/Soap/u/24.0
    at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:113)
    at com.sforce.soap.partner.PartnerConnection.login(PartnerConnection.java:1)
    at com.sforce.soap.partner.PartnerConnection.<init>(PartnerConnection.java:1)
    at com.sforce.soap.partner.Connector.newConnection(Connector.java:1)
    at SalesforceTestQuery.main(SalesforceTestQuery.java:20)
Caused by: java.net.UnknownHostException: login.salesforce.com
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
    at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
    at com.sforce.ws.transport.JdkHttpTransport.connectLocal(JdkHttpTransport.java:98)
    at com.sforce.ws.transport.JdkHttpTransport.connect(JdkHttpTransport.java:83)
    at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:99)
    ... 4 more

 

and I am following the steps which show on this web site http://blog.jeffdouglas.com/2010/05/17/java-command-line-app-using-the-salesforce-wsc/. I have tried to turn off or on my firewall but I am getting the same result as well. I hope somebody from salesforce can help me to solve this issues.

 

Thank you

Kai Herng

hi guys,

 

I am a new in salesforce and I am trying to access salesforce via java codes. Unfortunately, I am getting this error:

 

com.sforce.ws.ConnectionException: Failed to send request to https://login.salesforce.com/services/Soap/u/24.0
    at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:113)
    at com.sforce.soap.partner.PartnerConnection.login(PartnerConnection.java:1)
    at com.sforce.soap.partner.PartnerConnection.<init>(PartnerConnection.java:1)
    at com.sforce.soap.partner.Connector.newConnection(Connector.java:1)
    at SalesforceTestQuery.main(SalesforceTestQuery.java:20)
Caused by: java.net.UnknownHostException: login.salesforce.com
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
    at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
    at com.sforce.ws.transport.JdkHttpTransport.connectLocal(JdkHttpTransport.java:98)
    at com.sforce.ws.transport.JdkHttpTransport.connect(JdkHttpTransport.java:83)
    at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:99)
    ... 4 more

 

and I am following the steps which show on this web site http://blog.jeffdouglas.com/2010/05/17/java-command-line-app-using-the-salesforce-wsc/. I have tried to turn off or on my firewall but I am getting the same result as well. I hope somebody from salesforce can help me to solve this issues.

 

Thank you

Kai Herng