Describe the Problem
We are currently integrating your library into an application based on Spring Boot 4.x (which depends on Spring Framework 7.x). Upon application startup, we encounter a NoSuchMethodError. Here is the error log generated during startup:
Stack Trace
Description: An attempt was made to call a method that does not exist. The attempt was made from the following location:
com.sap.cloud.sdk.services.openapi.apiclient.ApiClient.addDefaultHeader(ApiClient.java:341)
The following method did not exist:
'java.util.List org.springframework.http.HttpHeaders.remove(java.lang.Object)'
The calling method's class, com.sap.cloud.sdk.services.openapi.apiclient.ApiClient, was loaded from the following location:
jar:file:/home/vcap/app/BOOT-INF/lib/openapi-core-5.28.0.jar!/com/sap/cloud/sdk/services/openapi/apiclient/ApiClient.class
The called method's class, org.springframework.http.HttpHeaders, is available from the following locations:
jar:file:/home/vcap/app/BOOT-INF/lib/spring-web-7.0.6.jar!/org/springframework/http/HttpHeaders.class
Root Cause Analysis
The root cause appears to be a compatibility issue with Spring Framework 7.x. Your library currently depends on Spring 6.2.18.
In Spring Framework 7.x, the signature of the remove method in org.springframework.http.HttpHeaders has changed, and the method accepting a generic Object key no longer exists.
- Method removed in Spring 7.x:
@Override public List<String> remove(Object key) { return this.headers.remove(key); }
- New method signature in Spring 7.x:
public @Nullable List<String> remove(String key) { return this.headers.remove(key); }
Propose a Solution
To resolve this compatibility issue, could you please upgrade the Spring Framework dependency in your library to a version compatible with Spring 7.x (or higher)? This will ensure that the ApiClient class aligns with the updated HttpHeaders API.
Describe Alternatives
No response
Affected Development Phase
Release
Impact
Blocked
Timeline
No response
Describe the Problem
We are currently integrating your library into an application based on Spring Boot 4.x (which depends on Spring Framework 7.x). Upon application startup, we encounter a NoSuchMethodError. Here is the error log generated during startup:
Stack Trace
Description: An attempt was made to call a method that does not exist. The attempt was made from the following location:
The following method did not exist:
The calling method's class, com.sap.cloud.sdk.services.openapi.apiclient.ApiClient, was loaded from the following location:
jar:file:/home/vcap/app/BOOT-INF/lib/openapi-core-5.28.0.jar!/com/sap/cloud/sdk/services/openapi/apiclient/ApiClient.class
The called method's class, org.springframework.http.HttpHeaders, is available from the following locations:
jar:file:/home/vcap/app/BOOT-INF/lib/spring-web-7.0.6.jar!/org/springframework/http/HttpHeaders.class
Root Cause Analysis
The root cause appears to be a compatibility issue with Spring Framework 7.x. Your library currently depends on Spring 6.2.18.
In Spring Framework 7.x, the signature of the remove method in org.springframework.http.HttpHeaders has changed, and the method accepting a generic Object key no longer exists.
@Override public List<String> remove(Object key) { return this.headers.remove(key); }public @Nullable List<String> remove(String key) { return this.headers.remove(key); }Propose a Solution
To resolve this compatibility issue, could you please upgrade the Spring Framework dependency in your library to a version compatible with Spring 7.x (or higher)? This will ensure that the ApiClient class aligns with the updated HttpHeaders API.
Describe Alternatives
No response
Affected Development Phase
Release
Impact
Blocked
Timeline
No response