I am trying to use the S/4HANA SDK to call the CompanyCode OData VDM service but if I do this in the Cloud Foundry environment I\'m getting the attached error. I have been u
Can you try to make sure that the RequestContextServletFilter
is picked up in your application? The RequestContextServletFilter
uses the @WebFilter
annotation by default.
Example for Spring Boot:
@SpringBootApplication
@ServletComponentScan( "com.sap.cloud.sdk" )
public class Application extends SpringBootServletInitializer
{
...
}
See also: https://docs.spring.io/spring-boot/docs/current/api/org/springframework/boot/web/servlet/ServletComponentScan.html
EDIT: Note that when running your code in a background job (not triggered by a request), you have to wrap your code with RequestContextExecutor::execute.