I am using Salesforce API version 39 to generate partner jar using wsc-22.jar

My project is deployed on JDK1.6.0_45, so i also wanted make my salesforce code compatible to JDK 1.6.

I run some sample login code to test LOGIN on salesforce setup, It is working perfectly fine with JDK 1.8 but giving following exception when i run on JDK 1.6

com.sforce.ws.ConnectionException: Failed to parse detail:  START_TAG seen ...</sf:exceptionMessage><sf:upgradeURL>... @1:752 due to: com.sforce.ws.ConnectionException: unable to find end tag at:  START_TAG seen ...</sf:exceptionMessage><sf:upgradeURL>... @1:752
    at com.sforce.ws.transport.SoapConnection.parseDetail(SoapConnection.java:237)
    at com.sforce.ws.transport.SoapConnection.createException(SoapConnection.java:203)
    at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:149)
    at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:98)
    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)

I have also seen similar question asked on this community but it does not help me.

Sample code:

import com.sforce.soap.partner.Connector;
import com.sforce.soap.partner.GetUserInfoResult;
import com.sforce.soap.partner.PartnerConnection;
import com.sforce.ws.ConnectionException;
import com.sforce.ws.ConnectorConfig;

public class Main
    public static void main(String[] args)
           String username = "";
           String password = "";
           String authEndPoint = "https://test.salesforce.com/services/Soap/u/39";

           try {
              ConnectorConfig config = new ConnectorConfig();

              System.out.println("AuthEndPoint: " + authEndPoint);

              PartnerConnection connection =Connector.newConnection(config);

              // Print user and session info
              GetUserInfoResult userInfo = connection.getUserInfo();
              System.out.println("UserID: " + userInfo.getUserId());
              System.out.println("User Full Name: " + userInfo.getUserFullName());
              System.out.println("User Email: " + userInfo.getUserEmail());
              System.out.println("SessionID: " + config.getSessionId());
              System.out.println("Auth End Point: " + config.getAuthEndpoint());
                    .println("Service End Point: " + config.getServiceEndpoint());

           } catch (ConnectionException ce) {

  • Rings a bell on TLS1.1 issue. Have you tried adding the JVM parameter of -Dhttps.protocols=TLSv1.1,TLSv1.2 ? – TSmith Mar 8 '17 at 11:57
  • yup, I have tried this already but still giving same problem. – PVR Mar 8 '17 at 12:00
  • Actually when i tried to set that property it gives, Exception in thread "main" java.lang.IllegalArgumentException: TLSv1.1. And in jdk 1.6 they have given support of TLSv1.1 in Update 111. But it is not publically available. :-( – PVR Mar 8 '17 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.