• Ali_Bhai
  • NEWBIE
  • 0 Points
  • Member since 2010

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

I am new to Salesforce, trying to connect salesforce through JAVA but getting below error.

I have got this sample code from Salesforce documentation on API.

http://www.salesforce.com/us/developer/docs/api/index_Left.htm#StartTopic=Content/sforce_api_partner.htm

 

Did anyone face this issue before? Please help me to resolve this error.

 

 

Enter username: xxxxxxxxxxxxxxxxxxxx
Enter password: xxxxxxxxxxxx

LOGGING IN NOW....
An unexpected error has occurred: ; nested exception is:
 java.net.ConnectException: Connection timed out: connect
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.net.ConnectException: Connection timed out: connect
 faultActor:
 faultNode:
 faultDetail:
 {http://xml.apache.org/axis/}stackTrace:java.net.ConnectException: Connection timed out: connect
 at java.net.PlainSocketImpl.socketConnect(Native Method)
 at java.net.PlainSocketImpl.doConnect(Unknown Source)
 at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
 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.SSLSocketImpl.<init>(Unknown Source)
 at com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(Unknown Source)
 at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:92)
 at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
 at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
 at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
 at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
 at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
 at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
 at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
 at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
 at org.apache.axis.client.Call.invoke(Call.java:2767)
 at org.apache.axis.client.Call.invoke(Call.java:2443)
 at org.apache.axis.client.Call.invoke(Call.java:2366)
 at org.apache.axis.client.Call.invoke(Call.java:1812)
 at com.sforce.soap.enterprise.SoapBindingStub.login(SoapBindingStub.java:3750)
 at com.doc.samples.Samples.login(Samples.java:78)
 at com.doc.samples.Samples.run(Samples.java:318)
 at com.doc.samples.Samples.main(Samples.java:35)

 

Thanks,

I am new to Salesforce, trying to connect salesforce through JAVA but getting below error.

I have got this sample code from Salesforce documentation on API.

http://www.salesforce.com/us/developer/docs/api/index_Left.htm#StartTopic=Content/sforce_api_partner.htm

 

Did anyone face this issue before? Please help me to resolve this error.

 

 

Enter username: xxxxxxxxxxxxxxxxxxxx
Enter password: xxxxxxxxxxxx

LOGGING IN NOW....
An unexpected error has occurred: ; nested exception is:
 java.net.ConnectException: Connection timed out: connect
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.net.ConnectException: Connection timed out: connect
 faultActor:
 faultNode:
 faultDetail:
 {http://xml.apache.org/axis/}stackTrace:java.net.ConnectException: Connection timed out: connect
 at java.net.PlainSocketImpl.socketConnect(Native Method)
 at java.net.PlainSocketImpl.doConnect(Unknown Source)
 at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
 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.SSLSocketImpl.<init>(Unknown Source)
 at com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(Unknown Source)
 at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:92)
 at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
 at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
 at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
 at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
 at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
 at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
 at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
 at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
 at org.apache.axis.client.Call.invoke(Call.java:2767)
 at org.apache.axis.client.Call.invoke(Call.java:2443)
 at org.apache.axis.client.Call.invoke(Call.java:2366)
 at org.apache.axis.client.Call.invoke(Call.java:1812)
 at com.sforce.soap.enterprise.SoapBindingStub.login(SoapBindingStub.java:3750)
 at com.doc.samples.Samples.login(Samples.java:78)
 at com.doc.samples.Samples.run(Samples.java:318)
 at com.doc.samples.Samples.main(Samples.java:35)

 

Thanks,

Hi,

I am trying to access Salesforce.com using its published webservices.

I have developed the entire code at my home internet connection and it workes fine there (as I didn't have any firewall blokcing there).
Now when I am trying to run the same code here on my company's LAN I am getting the following error: -
       javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

I have set the Proxy settings : -
            System.getProperties().put("proxySet", true);
            System.setProperty("http.proxyHost", <company-proxy>);
            System.setProperty("http.proxyPort", "8080");
            System.setProperty("https.proxyHost", <company-proxy>);
            System.setProperty("https.proxyPort", "8080");
            System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
            Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

I have gone through the previously posted threads regarding the same problem but couldn't get any solution regarding this.

Probably this has something to do with the ssl certificates. But I am not so familier with them and their installation.
I am using Axis1.3's jar files in my project, But I am not running axis server.

I am also able to access other https sites from my program. But not able to login in salesforce.

As my program is running perfect on my home's internet connection I am quite sure that there is something wrong with the proxy setting of my company, please guide me where am I going worng.


Thanks,
Piyush.