function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DinkarDinkar 

Invalid Session id error

Hi,

 

I am new to this platform and having some wierd troubles and a hard time debugging it.

 

I am attempting to invoke the web service API of an AppExchange application whose WSDL has been provided to me.

 

I am using enterprise WSDL API to login and then switching the end point to the AppExchange WSDL URL.

 

all the service end points are being picked up from the WSDLs however, my java client runs fine on local machine but when I deploy it as a custom component in LiveCycle, I am getting this error:

 

com.sforce.ws.ConnectionException: Failed to send request to https://cs1-api.salesforce.com/services/Soap/c/22.0/00DS00000001RG1/0DFS00000008Rtd

 

Caused by: javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.g: PKIX path building failed: java.security.cert.CertPathBuilderException: PKIXCertPathBuilderImpl could not build a valid CertPath.; internal cause is:
    java.security.cert.CertPathValidatorException: The certificate issued by OU=Class 3 Public Primary Certification Authority, O="VeriSign, Inc.", C=US is not trusted; internal cause is:
    java.security.cert.CertPathValidatorException: Certificate chaining error

 

I tried installing certificates on the server end but it didnt help. Then I realized when I am printing the authendpoint and service end point, they are different host names... auth being https://test.salesforce.com/services/Soap/c/22.0/0DFS00000008Rtd and service being https://cs1-api.salesforce.com/services/Soap/c/22.0/00DS00000001RG1/0DFS00000008Rtd

 

The service end point for the AppExchange app is https://cs1-api.salesforce.com/services/Soap/class/MyApp which when set was throwing the aforementioned error.

 

So I tried changing the host name from cs1-api.salesforce.com to test.salesforce.com expecting it to work fine.

 

But now I am getting a different error that too intermittently saying:

 

com.sforce.ws.SoapFaultException: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session key:

 

and sometimes I am getting this error:

UnexpectedErrorFault [ApiFault  exceptionCode='UNKNOWN_EXCEPTION'
 exceptionMessage='Destination URL not reset. The URL returned from login must be set in the SforceService'

 

I am totally confused and dont know what to do. Here is a code snippet I am using:

 

ConnectorConfig config = new ConnectorConfig();
config.setUsername(USERNAME);
config.setPassword(PASSWORD);

connection = Connector.newConnection(config);

//Change service end point to call my app
config.setServiceEndpoint(myAppEndPoint);
SoapConnection sc = new SoapConnection(config);

String retval = sc.callMyMethod();


Regards

D

 

Best Answer chosen by Admin (Salesforce Developers) 
SuperfellSuperfell

You're missing one or more verisign root certificates, you can get them from http://www.verisign.com/support/roots.html

All Answers

SuperfellSuperfell

Your first error is the correct problem, you can only send login requests to test.salesforce.com, the subsequent requests need to goto the cs1-api... url. Your server setup seems to be missing some root certificates, you need to fix that.

DinkarDinkar

Hi Simon,

 

Thanks for your response. Our LiveCycle server uses WebSphere as the underlying J2EE server architecture. Where do we get this certificate to install into WebSphere so as to solve this issue?

 

I tried installing a certificate which was named as proxy.salesforce.com but the URL was showing the CN as cs1-api.salesforce.com.

 

Is this correct or do I need to get the certificate from somewhere else?

 

Any more details will be greatly appreciated.

 

Regards

D

SuperfellSuperfell

You're missing one or more verisign root certificates, you can get them from http://www.verisign.com/support/roots.html

This was selected as the best answer
DinkarDinkar

Thanks Simon,

 

I was able to rectify this error once we installed the required root certificate.

 

Appreciate your help regarding this. Thanks a lot.

 

Regards

Dinkar

SFDC WebService DeveloperSFDC WebService Developer

Hi,

 

How to install certificates? is it for desktop or for salesforce instance...am gettin the fallowing error INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session key: 00DU0000000H8Zk!AQUAQDEsBJBZynJmBlAV_vSkQ1qDG9WSaOu.wC7lyj7.lrpkxc4JgBN1S_BEDZGix3iFiQmh1fTPcPvDhVUM3INItGOkQqr9

BNG Holdings IncBNG Holdings Inc

What is this verisign root thing. Why doesn't the API talk about it? Why do I need it? How do I use it? I'm so lost...

RkripsRkrips

HI,

 

Can you pl provide some details how you were able to rectify error, even I am facing similar issue

 

com.sforce.ws.ConnectionException: Failed to send request to https://login.salesforce.com/services/S
oap/c/24.0

 

Caused by: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.I
nvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty