title: Could not get HttpClient cache - No ThreadContext available for thread id=1
body: <p>I'm working on upgrading our service to use 3.63.0 (upgrading from 3.57.0) and I've noticed the following warning (with stack trace) shows up in the logs that wasn't there on the previous version:</p>
  <pre><code>2022-02-18 14:03:41.038  WARN 1088 --- [           main] c.s.c.s.c.c.AbstractHttpClientCache      : Could not get HttpClient cache.
  
  com.sap.cloud.sdk.cloudplatform.thread.exception.ThreadContextAccessException: No ThreadContext available for thread id=1.
      at com.sap.cloud.sdk.cloudplatform.thread.ThreadLocalThreadContextFacade.lambda$tryGetCurrentContext$0(ThreadLocalThreadContextFacade.java:39) ~[cloudplatform-core-3.63.0.jar:na]
      at io.vavr.Value.toTry(Value.java:1414) ~[vavr-0.10.4.jar:na]
      at com.sap.cloud.sdk.cloudplatform.thread.ThreadLocalThreadContextFacade.tryGetCurrentContext(ThreadLocalThreadContextFacade.java:37) ~[cloudplatform-core-3.63.0.jar:na]
      at io.vavr.control.Try.flatMapTry(Try.java:490) ~[vavr-0.10.4.jar:na]
      at io.vavr.control.Try.flatMap(Try.java:472) ~[vavr-0.10.4.jar:na]
      at com.sap.cloud.sdk.cloudplatform.thread.ThreadContextAccessor.tryGetCurrentContext(ThreadContextAccessor.java:84) ~[cloudplatform-core-3.63.0.jar:na]
      at com.sap.cloud.sdk.cloudplatform.connectivity.RequestScopedHttpClientCache.getCache(RequestScopedHttpClientCache.java:28) ~[cloudplatform-connectivity-3.63.0.jar:na]
      at com.sap.cloud.sdk.cloudplatform.connectivity.AbstractHttpClientCache.tryGetOrCreateHttpClient(AbstractHttpClientCache.java:78) ~[cloudplatform-connectivity-3.63.0.jar:na]
      at com.sap.cloud.sdk.cloudplatform.connectivity.AbstractHttpClientCache.tryGetHttpClient(AbstractHttpClientCache.java:46) ~[cloudplatform-connectivity-3.63.0.jar:na]
      at com.sap.cloud.sdk.cloudplatform.connectivity.HttpClientAccessor.tryGetHttpClient(HttpClientAccessor.java:153) ~[cloudplatform-connectivity-3.63.0.jar:na]
      at com.sap.cloud.sdk.cloudplatform.connectivity.HttpClientAccessor.getHttpClient(HttpClientAccessor.java:131) ~[cloudplatform-connectivity-3.63.0.jar:na]
      at com.octanner.mca.service.MarketingCloudApiContactService.uploadContacts(MarketingCloudApiContactService.java:138) ~[classes/:na]
      ...
  </code></pre>
  <p>This happens when the following calls are made...</p>
  <h4>Using the lower level API</h4>
  <pre><code>HttpClient httpClient = HttpClientAccessor.getHttpClient(destination); // warning happens here
  ODataRequestResultMultipartGeneric batchResult = requestBatch.execute(httpClient);
  </code></pre>
  <h4>Using the higher level API</h4>
  <pre><code>service
    .getAllContactOriginData()
    .withQueryParameter(&quot;$expand&quot;, &quot;AdditionalIDs&quot;)
    .top(size)
    .filter(filter)
    .executeRequest(destination)); // warning happens here
  </code></pre>
  <p>Even though this warning shows up in the logs the service requests do continue to work as expected. It's just a little concerning to see this and I'm wondering if maybe I have something misconfigured. I reviewed all of the <a href="https://sap.github.io/cloud-sdk/docs/java/getting-started" rel="nofollow noreferrer">java docs</a> and the <a href="https://sap.github.io/cloud-sdk/docs/java/sdk-java-troubleshooting-frequent-problems" rel="nofollow noreferrer">troubleshooting page</a> and didn't see anything out of the ordinary other than how I am fetching my destination, but even using the <code>DestinationAccessor</code> didn't seem to make a difference. Also, I'm not doing any asynchronous or multi-tenant processing.</p>
  <p>Any help you or guidance you can give on this would be appreciated!</p>
  <p>Cheers!</p>