Not able to fire queries and generate Symbol table (org.apache.cxf.binding.soap.SoapFault: INVALID_SESSION_ID: This session is not valid for use with the API )

Issue #1982 resolved
Nagendra Singh created an issue

I enabled : trace `#com.illuminatedcloud.client.ForceComApiClient!trace`

Here is the debug log

code

2021-09-22 19:25:52,203 [119124627]   INFO - rationStore.ComponentStoreImpl - Saving Project(name=*****UAAT, containerState=COMPONENT_CREATED, componentStore=/Users/nagendrasingh/IdeaProjects/*****UAAT)IlluminatedCloudWorkspaceSettings took 11 ms 
2021-09-22 19:26:12,591 [119145015]   INFO - lij.diagnostic.DebugLogManager - Set DEBUG for the following categories: #com.illuminatedcloud.client.ForceComApiClient!trace 
2021-09-22 19:26:12,591 [119145015]   INFO - lij.diagnostic.DebugLogManager - Set TRACE for the following categories: #com.jetbrains.rdserver.requests, #com.jetbrains.rd.ide.document, #com.jetbrains.rdserver.document, #com.jetbrains.rdserver.editors, #com.jetbrains.rdserver.actions, #com.jetbrains.rdserver.permissions 
2021-09-22 19:26:14,681 [119147105]   INFO - rationStore.ComponentStoreImpl - Saving appFileTypeManager took 11 ms 
2021-09-22 19:26:34,597 [119167021]   WARN - cloud.client.ForceComApiClient - Logout via partner API failed: org.apache.cxf.binding.soap.SoapFault: INVALID_SESSION_ID: This session is not valid for use with the API 
2021-09-22 19:26:34,602 [119167026]   INFO - y.ReflectionServiceFactoryBean - Creating Service {urn:partner.soap.sforce.com}PartnerService from class com.sforce.soap.partner.PartnerApi 
2021-09-22 19:26:34,614 [119167038]   INFO - rService.PartnerApi.PartnerApi - Outbound Message
---------------------------
ID: 1
Address: https://login.salesforce.com/services/Soap/u/52.0
Encoding: UTF-8
Http-Method: POST
Content-Type: text/xml
Headers: {Accept=[*/*], SOAPAction=[""]}
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><login xmlns="urn:partner.soap.sforce.com" xmlns:ns2="urn:sobject.partner.soap.sforce.com" xmlns:ns3="urn:fault.partner.soap.sforce.com"><username>nagendra.ks@*****.com</username><password>REDACTED</password></login></soap:Body></soap:Envelope>
-------------------------------------- 
2021-09-22 19:26:35,505 [119167929]   INFO - rService.PartnerApi.PartnerApi - Inbound Message
----------------------------
ID: 1
Response-Code: 200
Encoding: UTF-8
Content-Type: text/xml; charset=utf-8
Headers: {Cache-Control=[no-cache,must-revalidate,max-age=0,no-store,private], Content-Length=[1830], content-type=[text/xml; charset=utf-8], Date=[Wed, 22 Sep 2021 13:56:35 GMT], Set-Cookie=[BrowserId=5l1GZBusEeyR-IHO4cM2Ew; domain=.salesforce.com; path=/; expires=Thu, 22-Sep-2022 13:56:35 GMT; Max-Age=31536000], Vary=[Accept-Encoding]}
Payload: <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><loginResponse><result><metadataServerUrl>https://*****prod.my.salesforce.com/services/Soap/m/52.0/00D2w00000*****</metadataServerUrl><passwordExpired>false</passwordExpired><sandbox>false</sandbox><serverUrl>https://*****prod.my.salesforce.com/services/Soap/u/52.0/00D2w00000*****</serverUrl><sessionId>00D2w00000*****!AQ4AQICWAi5HJMUwgs12MY6Z1wemwdvVW3cLbszrRJlfsEc_wMUJ5csf_zaLqJgYG3ztUMJUd7O3l8Kgd43jplSrWt9vHXJG</sessionId><userId>0055i000000YOs1AAG</userId><userInfo><accessibilityMode>false</accessibilityMode><chatterExternal>false</chatterExternal><currencySymbol>₹</currencySymbol><orgAttachmentFileSizeLimit>5242880</orgAttachmentFileSizeLimit><orgDefaultCurrencyIsoCode>INR</orgDefaultCurrencyIsoCode><orgDefaultCurrencyLocale>en_IN</orgDefaultCurrencyLocale><orgDisallowHtmlAttachments>false</orgDisallowHtmlAttachments><orgHasPersonAccounts>true</orgHasPersonAccounts><organizationId>00D2w00000*****EAE</organizationId><organizationMultiCurrency>false</organizationMultiCurrency><organizationName>Think &amp; Learn PVT Ltd</organizationName><profileId>00e2w000003A5qrAAC</profileId><roleId xsi:nil="true"/><sessionSecondsValid>7200</sessionSecondsValid><userDefaultCurrencyIsoCode xsi:nil="true"/><userEmail>nagendra.ks@*****.com</userEmail><userFullName>Nagendra Singh</userFullName><userId>0055i000000YOs1AAG</userId><userLanguage>en_US</userLanguage><userLocale>en_US</userLocale><userName>nagendra.ks@*****.com</userName><userTimeZone>Asia/Kolkata</userTimeZone><userType>Standard</userType><userUiSkin>Theme3</userUiSkin></userInfo></result></loginResponse></soapenv:Body></soapenv:Envelope>
-------------------------------------- 
2021-09-22 19:26:35,506 [119167930]   INFO - cloud.client.ForceComApiClient - Login successful for connection '*****Prod'. 
2021-09-22 19:26:35,506 [119167930]   INFO - y.ReflectionServiceFactoryBean - Creating Service {urn:partner.soap.sforce.com}PartnerService from class com.sforce.soap.partner.PartnerApi 
2021-09-22 19:26:35,511 [119167935]   INFO - rService.PartnerApi.PartnerApi - Outbound Message
---------------------------
ID: 2
Address: https://*****prod.my.salesforce.com/services/Soap/u/52.0/00D2w00000*****
Encoding: UTF-8
Http-Method: POST
Content-Type: text/xml
Headers: {Accept=[*/*], SOAPAction=[""]}
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><SessionHeader xmlns:ns2="urn:sobject.partner.soap.sforce.com" xmlns="urn:partner.soap.sforce.com"><sessionId>00D2w00000*****!AQ4AQICWAi5HJMUwgs12MY6Z1wemwdvVW3cLbszrRJlfsEc_wMUJ5csf_zaLqJgYG3ztUMJUd7O3l8Kgd43jplSrWt9vHXJG</sessionId></SessionHeader><CallOptions xmlns:ns2="urn:sobject.partner.soap.sforce.com" xmlns="urn:partner.soap.sforce.com"><client>IlluminatedCloud</client><defaultNamespace xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><returnFieldDataTypes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><debugExceptions>false</debugExceptions></CallOptions></soap:Header><soap:Body><query xmlns="urn:partner.soap.sforce.com" xmlns:ns2="urn:sobject.partner.soap.sforce.com" xmlns:ns3="urn:fault.partner.soap.sforce.com"><queryString>SELECT Id From Account LIMIT 1</queryString></query></soap:Body></soap:Envelope>
-------------------------------------- 
2021-09-22 19:26:36,244 [119168668]   INFO - rService.PartnerApi.PartnerApi - Inbound Message
----------------------------
ID: 2
Response-Code: 500
Encoding: UTF-8
Content-Type: text/xml; charset=utf-8
Headers: {Cache-Control=[no-cache,must-revalidate,max-age=0,no-store,private], content-type=[text/xml; charset=utf-8], Date=[Wed, 22 Sep 2021 13:56:36 GMT], Set-Cookie=[BrowserId=5tz97BusEeyUDHG2VEzGkQ; domain=.salesforce.com; path=/; expires=Thu, 22-Sep-2022 13:56:36 GMT; Max-Age=31536000], transfer-encoding=[chunked]}
Payload: <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>sf:INVALID_SESSION_ID</faultcode><faultstring>INVALID_SESSION_ID: This session is not valid for use with the API</faultstring><detail><sf:UnexpectedErrorFault xsi:type="sf:UnexpectedErrorFault"><sf:exceptionCode>INVALID_SESSION_ID</sf:exceptionCode><sf:exceptionMessage>This session is not valid for use with the API</sf:exceptionMessage></sf:UnexpectedErrorFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>
-------------------------------------- 
2021-09-22 19:26:36,247 [119168671]   INFO - rService.PartnerApi.PartnerApi - Outbound Message
---------------------------
ID: 3
Address: https://*****prod.my.salesforce.com/services/Soap/u/52.0/00D2w00000*****
Encoding: UTF-8
Http-Method: POST
Content-Type: text/xml
Headers: {Accept=[*/*], SOAPAction=[""]}
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><SessionHeader xmlns:ns2="urn:sobject.partner.soap.sforce.com" xmlns="urn:partner.soap.sforce.com"><sessionId>00D2w00000*****!AQ4AQICWAi5HJMUwgs12MY6Z1wemwdvVW3cLbszrRJlfsEc_wMUJ5csf_zaLqJgYG3ztUMJUd7O3l8Kgd43jplSrWt9vHXJG</sessionId></SessionHeader><CallOptions xmlns:ns2="urn:sobject.partner.soap.sforce.com" xmlns="urn:partner.soap.sforce.com"><client>IlluminatedCloud</client><defaultNamespace xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><returnFieldDataTypes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><debugExceptions>false</debugExceptions></CallOptions></soap:Header><soap:Body><logout xmlns="urn:partner.soap.sforce.com" xmlns:ns2="urn:sobject.partner.soap.sforce.com" xmlns:ns3="urn:fault.partner.soap.sforce.com"/></soap:Body></soap:Envelope>
-------------------------------------- 
2021-09-22 19:26:36,430 [119168854]   INFO - rService.PartnerApi.PartnerApi - Inbound Message
----------------------------
ID: 3
Response-Code: 500
Encoding: UTF-8
Content-Type: text/xml; charset=utf-8
Headers: {Cache-Control=[no-cache,must-revalidate,max-age=0,no-store,private], content-type=[text/xml; charset=utf-8], Date=[Wed, 22 Sep 2021 13:56:36 GMT], Set-Cookie=[BrowserId=5vn7txusEeyh788-gWc4bA; domain=.salesforce.com; path=/; expires=Thu, 22-Sep-2022 13:56:36 GMT; Max-Age=31536000], transfer-encoding=[chunked]}
Payload: <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>sf:INVALID_SESSION_ID</faultcode><faultstring>INVALID_SESSION_ID: This session is not valid for use with the API</faultstring><detail><sf:UnexpectedErrorFault xsi:type="sf:UnexpectedErrorFault"><sf:exceptionCode>INVALID_SESSION_ID</sf:exceptionCode><sf:exceptionMessage>This session is not valid for use with the API</sf:exceptionMessage></sf:UnexpectedErrorFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>
-------------------------------------- 
2021-09-22 19:26:36,433 [119168857]   WARN - cloud.client.ForceComApiClient - Logout via partner API failed: org.apache.cxf.binding.soap.SoapFault: INVALID_SESSION_ID: This session is not valid for use with the API 
2021-09-22 19:26:36,435 [119168859]   INFO - y.ReflectionServiceFactoryBean - Creating Service {urn:partner.soap.sforce.com}PartnerService from class com.sforce.soap.partner.PartnerApi 
2021-09-22 19:26:36,444 [119168868]   INFO - rService.PartnerApi.PartnerApi - Outbound Message
---------------------------
ID: 4
Address: https://login.salesforce.com/services/Soap/u/52.0
Encoding: UTF-8
Http-Method: POST
Content-Type: text/xml
Headers: {Accept=[*/*], SOAPAction=[""]}
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><login xmlns="urn:partner.soap.sforce.com" xmlns:ns2="urn:sobject.partner.soap.sforce.com" xmlns:ns3="urn:fault.partner.soap.sforce.com"><username>nagendra.ks@*****.com</username><password>REDACTED</password></login></soap:Body></soap:Envelope>
-------------------------------------- 
2021-09-22 19:26:37,325 [119169749]   INFO - rService.PartnerApi.PartnerApi - Inbound Message
----------------------------
ID: 4
Response-Code: 200
Encoding: UTF-8
Content-Type: text/xml; charset=utf-8
Headers: {Cache-Control=[no-cache,must-revalidate,max-age=0,no-store,private], Content-Length=[1830], content-type=[text/xml; charset=utf-8], Date=[Wed, 22 Sep 2021 13:56:37 GMT], Set-Cookie=[BrowserId=53A8xxusEey0ed2M01HZqg; domain=.salesforce.com; path=/; expires=Thu, 22-Sep-2022 13:56:37 GMT; Max-Age=31536000], Vary=[Accept-Encoding]}
Payload: <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><loginResponse><result><metadataServerUrl>https://*****prod.my.salesforce.com/services/Soap/m/52.0/00D2w00000*****</metadataServerUrl><passwordExpired>false</passwordExpired><sandbox>false</sandbox><serverUrl>https://*****prod.my.salesforce.com/services/Soap/u/52.0/00D2w00000*****</serverUrl><sessionId>00D2w00000*****!AQ4AQICWAi5HJMUwgs12MY6Z1wemwdvVW3cLbszrRJlfsEc_wMUJ5csf_zaLqJgYG3ztUMJUd7O3l8Kgd43jplSrWt9vHXJG</sessionId><userId>0055i000000YOs1AAG</userId><userInfo><accessibilityMode>false</accessibilityMode><chatterExternal>false</chatterExternal><currencySymbol>₹</currencySymbol><orgAttachmentFileSizeLimit>5242880</orgAttachmentFileSizeLimit><orgDefaultCurrencyIsoCode>INR</orgDefaultCurrencyIsoCode><orgDefaultCurrencyLocale>en_IN</orgDefaultCurrencyLocale><orgDisallowHtmlAttachments>false</orgDisallowHtmlAttachments><orgHasPersonAccounts>true</orgHasPersonAccounts><organizationId>00D2w00000*****EAE</organizationId><organizationMultiCurrency>false</organizationMultiCurrency><organizationName>Think &amp; Learn PVT Ltd</organizationName><profileId>00e2w000003A5qrAAC</profileId><roleId xsi:nil="true"/><sessionSecondsValid>7200</sessionSecondsValid><userDefaultCurrencyIsoCode xsi:nil="true"/><userEmail>nagendra.ks@*****.com</userEmail><userFullName>Nagendra Singh</userFullName><userId>0055i000000YOs1AAG</userId><userLanguage>en_US</userLanguage><userLocale>en_US</userLocale><userName>nagendra.ks@*****.com</userName><userTimeZone>Asia/Kolkata</userTimeZone><userType>Standard</userType><userUiSkin>Theme3</userUiSkin></userInfo></result></loginResponse></soapenv:Body></soapenv:Envelope>
-------------------------------------- 
2021-09-22 19:26:37,325 [119169749]   INFO - cloud.client.ForceComApiClient - Login successful for connection '*****Prod'. 
2021-09-22 19:26:37,326 [119169750]   INFO - y.ReflectionServiceFactoryBean - Creating Service {urn:partner.soap.sforce.com}PartnerService from class com.sforce.soap.partner.PartnerApi 
2021-09-22 19:26:37,332 [119169756]   INFO - rService.PartnerApi.PartnerApi - Outbound Message
---------------------------
ID: 5
Address: https://*****prod.my.salesforce.com/services/Soap/u/52.0/00D2w00000*****
Encoding: UTF-8
Http-Method: POST
Content-Type: text/xml
Headers: {Accept=[*/*], SOAPAction=[""]}
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><SessionHeader xmlns:ns2="urn:sobject.partner.soap.sforce.com" xmlns="urn:partner.soap.sforce.com"><sessionId>00D2w00000*****!AQ4AQICWAi5HJMUwgs12MY6Z1wemwdvVW3cLbszrRJlfsEc_wMUJ5csf_zaLqJgYG3ztUMJUd7O3l8Kgd43jplSrWt9vHXJG</sessionId></SessionHeader><CallOptions xmlns:ns2="urn:sobject.partner.soap.sforce.com" xmlns="urn:partner.soap.sforce.com"><client>IlluminatedCloud</client><defaultNamespace xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><returnFieldDataTypes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><debugExceptions>false</debugExceptions></CallOptions></soap:Header><soap:Body><query xmlns="urn:partner.soap.sforce.com" xmlns:ns2="urn:sobject.partner.soap.sforce.com" xmlns:ns3="urn:fault.partner.soap.sforce.com"><queryString>SELECT Id From Account LIMIT 1</queryString></query></soap:Body></soap:Envelope>
-------------------------------------- 
2021-09-22 19:26:38,081 [119170505]   INFO - rService.PartnerApi.PartnerApi - Inbound Message
----------------------------
ID: 5
Response-Code: 500
Encoding: UTF-8
Content-Type: text/xml; charset=utf-8
Headers: {Cache-Control=[no-cache,must-revalidate,max-age=0,no-store,private], content-type=[text/xml; charset=utf-8], Date=[Wed, 22 Sep 2021 13:56:38 GMT], Set-Cookie=[BrowserId=5_SuqxusEeyWFFEwfkCN-g; domain=.salesforce.com; path=/; expires=Thu, 22-Sep-2022 13:56:38 GMT; Max-Age=31536000], transfer-encoding=[chunked]}
Payload: <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>sf:INVALID_SESSION_ID</faultcode><faultstring>INVALID_SESSION_ID: This session is not valid for use with the API</faultstring><detail><sf:UnexpectedErrorFault xsi:type="sf:UnexpectedErrorFault"><sf:exceptionCode>INVALID_SESSION_ID</sf:exceptionCode><sf:exceptionMessage>This session is not valid for use with the API</sf:exceptionMessage></sf:UnexpectedErrorFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>
-------------------------------------- 
2021-09-22 19:26:38,083 [119170507]   INFO - rService.PartnerApi.PartnerApi - Outbound Message
---------------------------
ID: 6
Address: https://*****prod.my.salesforce.com/services/Soap/u/52.0/00D2w00000*****
Encoding: UTF-8
Http-Method: POST
Content-Type: text/xml
Headers: {Accept=[*/*], SOAPAction=[""]}
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><SessionHeader xmlns:ns2="urn:sobject.partner.soap.sforce.com" xmlns="urn:partner.soap.sforce.com"><sessionId>00D2w00000*****!AQ4AQICWAi5HJMUwgs12MY6Z1wemwdvVW3cLbszrRJlfsEc_wMUJ5csf_zaLqJgYG3ztUMJUd7O3l8Kgd43jplSrWt9vHXJG</sessionId></SessionHeader><CallOptions xmlns:ns2="urn:sobject.partner.soap.sforce.com" xmlns="urn:partner.soap.sforce.com"><client>IlluminatedCloud</client><defaultNamespace xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><returnFieldDataTypes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><debugExceptions>false</debugExceptions></CallOptions></soap:Header><soap:Body><logout xmlns="urn:partner.soap.sforce.com" xmlns:ns2="urn:sobject.partner.soap.sforce.com" xmlns:ns3="urn:fault.partner.soap.sforce.com"/></soap:Body></soap:Envelope>
-------------------------------------- 
2021-09-22 19:26:38,277 [119170701]   INFO - rService.PartnerApi.PartnerApi - Inbound Message
----------------------------
ID: 6
Response-Code: 500
Encoding: UTF-8
Content-Type: text/xml; charset=utf-8
Headers: {Cache-Control=[no-cache,must-revalidate,max-age=0,no-store,private], content-type=[text/xml; charset=utf-8], Date=[Wed, 22 Sep 2021 13:56:38 GMT], Set-Cookie=[BrowserId=6BH7YBusEeyiciHk2pKvDA; domain=.salesforce.com; path=/; expires=Thu, 22-Sep-2022 13:56:38 GMT; Max-Age=31536000], transfer-encoding=[chunked]}
Payload: <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>sf:INVALID_SESSION_ID</faultcode><faultstring>INVALID_SESSION_ID: This session is not valid for use with the API</faultstring><detail><sf:UnexpectedErrorFault xsi:type="sf:UnexpectedErrorFault"><sf:exceptionCode>INVALID_SESSION_ID</sf:exceptionCode><sf:exceptionMessage>This session is not valid for use with the API</sf:exceptionMessage></sf:UnexpectedErrorFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>
-------------------------------------- 
2021-09-22 19:26:38,278 [119170702]   WARN - cloud.client.ForceComApiClient - Logout via partner API failed: org.apache.cxf.binding.soap.SoapFault: INVALID_SESSION_ID: This session is not valid for use with the API 
2021-09-22 19:26:38,280 [119170704]   INFO - y.ReflectionServiceFactoryBean - Creating Service {urn:partner.soap.sforce.com}PartnerService from class com.sforce.soap.partner.PartnerApi 
2021-09-22 19:26:38,286 [119170710]   INFO - rService.PartnerApi.PartnerApi - Outbound Message
---------------------------
ID: 7
Address: https://login.salesforce.com/services/Soap/u/52.0
Encoding: UTF-8
Http-Method: POST
Content-Type: text/xml
Headers: {Accept=[*/*], SOAPAction=[""]}
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><login xmlns="urn:partner.soap.sforce.com" xmlns:ns2="urn:sobject.partner.soap.sforce.com" xmlns:ns3="urn:fault.partner.soap.sforce.com"><username>nagendra.ks@*****.com</username><password>REDACTED</password></login></soap:Body></soap:Envelope>
-------------------------------------- 
2021-09-22 19:26:39,103 [119171527]   INFO - rService.PartnerApi.PartnerApi - Inbound Message
----------------------------
ID: 7
Response-Code: 200
Encoding: UTF-8
Content-Type: text/xml; charset=utf-8
Headers: {Cache-Control=[no-cache,must-revalidate,max-age=0,no-store,private], Content-Length=[1830], content-type=[text/xml; charset=utf-8], Date=[Wed, 22 Sep 2021 13:56:39 GMT], Set-Cookie=[BrowserId=6IK-txusEeyFxolt2YKRJQ; domain=.salesforce.com; path=/; expires=Thu, 22-Sep-2022 13:56:39 GMT; Max-Age=31536000], Vary=[Accept-Encoding]}
Payload: <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><loginResponse><result><metadataServerUrl>https://*****prod.my.salesforce.com/services/Soap/m/52.0/00D2w00000*****</metadataServerUrl><passwordExpired>false</passwordExpired><sandbox>false</sandbox><serverUrl>https://*****prod.my.salesforce.com/services/Soap/u/52.0/00D2w00000*****</serverUrl><sessionId>00D2w00000*****!AQ4AQICWAi5HJMUwgs12MY6Z1wemwdvVW3cLbszrRJlfsEc_wMUJ5csf_zaLqJgYG3ztUMJUd7O3l8Kgd43jplSrWt9vHXJG</sessionId><userId>0055i000000YOs1AAG</userId><userInfo><accessibilityMode>false</accessibilityMode><chatterExternal>false</chatterExternal><currencySymbol>₹</currencySymbol><orgAttachmentFileSizeLimit>5242880</orgAttachmentFileSizeLimit><orgDefaultCurrencyIsoCode>INR</orgDefaultCurrencyIsoCode><orgDefaultCurrencyLocale>en_IN</orgDefaultCurrencyLocale><orgDisallowHtmlAttachments>false</orgDisallowHtmlAttachments><orgHasPersonAccounts>true</orgHasPersonAccounts><organizationId>00D2w00000*****EAE</organizationId><organizationMultiCurrency>false</organizationMultiCurrency><organizationName>Think &amp; Learn PVT Ltd</organizationName><profileId>00e2w000003A5qrAAC</profileId><roleId xsi:nil="true"/><sessionSecondsValid>7200</sessionSecondsValid><userDefaultCurrencyIsoCode xsi:nil="true"/><userEmail>nagendra.ks@*****.com</userEmail><userFullName>Nagendra Singh</userFullName><userId>0055i000000YOs1AAG</userId><userLanguage>en_US</userLanguage><userLocale>en_US</userLocale><userName>nagendra.ks@*****.com</userName><userTimeZone>Asia/Kolkata</userTimeZone><userType>Standard</userType><userUiSkin>Theme3</userUiSkin></userInfo></result></loginResponse></soapenv:Body></soapenv:Envelope>
-------------------------------------- 
2021-09-22 19:26:39,104 [119171528]   INFO - cloud.client.ForceComApiClient - Login successful for connection '*****Prod'. 
2021-09-22 19:26:39,104 [119171528]   INFO - y.ReflectionServiceFactoryBean - Creating Service {urn:partner.soap.sforce.com}PartnerService from class com.sforce.soap.partner.PartnerApi 
2021-09-22 19:26:39,111 [119171535]   INFO - rService.PartnerApi.PartnerApi - Outbound Message
---------------------------
ID: 8
Address: https://*****prod.my.salesforce.com/services/Soap/u/52.0/00D2w00000*****
Encoding: UTF-8
Http-Method: POST
Content-Type: text/xml
Headers: {Accept=[*/*], SOAPAction=[""]}
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><SessionHeader xmlns:ns2="urn:sobject.partner.soap.sforce.com" xmlns="urn:partner.soap.sforce.com"><sessionId>00D2w00000*****!AQ4AQICWAi5HJMUwgs12MY6Z1wemwdvVW3cLbszrRJlfsEc_wMUJ5csf_zaLqJgYG3ztUMJUd7O3l8Kgd43jplSrWt9vHXJG</sessionId></SessionHeader><CallOptions xmlns:ns2="urn:sobject.partner.soap.sforce.com" xmlns="urn:partner.soap.sforce.com"><client>IlluminatedCloud</client><defaultNamespace xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><returnFieldDataTypes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><debugExceptions>false</debugExceptions></CallOptions></soap:Header><soap:Body><query xmlns="urn:partner.soap.sforce.com" xmlns:ns2="urn:sobject.partner.soap.sforce.com" xmlns:ns3="urn:fault.partner.soap.sforce.com"><queryString>SELECT Id From Account LIMIT 1</queryString></query></soap:Body></soap:Envelope>
-------------------------------------- 
2021-09-22 19:26:39,780 [119172204]   INFO - rService.PartnerApi.PartnerApi - Inbound Message
----------------------------
ID: 8
Response-Code: 500
Encoding: UTF-8
Content-Type: text/xml; charset=utf-8
Headers: {Cache-Control=[no-cache,must-revalidate,max-age=0,no-store,private], content-type=[text/xml; charset=utf-8], Date=[Wed, 22 Sep 2021 13:56:39 GMT], Set-Cookie=[BrowserId=6PixqBusEeyOcwc3mvylIA; domain=.salesforce.com; path=/; expires=Thu, 22-Sep-2022 13:56:39 GMT; Max-Age=31536000], transfer-encoding=[chunked]}
Payload: <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>sf:INVALID_SESSION_ID</faultcode><faultstring>INVALID_SESSION_ID: This session is not valid for use with the API</faultstring><detail><sf:UnexpectedErrorFault xsi:type="sf:UnexpectedErrorFault"><sf:exceptionCode>INVALID_SESSION_ID</sf:exceptionCode><sf:exceptionMessage>This session is not valid for use with the API</sf:exceptionMessage></sf:UnexpectedErrorFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>
-------------------------------------- 

Comments (7)

  1. Scott Wells repo owner

    Thanks for the detailed logs. Whatever is going on, it seems to be an issue in the Salesforce API. The login call succeeds and issues a new session ID of 00D2w00000*****!AQ4AQICWAi5HJMUwgs12MY6Z1wemwdvVW3cLbszrRJlfsEc_wMUJ5csf_zaLqJgYG3ztUMJUd7O3l8Kgd43jplSrWt9vHXJG:

    Request

    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
        <soap:Body>
            <login xmlns="urn:partner.soap.sforce.com" xmlns:ns2="urn:sobject.partner.soap.sforce.com" xmlns:ns3="urn:fault.partner.soap.sforce.com">
                <username>REDACTED</username>
                <password>REDACTED</password>
            </login>
        </soap:Body>
    </soap:Envelope>
    

    Response (truncated)

    <?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <soapenv:Body>
            <loginResponse>
                <result>
                    ...
                    <sessionId>00D2w00000*****!AQ4AQICWAi5HJMUwgs12MY6Z1wemwdvVW3cLbszrRJlfsEc_wMUJ5csf_zaLqJgYG3ztUMJUd7O3l8Kgd43jplSrWt9vHXJG</sessionId>
                    ...
                </result>
            </loginResponse>
        </soapenv:Body>
    </soapenv:Envelope>
    

    and then immediately after that, it tries to use that session ID to run a query, but the request is rejected saying it's an invalid session ID:

    Request (truncated)

    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
        <soap:Header>
            <SessionHeader xmlns:ns2="urn:sobject.partner.soap.sforce.com" xmlns="urn:partner.soap.sforce.com">
                <sessionId>00D2w00000*****!AQ4AQICWAi5HJMUwgs12MY6Z1wemwdvVW3cLbszrRJlfsEc_wMUJ5csf_zaLqJgYG3ztUMJUd7O3l8Kgd43jplSrWt9vHXJG</sessionId>
            </SessionHeader>
            ...
        </soap:Header>
        <soap:Body>
            <query xmlns="urn:partner.soap.sforce.com" xmlns:ns2="urn:sobject.partner.soap.sforce.com" xmlns:ns3="urn:fault.partner.soap.sforce.com">
                <queryString>SELECT Id From Account LIMIT 1</queryString>
            </query>
        </soap:Body>
    </soap:Envelope>
    

    Response

    <?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <soapenv:Body>
            <soapenv:Fault>
                <faultcode>sf:INVALID_SESSION_ID</faultcode>
                <faultstring>INVALID_SESSION_ID: This session is not valid for use with the API</faultstring>
                <detail>
                    <sf:UnexpectedErrorFault xsi:type="sf:UnexpectedErrorFault">
                        <sf:exceptionCode>INVALID_SESSION_ID</sf:exceptionCode>
                        <sf:exceptionMessage>This session is not valid for use with the API</sf:exceptionMessage>
                    </sf:UnexpectedErrorFault>
                </detail>
            </soapenv:Fault>
        </soapenv:Body>
    </soapenv:Envelope>
    

    Unfortunately whatever is happening is not under IC2's control as it's doing exactly what it's supposed to do...using login to get a valid session ID, then using that session ID to authenticate subsequent requests.

    I can think of two things to try. First, go into the org itself and in Setup > Security > Session Management, remove all active sessions...or at least remove the one(s) from IC2 authenticating. Then restart the IDE and IC2 will reauthenticate, hopefully resulting in a new session ID with the server.

    If that doesn't work--and I don't know whether it will because I don't understand cause of the underlying issue--the other option would be to change from using a native IC2 connection to an OAuth connection created/managed by the Salesforce CLI. That will use an OAuth access token instead of a raw session ID.

    Please let me know if that doesn't help.

  2. Scott Wells repo owner

    Also note that your original logs included you raw password because of how trace logging works. I've changed those to REDACTED, but I recommend that you update your password anywhere you use that one since it was included in a posting to a public issue tracker, even if only for a very short period of time.

  3. Nagendra Singh reporter

    Yes I changed it to CLI command and it worked. Even I am not sure why UserName and Pass did not work, maybe because it direct production.

    Thanks for the suggestion.

  4. Scott Wells repo owner

    Okay, glad to hear. Native connections to a production org should be fine. Perhaps there's some way to configure a user (or profile?) so that raw API sessions aren't allowed? If so, that'd certainly be news to me, and I'm not sure how the server would differentiate between a call to the login API and OAuth. But anyway, glad you're good to go now.

  5. Log in to comment