This article lists common problems that can be encountered when using the SDK for Java. The linked resources provide more information on the subject.
Tenant or principal information is not available or an incorrect tenant is used.
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.
Destinations are returned only for the provider account, but not for a subscriber account.
- The SDK defaults back to the provider account if no tenant information is available. See the above section on Tenant or Principal not available.
Logs show JWT validation exceptions, Tenant information is not available.
- The SDK version might be outdated. Check with the latest SDK version.
The ERP system unexpectedly responds with 401: Unauthorized or 403: Forbidden.
- The SAP Client and Locale headers will be missing if the
Destinationis not an
ErpHttpDestination. See Connecting to S/4HANA.
Compilation fails due to missing Getters and Setters on entity objects.
- 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.
ClassDefNotFound or similar exceptions occur.
- Conflicting dependency versions may cause such issues. See the section on Managing Dependencies.
- 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%.
- 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.