Troubleshooting Frequent Problems#

This article lists common problems that can be encountered when using the SDK for Java. The linked resources provide more information on the subject.

If not covered here also search for any issue you might face on Stack Overflow. There you can also reach out to us by asking a question (be sure to tag it with sap-cloud-sdk).

Tenant or Principal not available#

Symptoms

Tenant or principal information is not available or an incorrect tenant is used.

Possible causes:

  • A subscriber based JWT is passed in but its validation fails, causing the SDK to fall back to the provider account. See JWT validation fails.

  • An operation is performed in an asynchronous manner without propagating the ThreadContext. See Running Asynchronous Operations.

  • The SDK components are not registered as listeners on incoming requests. See Framework Support.

  • There was no JWT in the authorization header.

Provider instead of Subscriber Account used#

Symptoms

Destinations are returned only for the provider account, but not for a subscriber account.

Possible causes:

JWT validation fails#

Symptoms:

Logs show JWT validation exceptions, Tenant information is not available.

Possible causes:

Connecting to an ERP System fails#

Symptoms:

The ERP system unexpectedly responds with 401: Unauthorized or 403: Forbidden.

Possible causes:

  • The SAP Client and Locale headers will be missing if the Destination is not an ErpHttpDestination. See Connecting to S/4HANA.

Compilation failures in generated OData VDM classes#

Symptoms:

Compilation fails due to missing Getters and Setters on entity objects.

Possible causes:

  • Getters and Setters will be missing if Lombok is not present in the dependency tree of your project. See Using the OData Generator.
  • Getters and Setters will be shown red if your IDE does not support Lombok. Hence, install the Lombok plugin for your IDE.

Compilation or runtime failures after updating the SDK version#

Symptoms:

MethodNotFound, ClassDefNotFound or similar exceptions occur.

Possible causes:

Java App has good performance on your local machine but utilizes 100% CPU on SCP Cloud Foundry#

Symptoms:
  • Java App executes multiple threads and runs with good performance on a powerful local machine.
  • Performance significantly drops after App is deployed to SAP Cloud Platform - Cloud Foundry and CPU utilization is always around 100%.

Possible causes:

  • A powerful developer's machine usually has much better CPU and Memory capacity than a standard Cloud instance.
  • SCP Cloud Foundry provides 1/4 of CPU unit per every GB of memory. With maximum memory per instance of 8 GB you can get maximum of 2 CPU cores.
  • All the limitations are subject to change. Please check latest details about SCP Cloud Foundry quotas and limitation
  • If even after achieving maximum vertical scale of your instance your App doesn't reach desired performance level, try to optimize it, consider scaling it horizontally or different custom solutions to boost performance where it lags.
Last updated on by Frank Essenberger