SAP / cloud-sdk

The SAP Cloud SDK documentation and support repository.
https://sap.github.io/cloud-sdk/
Apache License 2.0
45 stars 42 forks source link

com.sap.cloud.sdk.cloudplatform.connectivity.exception.DestinationAccessException: Failed to get destination with name #298

Closed nbblum closed 3 years ago

nbblum commented 3 years ago

Issue Description

I'm trying to fetch a destination by name DestinationAccessor.getDestination(name); but get an exception. The destination exists and and a destination service is bound in cloud foundry. It seems that the authentication information cannot be read from the request. Could this be an issue with webflux?

Impact / Priority

Affected development phase: Development, Impact: Blocked

Error Message

com.sap.cloud.sdk.cloudplatform.connectivity.exception.DestinationAccessException: Failed to get destination with name 'my_destination_name'.
    at com.sap.cloud.sdk.cloudplatform.connectivity.DestinationAccessor.lambda$getDestination$1(DestinationAccessor.java:121) ~[cloudplatform-connectivity-3.45.0.jar:na]
    Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
Error has been observed at the following site(s):
    |_ checkpoint ⇢ org.springframework.security.web.server.authorization.AuthorizationWebFilter [DefaultWebFilterChain]
    |_ checkpoint ⇢ org.springframework.security.web.server.authorization.ExceptionTranslationWebFilter [DefaultWebFilterChain]
    |_ checkpoint ⇢ org.springframework.security.web.server.authentication.logout.LogoutWebFilter [DefaultWebFilterChain]
    |_ checkpoint ⇢ org.springframework.security.web.server.savedrequest.ServerRequestCacheWebFilter [DefaultWebFilterChain]
    |_ checkpoint ⇢ org.springframework.security.web.server.context.SecurityContextServerWebExchangeWebFilter [DefaultWebFilterChain]
    |_ checkpoint ⇢ org.springframework.security.config.web.server.ServerHttpSecurity$OAuth2ResourceServerSpec$BearerTokenAuthenticationWebFilter [DefaultWebFilterChain]
    |_ checkpoint ⇢ org.springframework.security.web.server.context.ReactorContextWebFilter [DefaultWebFilterChain]
    |_ checkpoint ⇢ org.springframework.security.web.server.header.HttpHeaderWriterWebFilter [DefaultWebFilterChain]
    |_ checkpoint ⇢ org.springframework.security.config.web.server.ServerHttpSecurity$ServerWebExchangeReactorContextWebFilter [DefaultWebFilterChain]
    |_ checkpoint ⇢ org.springframework.security.web.server.WebFilterChainProxy [DefaultWebFilterChain]
    |_ checkpoint ⇢ org.springframework.security.web.server.WebFilterChainProxy [DefaultWebFilterChain]
    |_ checkpoint ⇢ org.springframework.boot.actuate.metrics.web.reactive.server.MetricsWebFilter [DefaultWebFilterChain]
    |_ checkpoint ⇢ HTTP GET "/data-resolver/api/v1/debug/destination/my_destination_name" [ExceptionHandlingWebHandler]
Stack trace:
        at com.sap.cloud.sdk.cloudplatform.connectivity.DestinationAccessor.lambda$getDestination$1(DestinationAccessor.java:121) ~[cloudplatform-connectivity-3.45.0.jar:na]
        at io.vavr.control.Try.getOrElseThrow(Try.java:748) ~[vavr-0.10.3.jar:na]
        at com.sap.cloud.sdk.cloudplatform.connectivity.DestinationAccessor.getDestination(DestinationAccessor.java:117) ~[cloudplatform-connectivity-3.45.0.jar:na]
        at com.sap.sva.mxp.cms.dataresolver.api.DebugController.fetchDestination(DebugController.java:46) ~[classes/:na]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[na:na]
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
        at java.base/java.lang.reflect.Method.invoke(Method.java:567) ~[na:na]
        at org.springframework.web.reactive.result.method.InvocableHandlerMethod.lambda$invoke$0(InvocableHandlerMethod.java:146) ~[spring-webflux-5.3.3.jar:5.3.3]
        at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:125) ~[reactor-core-3.4.2.jar:3.4.2]
        [...]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) ~[na:na]
        at java.base/java.lang.Thread.run(Thread.java:831) ~[na:na]
Caused by: com.sap.cloud.sdk.cloudplatform.cache.CacheRuntimeException: com.sap.cloud.sdk.cloudplatform.connectivity.exception.DestinationAccessException: Failed to get destination.
    at com.sap.cloud.sdk.cloudplatform.cache.CacheUtil.lambda$wrapCallableAsFunction$0(CacheUtil.java:45) ~[caching-3.45.0.jar:na]
    at com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$doComputeIfAbsent$14(BoundedLocalCache.java:2346) ~[caffeine-2.8.8.jar:na]
    at java.base/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1916) ~[na:na]
    at com.github.benmanes.caffeine.cache.BoundedLocalCache.doComputeIfAbsent(BoundedLocalCache.java:2344) ~[caffeine-2.8.8.jar:na]
    at com.github.benmanes.caffeine.cache.BoundedLocalCache.computeIfAbsent(BoundedLocalCache.java:2327) ~[caffeine-2.8.8.jar:na]
    at com.github.benmanes.caffeine.cache.LocalCache.computeIfAbsent(LocalCache.java:108) ~[caffeine-2.8.8.jar:na]
    at com.github.benmanes.caffeine.cache.LocalManualCache.get(LocalManualCache.java:62) ~[caffeine-2.8.8.jar:na]
    at com.sap.cloud.sdk.cloudplatform.connectivity.ScpCfDestinationLoader.lambda$tryGetDestination$2ec57ad6$1(ScpCfDestinationLoader.java:111) ~[cloudplatform-connectivity-scp-cf-3.45.0.jar:na]
    at io.vavr.control.Try.of(Try.java:75) ~[vavr-0.10.3.jar:na]
    at com.sap.cloud.sdk.cloudplatform.connectivity.ScpCfDestinationLoader.tryGetDestination(ScpCfDestinationLoader.java:110) ~[cloudplatform-connectivity-scp-cf-3.45.0.jar:na]
    at com.sap.cloud.sdk.cloudplatform.connectivity.DestinationLoaderChain.tryGetDestination(DestinationLoaderChain.java:84) ~[cloudplatform-connectivity-3.45.0.jar:na]
    at com.sap.cloud.sdk.cloudplatform.connectivity.DestinationLoader.tryGetDestination(DestinationLoader.java:36) ~[cloudplatform-connectivity-3.45.0.jar:na]
    at com.sap.cloud.sdk.cloudplatform.connectivity.DestinationAccessor.tryGetDestination(DestinationAccessor.java:139) ~[cloudplatform-connectivity-3.45.0.jar:na]
    at com.sap.cloud.sdk.cloudplatform.connectivity.DestinationAccessor.getDestination(DestinationAccessor.java:117) ~[cloudplatform-connectivity-3.45.0.jar:na]
    at com.sap.sva.mxp.cms.dataresolver.api.DebugController.fetchDestination(DebugController.java:46) ~[classes/:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:567) ~[na:na]
    at org.springframework.web.reactive.result.method.InvocableHandlerMethod.lambda$invoke$0(InvocableHandlerMethod.java:146) ~[spring-webflux-5.3.3.jar:5.3.3]
    at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:125) ~[reactor-core-3.4.2.jar:3.4.2]
    at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1789) ~[reactor-core-3.4.2.jar:3.4.2]
    [...]
    at java.base/java.lang.Thread.run(Thread.java:831) ~[na:na]
Caused by: com.sap.cloud.sdk.cloudplatform.connectivity.exception.DestinationAccessException: Failed to get destination.
    at com.sap.cloud.sdk.cloudplatform.connectivity.ScpCfDestinationServiceAdapter.getDestinationConfigurationAsJson(ScpCfDestinationServiceAdapter.java:252) ~[cloudplatform-connectivity-scp-cf-3.45.0.jar:na]
    at com.sap.cloud.sdk.cloudplatform.connectivity.ScpCfDestinationLoader.getDestinationConfigurationFromDestinationService(ScpCfDestinationLoader.java:218) ~[cloudplatform-connectivity-scp-cf-3.45.0.jar:na]
    at com.sap.cloud.sdk.cloudplatform.connectivity.ScpCfDestinationLoader.getDestinationConfigurationByTenant(ScpCfDestinationLoader.java:172) ~[cloudplatform-connectivity-scp-cf-3.45.0.jar:na]
    at com.sap.cloud.sdk.cloudplatform.connectivity.ScpCfDestinationLoader.getDestinationConfigurationByRetrievalStrategy(ScpCfDestinationLoader.java:149) ~[cloudplatform-connectivity-scp-cf-3.45.0.jar:na]
    at com.sap.cloud.sdk.cloudplatform.connectivity.ScpCfDestinationLoader.loadAndParseDestination(ScpCfDestinationLoader.java:126) ~[cloudplatform-connectivity-scp-cf-3.45.0.jar:na]
    at com.sap.cloud.sdk.cloudplatform.connectivity.ScpCfDestinationLoader.lambda$null$0(ScpCfDestinationLoader.java:113) ~[cloudplatform-connectivity-scp-cf-3.45.0.jar:na]
    at com.sap.cloud.sdk.cloudplatform.cache.CacheUtil.lambda$wrapCallableAsFunction$0(CacheUtil.java:42) ~[caching-3.45.0.jar:na]
    ... 165 common frames omitted
Caused by: com.sap.cloud.sdk.cloudplatform.resilience.ResilienceRuntimeException: com.sap.cloud.sdk.cloudplatform.thread.exception.ThreadContextExecutionException: com.sap.cloud.sdk.cloudplatform.security.exception.TokenRequestFailedException: Failed to determine cache key.
    at com.sap.cloud.sdk.frameworks.resilience4j.Resilience4jDecorationStrategy.lambda$null$4(Resilience4jDecorationStrategy.java:243) ~[resilience4j-3.45.0.jar:na]
    at io.vavr.control.Try.onFailure(Try.java:659) ~[vavr-0.10.3.jar:na]
    at com.sap.cloud.sdk.frameworks.resilience4j.Resilience4jDecorationStrategy.lambda$decorateCallable$5(Resilience4jDecorationStrategy.java:242) ~[resilience4j-3.45.0.jar:na]
    at com.sap.cloud.sdk.cloudplatform.resilience.ResilienceDecorationStrategy.executeCallable(ResilienceDecorationStrategy.java:243) ~[resilience-3.45.0.jar:na]
    at com.sap.cloud.sdk.cloudplatform.resilience.ResilienceDecorator.executeCallable(ResilienceDecorator.java:232) ~[resilience-3.45.0.jar:na]
    at com.sap.cloud.sdk.cloudplatform.connectivity.ScpCfDestinationServiceAdapter.getDestinationConfigurationAsJson(ScpCfDestinationServiceAdapter.java:239) ~[cloudplatform-connectivity-scp-cf-3.45.0.jar:na]
    ... 171 common frames omitted
Caused by: com.sap.cloud.sdk.cloudplatform.thread.exception.ThreadContextExecutionException: com.sap.cloud.sdk.cloudplatform.security.exception.TokenRequestFailedException: Failed to determine cache key.
    at com.sap.cloud.sdk.cloudplatform.thread.AbstractThreadContextExecutor.execute(AbstractThreadContextExecutor.java:299) ~[cloudplatform-core-3.45.0.jar:na]
    at com.sap.cloud.sdk.frameworks.resilience4j.DefaultThreadContextProvider.lambda$decorateCallable$0(DefaultThreadContextProvider.java:26) ~[resilience4j-3.45.0.jar:na]
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
    ... 3 common frames omitted
Caused by: com.sap.cloud.sdk.cloudplatform.security.exception.TokenRequestFailedException: Failed to determine cache key.
    at com.sap.cloud.sdk.cloudplatform.connectivity.XsuaaService.lambda$getUserTokenCacheKey$1(XsuaaService.java:107) ~[cloudplatform-connectivity-scp-cf-3.45.0.jar:na]
    at io.vavr.control.Try.getOrElseThrow(Try.java:748) ~[vavr-0.10.3.jar:na]
    at com.sap.cloud.sdk.cloudplatform.connectivity.XsuaaService.getUserTokenCacheKey(XsuaaService.java:107) ~[cloudplatform-connectivity-scp-cf-3.45.0.jar:na]
    at com.sap.cloud.sdk.cloudplatform.connectivity.XsuaaService.retrieveAccessTokenViaUserTokenGrant(XsuaaService.java:329) ~[cloudplatform-connectivity-scp-cf-3.45.0.jar:na]
    at com.sap.cloud.sdk.cloudplatform.connectivity.ScpCfDestinationServiceAdapter.getAccessTokenForDestinationService(ScpCfDestinationServiceAdapter.java:266) ~[cloudplatform-connectivity-scp-cf-3.45.0.jar:na]
    at com.sap.cloud.sdk.cloudplatform.connectivity.ScpCfDestinationServiceAdapter.lambda$getDestinationConfigurationAsJson$0(ScpCfDestinationServiceAdapter.java:241) ~[cloudplatform-connectivity-scp-cf-3.45.0.jar:na]
    at com.sap.cloud.sdk.frameworks.resilience4j.Resilience4jDecorationStrategy.lambda$decorateCallable$3(Resilience4jDecorationStrategy.java:222) ~[resilience4j-3.45.0.jar:na]
    at com.sap.cloud.sdk.cloudplatform.security.SecurityContextThreadContextDecorator.lambda$decorateCallable$2(SecurityContextThreadContextDecorator.java:51) ~[security-scp-cf-3.45.0.jar:na]
    at com.sap.cloud.sdk.cloudplatform.thread.ThreadContextCallable.call(ThreadContextCallable.java:225) ~[cloudplatform-core-3.45.0.jar:na]
    at com.sap.cloud.sdk.cloudplatform.thread.AbstractThreadContextExecutor.execute(AbstractThreadContextExecutor.java:293) ~[cloudplatform-core-3.45.0.jar:na]
    ... 5 common frames omitted
Caused by: com.sap.cloud.sdk.cloudplatform.security.principal.exception.PrincipalAccessException: Could not read a principal from neither a given JWT nor a given Basic Authentication header.
    at com.sap.cloud.sdk.cloudplatform.security.principal.ScpCfPrincipalFacade.createFallbackException(ScpCfPrincipalFacade.java:92) ~[security-scp-cf-3.45.0.jar:na]
    at com.sap.cloud.sdk.cloudplatform.security.principal.ScpCfPrincipalFacade.lambda$tryGetCurrentPrincipal$0(ScpCfPrincipalFacade.java:87) ~[security-scp-cf-3.45.0.jar:na]
    at io.vavr.control.Try.orElse(Try.java:726) ~[vavr-0.10.3.jar:na]
    at com.sap.cloud.sdk.cloudplatform.security.principal.ScpCfPrincipalFacade.tryGetCurrentPrincipal(ScpCfPrincipalFacade.java:87) ~[security-scp-cf-3.45.0.jar:na]
    at io.vavr.control.Try.flatMapTry(Try.java:490) ~[vavr-0.10.3.jar:na]
    at io.vavr.control.Try.flatMap(Try.java:472) ~[vavr-0.10.3.jar:na]
    at com.sap.cloud.sdk.cloudplatform.security.principal.PrincipalAccessor.tryGetCurrentPrincipal(PrincipalAccessor.java:112) ~[security-3.45.0.jar:na]
    at com.sap.cloud.sdk.cloudplatform.security.principal.PrincipalAccessor.getCurrentPrincipal(PrincipalAccessor.java:95) ~[security-3.45.0.jar:na]
    at com.sap.cloud.sdk.cloudplatform.cache.CacheKey.ofTenantAndPrincipalIsolation(CacheKey.java:184) ~[caching-3.45.0.jar:na]
    at io.vavr.control.Try.of(Try.java:75) ~[vavr-0.10.3.jar:na]
    at com.sap.cloud.sdk.cloudplatform.connectivity.XsuaaService.getUserTokenCacheKey(XsuaaService.java:106) ~[cloudplatform-connectivity-scp-cf-3.45.0.jar:na]
    ... 12 common frames omitted
    Suppressed: com.sap.cloud.sdk.cloudplatform.security.principal.exception.PrincipalAccessException: Could not read a principal from neither a given JWT nor a given Basic Authentication header.
        at com.sap.cloud.sdk.cloudplatform.security.principal.ScpCfPrincipalFacade.createFallbackException(ScpCfPrincipalFacade.java:92) ~[security-scp-cf-3.45.0.jar:na]
        at com.sap.cloud.sdk.cloudplatform.security.principal.ScpCfPrincipalFacade.lambda$tryGetCurrentPrincipal$0(ScpCfPrincipalFacade.java:87) ~[security-scp-cf-3.45.0.jar:na]
        at io.vavr.control.Try.orElse(Try.java:726) ~[vavr-0.10.3.jar:na]
        at com.sap.cloud.sdk.cloudplatform.security.principal.ScpCfPrincipalFacade.tryGetCurrentPrincipal(ScpCfPrincipalFacade.java:87) ~[security-scp-cf-3.45.0.jar:na]
        at io.vavr.control.Try.flatMapTry(Try.java:490) ~[vavr-0.10.3.jar:na]
        at io.vavr.control.Try.flatMap(Try.java:472) ~[vavr-0.10.3.jar:na]
        at com.sap.cloud.sdk.cloudplatform.security.principal.PrincipalAccessor.tryGetCurrentPrincipal(PrincipalAccessor.java:112) ~[security-3.45.0.jar:na]
        at com.sap.cloud.sdk.cloudplatform.security.principal.PrincipalThreadContextListener.afterInitialize(PrincipalThreadContextListener.java:79) ~[security-3.45.0.jar:na]
        at com.sap.cloud.sdk.cloudplatform.thread.ThreadContextCallable.notifyAfterInitialize(ThreadContextCallable.java:133) ~[cloudplatform-core-3.45.0.jar:na]
        at com.sap.cloud.sdk.cloudplatform.thread.ThreadContextCallable.call(ThreadContextCallable.java:219) ~[cloudplatform-core-3.45.0.jar:na]
        ... 6 common frames omitted
        Suppressed: com.sap.cloud.sdk.cloudplatform.thread.exception.ThreadContextPropertyException: Property 'com.sap.cloud.sdk.cloudplatform.security.principal.PrincipalThreadContextListener:principal' does not exist.
            at com.sap.cloud.sdk.cloudplatform.thread.DefaultThreadContext.getProperty(DefaultThreadContext.java:45)
            at com.sap.cloud.sdk.cloudplatform.security.principal.DefaultPrincipalFacade.lambda$tryGetCurrentPrincipal$0(DefaultPrincipalFacade.java:28)
            at io.vavr.control.Try.flatMapTry(Try.java:490)
            at io.vavr.control.Try.flatMap(Try.java:472)
            at com.sap.cloud.sdk.cloudplatform.security.principal.DefaultPrincipalFacade.tryGetCurrentPrincipal(DefaultPrincipalFacade.java:28)
            at com.sap.cloud.sdk.cloudplatform.security.principal.ScpCfPrincipalFacade.tryGetCurrentPrincipal(ScpCfPrincipalFacade.java:81)
            ... 12 common frames omitted
        Suppressed: com.sap.cloud.sdk.cloudplatform.thread.exception.ThreadContextPropertyException: Property 'com.sap.cloud.sdk.cloudplatform.servlet.RequestThreadContextListener:request' does not exist.
            at com.sap.cloud.sdk.cloudplatform.thread.DefaultThreadContext.getProperty(DefaultThreadContext.java:45)
            at com.sap.cloud.sdk.cloudplatform.servlet.DefaultRequestFacade.lambda$tryGetCurrentRequest$0(DefaultRequestFacade.java:29)
            at io.vavr.control.Try.flatMapTry(Try.java:490)
            at io.vavr.control.Try.flatMap(Try.java:472)
            at com.sap.cloud.sdk.cloudplatform.servlet.DefaultRequestFacade.tryGetCurrentRequest(DefaultRequestFacade.java:29)
            at com.sap.cloud.sdk.cloudplatform.servlet.RequestAccessor.tryGetCurrentRequest(RequestAccessor.java:96)
            at com.sap.cloud.sdk.cloudplatform.security.DefaultAuthTokenFacade.lambda$tryGetCurrentToken$2(DefaultAuthTokenFacade.java:136)
            at io.vavr.control.Try.orElse(Try.java:726)
            at com.sap.cloud.sdk.cloudplatform.security.DefaultAuthTokenFacade.tryGetCurrentToken(DefaultAuthTokenFacade.java:136)
            at com.sap.cloud.sdk.cloudplatform.security.AuthTokenAccessor.tryGetCurrentToken(AuthTokenAccessor.java:100)
            at com.sap.cloud.sdk.cloudplatform.security.principal.AuthTokenPrincipalExtractor.tryGetCurrentPrincipal(AuthTokenPrincipalExtractor.java:192)
            at io.vavr.control.Try.orElse(Try.java:726)
            at com.sap.cloud.sdk.cloudplatform.security.principal.ScpCfPrincipalFacade.tryGetCurrentPrincipal(ScpCfPrincipalFacade.java:83)
            ... 12 common frames omitted
        Suppressed: com.sap.cloud.sdk.cloudplatform.thread.exception.ThreadContextPropertyException: Property 'com.sap.cloud.sdk.cloudplatform.servlet.RequestThreadContextListener:request' does not exist.
            at com.sap.cloud.sdk.cloudplatform.thread.DefaultThreadContext.getProperty(DefaultThreadContext.java:45)
            at com.sap.cloud.sdk.cloudplatform.servlet.DefaultRequestFacade.lambda$tryGetCurrentRequest$0(DefaultRequestFacade.java:29)
            at io.vavr.control.Try.flatMapTry(Try.java:490)
            at io.vavr.control.Try.flatMap(Try.java:472)
            at com.sap.cloud.sdk.cloudplatform.servlet.DefaultRequestFacade.tryGetCurrentRequest(DefaultRequestFacade.java:29)
            at com.sap.cloud.sdk.cloudplatform.servlet.RequestAccessor.tryGetCurrentRequest(RequestAccessor.java:96)
            at com.sap.cloud.sdk.cloudplatform.security.DefaultBasicAuthenticationFacade.extractBasicCredentialsFromRequest(DefaultBasicAuthenticationFacade.java:72)
            at io.vavr.control.Try.orElse(Try.java:726)
            at com.sap.cloud.sdk.cloudplatform.security.DefaultBasicAuthenticationFacade.tryGetBasicCredentials(DefaultBasicAuthenticationFacade.java:55)
            at com.sap.cloud.sdk.cloudplatform.security.BasicAuthenticationAccessor.tryGetCurrentBasicCredentials(BasicAuthenticationAccessor.java:57)
            at com.sap.cloud.sdk.cloudplatform.security.principal.BasicCredentialsPrincipalExtractor.tryGetCurrentPrincipal(BasicCredentialsPrincipalExtractor.java:20)
            at io.vavr.control.Try.orElse(Try.java:726)
            at com.sap.cloud.sdk.cloudplatform.security.principal.ScpCfPrincipalFacade.tryGetCurrentPrincipal(ScpCfPrincipalFacade.java:85)
            ... 12 common frames omitted
    Suppressed: com.sap.cloud.sdk.cloudplatform.thread.exception.ThreadContextPropertyException: Property 'com.sap.cloud.sdk.cloudplatform.servlet.RequestThreadContextListener:request' does not exist.
        at com.sap.cloud.sdk.cloudplatform.thread.DefaultThreadContext.getProperty(DefaultThreadContext.java:45) ~[cloudplatform-core-3.45.0.jar:na]
        at com.sap.cloud.sdk.cloudplatform.servlet.DefaultRequestFacade.lambda$tryGetCurrentRequest$0(DefaultRequestFacade.java:29) ~[servlet-3.45.0.jar:na]
        at io.vavr.control.Try.flatMapTry(Try.java:490) ~[vavr-0.10.3.jar:na]
        at io.vavr.control.Try.flatMap(Try.java:472) ~[vavr-0.10.3.jar:na]
        at com.sap.cloud.sdk.cloudplatform.servlet.DefaultRequestFacade.tryGetCurrentRequest(DefaultRequestFacade.java:29) ~[servlet-3.45.0.jar:na]
        at com.sap.cloud.sdk.cloudplatform.servlet.RequestAccessor.tryGetCurrentRequest(RequestAccessor.java:96) ~[servlet-3.45.0.jar:na]
        at com.sap.cloud.sdk.cloudplatform.security.DefaultAuthTokenFacade.lambda$tryGetCurrentToken$2(DefaultAuthTokenFacade.java:136) ~[security-scp-cf-3.45.0.jar:na]
        at io.vavr.control.Try.orElse(Try.java:726) ~[vavr-0.10.3.jar:na]
        at com.sap.cloud.sdk.cloudplatform.security.DefaultAuthTokenFacade.tryGetCurrentToken(DefaultAuthTokenFacade.java:136) ~[security-scp-cf-3.45.0.jar:na]
        at com.sap.cloud.sdk.cloudplatform.security.AuthTokenAccessor.tryGetCurrentToken(AuthTokenAccessor.java:100) ~[security-scp-cf-3.45.0.jar:na]
        at com.sap.cloud.sdk.cloudplatform.security.principal.AuthTokenPrincipalExtractor.tryGetCurrentPrincipal(AuthTokenPrincipalExtractor.java:192) ~[security-scp-cf-3.45.0.jar:na]
        at io.vavr.control.Try.orElse(Try.java:726) ~[vavr-0.10.3.jar:na]
        at com.sap.cloud.sdk.cloudplatform.security.principal.ScpCfPrincipalFacade.tryGetCurrentPrincipal(ScpCfPrincipalFacade.java:83) ~[security-scp-cf-3.45.0.jar:na]
        ... 19 common frames omitted
    Suppressed: com.sap.cloud.sdk.cloudplatform.thread.exception.ThreadContextPropertyException: Property 'com.sap.cloud.sdk.cloudplatform.servlet.RequestThreadContextListener:request' does not exist.
        at com.sap.cloud.sdk.cloudplatform.thread.DefaultThreadContext.getProperty(DefaultThreadContext.java:45) ~[cloudplatform-core-3.45.0.jar:na]
        at com.sap.cloud.sdk.cloudplatform.servlet.DefaultRequestFacade.lambda$tryGetCurrentRequest$0(DefaultRequestFacade.java:29) ~[servlet-3.45.0.jar:na]
        at io.vavr.control.Try.flatMapTry(Try.java:490) ~[vavr-0.10.3.jar:na]
        at io.vavr.control.Try.flatMap(Try.java:472) ~[vavr-0.10.3.jar:na]
        at com.sap.cloud.sdk.cloudplatform.servlet.DefaultRequestFacade.tryGetCurrentRequest(DefaultRequestFacade.java:29) ~[servlet-3.45.0.jar:na]
        at com.sap.cloud.sdk.cloudplatform.servlet.RequestAccessor.tryGetCurrentRequest(RequestAccessor.java:96) ~[servlet-3.45.0.jar:na]
        at com.sap.cloud.sdk.cloudplatform.security.DefaultBasicAuthenticationFacade.extractBasicCredentialsFromRequest(DefaultBasicAuthenticationFacade.java:72) ~[security-scp-cf-3.45.0.jar:na]
        at io.vavr.control.Try.orElse(Try.java:726) ~[vavr-0.10.3.jar:na]
        at com.sap.cloud.sdk.cloudplatform.security.DefaultBasicAuthenticationFacade.tryGetBasicCredentials(DefaultBasicAuthenticationFacade.java:55) ~[security-scp-cf-3.45.0.jar:na]
        at com.sap.cloud.sdk.cloudplatform.security.BasicAuthenticationAccessor.tryGetCurrentBasicCredentials(BasicAuthenticationAccessor.java:57) ~[security-scp-cf-3.45.0.jar:na]
        at com.sap.cloud.sdk.cloudplatform.security.principal.BasicCredentialsPrincipalExtractor.tryGetCurrentPrincipal(BasicCredentialsPrincipalExtractor.java:20) ~[security-scp-cf-3.45.0.jar:na]
        at io.vavr.control.Try.orElse(Try.java:726) ~[vavr-0.10.3.jar:na]
        at com.sap.cloud.sdk.cloudplatform.security.principal.ScpCfPrincipalFacade.tryGetCurrentPrincipal(ScpCfPrincipalFacade.java:85) ~[security-scp-cf-3.45.0.jar:na]
        ... 19 common frames omitted

Dependency Tree

[INFO] com.sap.sva.mxp.cms.notifications:mxp-hcms-data-resolver:jar:0.0.1
[INFO] +- org.springframework.boot:spring-boot-starter-webflux:jar:2.4.2:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter:jar:2.4.2:compile
[INFO] |  |  +- org.springframework.boot:spring-boot:jar:2.4.2:compile
[INFO] |  |  +- org.springframework.boot:spring-boot-autoconfigure:jar:2.4.2:compile
[INFO] |  |  +- org.springframework.boot:spring-boot-starter-logging:jar:2.4.2:compile
[INFO] |  |  |  +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] |  |  |  |  \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] |  |  |  \- org.slf4j:jul-to-slf4j:jar:1.7.30:compile
[INFO] |  |  +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile
[INFO] |  |  \- org.yaml:snakeyaml:jar:1.27:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-json:jar:2.4.2:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.12.1:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.12.1:compile
[INFO] |  |  \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.12.1:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-reactor-netty:jar:2.4.2:compile
[INFO] |  |  \- io.projectreactor.netty:reactor-netty-http:jar:1.0.3:compile
[INFO] |  |     +- io.netty:netty-codec-http:jar:4.1.59.Final:compile
[INFO] |  |     |  +- io.netty:netty-common:jar:4.1.59.Final:compile
[INFO] |  |     |  +- io.netty:netty-buffer:jar:4.1.59.Final:compile
[INFO] |  |     |  +- io.netty:netty-transport:jar:4.1.59.Final:compile
[INFO] |  |     |  +- io.netty:netty-codec:jar:4.1.59.Final:compile
[INFO] |  |     |  \- io.netty:netty-handler:jar:4.1.59.Final:compile
[INFO] |  |     +- io.netty:netty-codec-http2:jar:4.1.59.Final:compile
[INFO] |  |     +- io.netty:netty-resolver-dns:jar:4.1.59.Final:compile
[INFO] |  |     |  +- io.netty:netty-resolver:jar:4.1.59.Final:compile
[INFO] |  |     |  \- io.netty:netty-codec-dns:jar:4.1.59.Final:compile
[INFO] |  |     +- io.netty:netty-resolver-dns-native-macos:jar:osx-x86_64:4.1.59.Final:compile
[INFO] |  |     |  \- io.netty:netty-transport-native-unix-common:jar:4.1.59.Final:compile
[INFO] |  |     +- io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.59.Final:compile
[INFO] |  |     \- io.projectreactor.netty:reactor-netty-core:jar:1.0.3:compile
[INFO] |  |        \- io.netty:netty-handler-proxy:jar:4.1.59.Final:compile
[INFO] |  |           \- io.netty:netty-codec-socks:jar:4.1.59.Final:compile
[INFO] |  +- org.springframework:spring-web:jar:5.3.3:compile
[INFO] |  |  \- org.springframework:spring-beans:jar:5.3.3:compile
[INFO] |  \- org.springframework:spring-webflux:jar:5.3.3:compile
[INFO] |     \- io.projectreactor:reactor-core:jar:3.4.2:compile
[INFO] +- org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:jar:3.0.1:compile
[INFO] |  +- org.springframework.cloud:spring-cloud-netflix-eureka-client:jar:3.0.1:compile
[INFO] |  +- com.netflix.eureka:eureka-client:jar:1.10.11:compile
[INFO] |  |  +- com.netflix.netflix-commons:netflix-eventbus:jar:0.3.0:compile
[INFO] |  |  |  +- com.netflix.netflix-commons:netflix-infix:jar:0.3.0:runtime
[INFO] |  |  |  |  +- commons-jxpath:commons-jxpath:jar:1.3:runtime
[INFO] |  |  |  |  +- joda-time:joda-time:jar:2.3:runtime
[INFO] |  |  |  |  \- org.antlr:antlr-runtime:jar:3.4:runtime
[INFO] |  |  |  |     +- org.antlr:stringtemplate:jar:3.2.1:runtime
[INFO] |  |  |  |     \- antlr:antlr:jar:2.7.7:runtime
[INFO] |  |  |  \- org.apache.commons:commons-math:jar:2.2:runtime
[INFO] |  |  +- com.thoughtworks.xstream:xstream:jar:1.4.15:compile
[INFO] |  |  |  +- xmlpull:xmlpull:jar:1.1.3.1:compile
[INFO] |  |  |  \- xpp3:xpp3_min:jar:1.1.4c:compile
[INFO] |  |  +- javax.ws.rs:jsr311-api:jar:1.1.1:compile
[INFO] |  |  +- com.netflix.servo:servo-core:jar:0.12.21:compile
[INFO] |  |  +- commons-configuration:commons-configuration:jar:1.10:compile
[INFO] |  |  |  \- commons-lang:commons-lang:jar:2.6:compile
[INFO] |  |  +- com.google.inject:guice:jar:4.1.0:compile
[INFO] |  |  |  +- javax.inject:javax.inject:jar:1:compile
[INFO] |  |  |  \- aopalliance:aopalliance:jar:1.0:compile
[INFO] |  |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.12.1:compile
[INFO] |  |  +- com.fasterxml.jackson.core:jackson-core:jar:2.12.1:compile
[INFO] |  |  \- org.codehaus.jettison:jettison:jar:1.4.0:runtime
[INFO] |  +- com.netflix.eureka:eureka-core:jar:1.10.11:compile
[INFO] |  |  \- com.fasterxml.woodstox:woodstox-core:jar:5.3.0:compile
[INFO] |  |     \- org.codehaus.woodstox:stax2-api:jar:4.2:compile
[INFO] |  \- org.springframework.cloud:spring-cloud-starter-loadbalancer:jar:3.0.1:compile
[INFO] |     +- org.springframework.cloud:spring-cloud-loadbalancer:jar:3.0.1:compile
[INFO] |     |  \- io.projectreactor.addons:reactor-extra:jar:3.4.2:compile
[INFO] |     +- org.springframework.boot:spring-boot-starter-cache:jar:2.4.2:compile
[INFO] |     |  \- org.springframework:spring-context-support:jar:5.3.3:compile
[INFO] |     \- com.stoyanr:evictor:jar:1.0.0:compile
[INFO] +- com.sap.sva.mxp:mxp-messages-dtos:jar:0.1.35:compile
[INFO] +- org.springframework.cloud:spring-cloud-stream-binder-rabbit:jar:3.1.1:compile
[INFO] |  +- org.springframework.cloud:spring-cloud-stream-binder-rabbit-core:jar:3.1.1:compile
[INFO] |  |  +- org.springframework.integration:spring-integration-amqp:jar:5.4.3:compile
[INFO] |  |  \- com.rabbitmq:http-client:jar:2.1.0.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-amqp:jar:2.4.2:compile
[INFO] |  |  \- org.springframework.amqp:spring-rabbit:jar:2.3.4:compile
[INFO] |  |     +- org.springframework.amqp:spring-amqp:jar:2.3.4:compile
[INFO] |  |     \- com.rabbitmq:amqp-client:jar:5.10.0:compile
[INFO] |  +- org.springframework.integration:spring-integration-jmx:jar:5.4.3:compile
[INFO] |  \- org.apache.httpcomponents:httpclient:jar:4.5.13:compile
[INFO] |     \- commons-codec:commons-codec:jar:1.15:compile
[INFO] +- org.springframework.cloud:spring-cloud-stream:jar:3.1.1:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-validation:jar:2.4.2:compile
[INFO] |  |  +- org.glassfish:jakarta.el:jar:3.0.3:compile
[INFO] |  |  \- org.hibernate.validator:hibernate-validator:jar:6.1.7.Final:compile
[INFO] |  |     +- jakarta.validation:jakarta.validation-api:jar:2.0.2:compile
[INFO] |  |     +- org.jboss.logging:jboss-logging:jar:3.4.1.Final:compile
[INFO] |  |     \- com.fasterxml:classmate:jar:1.5.1:compile
[INFO] |  +- org.springframework:spring-messaging:jar:5.3.3:compile
[INFO] |  +- org.springframework.integration:spring-integration-core:jar:5.4.3:compile
[INFO] |  |  +- org.springframework:spring-aop:jar:5.3.3:compile
[INFO] |  |  +- org.springframework:spring-context:jar:5.3.3:compile
[INFO] |  |  |  \- org.springframework:spring-expression:jar:5.3.3:compile
[INFO] |  |  \- org.springframework:spring-tx:jar:5.3.3:compile
[INFO] |  +- org.springframework.retry:spring-retry:jar:1.3.1:compile
[INFO] |  |  \- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] |  \- org.springframework.cloud:spring-cloud-function-context:jar:3.1.1:compile
[INFO] |     +- net.jodah:typetools:jar:0.6.2:compile
[INFO] |     \- org.springframework.cloud:spring-cloud-function-core:jar:3.1.1:compile
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:2.4.2:compile
[INFO] |  +- org.springframework.boot:spring-boot-actuator-autoconfigure:jar:2.4.2:compile
[INFO] |  |  \- org.springframework.boot:spring-boot-actuator:jar:2.4.2:compile
[INFO] |  \- io.micrometer:micrometer-core:jar:1.6.3:compile
[INFO] |     +- org.hdrhistogram:HdrHistogram:jar:2.1.12:compile
[INFO] |     \- org.latencyutils:LatencyUtils:jar:2.0.3:runtime
[INFO] +- de.codecentric:spring-boot-admin-starter-client:jar:2.4.0:compile
[INFO] |  \- de.codecentric:spring-boot-admin-client:jar:2.4.0:compile
[INFO] +- org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.43:compile
[INFO] |  \- org.apache.tomcat:tomcat-annotations-api:jar:9.0.41:compile
[INFO] +- org.jooq:jooq:jar:3.14.9:compile
[INFO] |  +- org.reactivestreams:reactive-streams:jar:1.0.3:compile
[INFO] |  \- javax.xml.bind:jaxb-api:jar:2.3.1:compile
[INFO] |     \- javax.activation:javax.activation-api:jar:1.2.0:compile
[INFO] +- org.jooq:jooq-meta:jar:3.14.9:compile
[INFO] +- org.jooq:jooq-codegen:jar:3.14.9:compile
[INFO] +- org.springdoc:springdoc-openapi-webflux-core:jar:1.5.3:compile
[INFO] |  \- org.springdoc:springdoc-openapi-common:jar:1.5.3:compile
[INFO] |     +- io.swagger.core.v3:swagger-models:jar:2.1.6:compile
[INFO] |     +- io.swagger.core.v3:swagger-annotations:jar:2.1.6:compile
[INFO] |     +- io.swagger.core.v3:swagger-integration:jar:2.1.6:compile
[INFO] |     |  \- io.swagger.core.v3:swagger-core:jar:2.1.6:compile
[INFO] |     |     \- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.12.1:compile
[INFO] |     \- io.github.classgraph:classgraph:jar:4.8.69:compile
[INFO] +- org.springdoc:springdoc-openapi-webflux-ui:jar:1.5.3:compile
[INFO] |  +- org.webjars:swagger-ui:jar:3.40.0:compile
[INFO] |  \- org.webjars:webjars-locator-core:jar:0.46:compile
[INFO] +- com.sap.cloud.sdk.cloudplatform:scp-cf:jar:3.45.0:compile
[INFO] |  +- com.sap.cloud.sdk.cloudplatform:auditlog-scp-cf:jar:3.45.0:compile
[INFO] |  |  \- com.sap.cloud.sdk.cloudplatform:auditlog:jar:3.45.0:compile
[INFO] |  +- com.sap.cloud.sdk.cloudplatform:caching:jar:3.45.0:compile
[INFO] |  +- com.sap.cloud.sdk.cloudplatform:cloudplatform-core-scp-cf:jar:3.45.0:compile
[INFO] |  |  +- com.google.code.gson:gson:jar:2.8.6:compile
[INFO] |  |  \- com.auth0:java-jwt:jar:3.15.0:compile
[INFO] |  +- com.sap.cloud.sdk.cloudplatform:cloudplatform-connectivity-scp-cf:jar:3.45.0:compile
[INFO] |  |  +- com.sap.cloud.sdk.cloudplatform:cloudplatform-connectivity-scp:jar:3.45.0:compile
[INFO] |  |  +- com.sap.cloud.sdk.cloudplatform:resilience:jar:3.45.0:compile
[INFO] |  |  +- com.sap.cloud.sdk.frameworks:resilience4j:jar:3.45.0:runtime
[INFO] |  |  |  +- io.github.resilience4j:resilience4j-circuitbreaker:jar:1.6.1:compile
[INFO] |  |  |  |  \- io.github.resilience4j:resilience4j-core:jar:1.6.1:compile
[INFO] |  |  |  +- io.github.resilience4j:resilience4j-bulkhead:jar:1.6.1:compile
[INFO] |  |  |  +- io.github.resilience4j:resilience4j-timelimiter:jar:1.6.1:compile
[INFO] |  |  |  +- io.github.resilience4j:resilience4j-cache:jar:1.6.1:compile
[INFO] |  |  |  |  \- javax.cache:cache-api:jar:1.1.1:compile
[INFO] |  |  |  \- io.github.resilience4j:resilience4j-retry:jar:1.6.1:compile
[INFO] |  |  +- com.sap.cloud.security.xsuaa:token-client:jar:2.8.8:compile
[INFO] |  |  |  \- org.json:json:jar:20201115:compile
[INFO] |  |  +- commons-io:commons-io:jar:2.8.0:compile
[INFO] |  |  +- net.minidev:json-smart:jar:2.3:compile
[INFO] |  |  |  \- net.minidev:accessors-smart:jar:1.2:compile
[INFO] |  |  \- com.sap.cloud.security:java-api:jar:2.8.8:compile
[INFO] |  +- com.sap.cloud.sdk.cloudplatform:security-scp-cf:jar:3.45.0:compile
[INFO] |  |  \- com.sap.cloud.security:java-security:jar:2.8.8:compile
[INFO] |  +- com.sap.cloud.sdk.cloudplatform:servlet:jar:3.45.0:compile
[INFO] |  +- com.sap.cloud.sdk.cloudplatform:tenant-scp-cf:jar:3.45.0:compile
[INFO] |  \- com.sap.cloud.sdk.cloudplatform:metering:jar:3.45.0:compile
[INFO] +- com.sap.cloud.sdk.cloudplatform:cloudplatform-connectivity:jar:3.45.0:compile
[INFO] |  +- com.sap.cloud.sdk.cloudplatform:cloudplatform-core:jar:3.45.0:compile
[INFO] |  +- com.sap.cloud.sdk.cloudplatform:security:jar:3.45.0:compile
[INFO] |  +- com.sap.cloud.sdk.cloudplatform:tenant:jar:3.45.0:compile
[INFO] |  +- com.sap.cloud.sdk.quality:common:jar:3.45.0:compile
[INFO] |  |  \- org.apache.commons:commons-csv:jar:1.8:compile
[INFO] |  +- org.slf4j:slf4j-api:jar:1.7.30:compile
[INFO] |  +- org.slf4j:jcl-over-slf4j:jar:1.7.30:runtime
[INFO] |  +- com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO] |  +- io.vavr:vavr:jar:0.10.3:compile
[INFO] |  |  \- io.vavr:vavr-match:jar:0.10.3:compile
[INFO] |  +- com.google.guava:guava:jar:30.0-jre:compile
[INFO] |  |  +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] |  |  +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] |  |  \- com.google.j2objc:j2objc-annotations:jar:1.3:compile
[INFO] |  +- com.github.ben-manes.caffeine:caffeine:jar:2.8.8:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.12.1:compile
[INFO] |  +- com.mikesamuel:json-sanitizer:jar:1.2.2:compile
[INFO] |  +- org.apache.httpcomponents:httpcore:jar:4.4.14:compile
[INFO] |  +- com.google.errorprone:error_prone_annotations:jar:2.6.0:compile
[INFO] |  \- org.apache.commons:commons-lang3:jar:3.11:compile
[INFO] +- org.springframework.cloud:spring-cloud-starter:jar:3.0.1:compile
[INFO] |  +- org.springframework.cloud:spring-cloud-context:jar:3.0.1:compile
[INFO] |  |  \- org.springframework.security:spring-security-crypto:jar:5.4.2:compile
[INFO] |  +- org.springframework.cloud:spring-cloud-commons:jar:3.0.1:compile
[INFO] |  \- org.springframework.security:spring-security-rsa:jar:1.0.9.RELEASE:compile
[INFO] |     \- org.bouncycastle:bcpkix-jdk15on:jar:1.64:compile
[INFO] |        \- org.bouncycastle:bcprov-jdk15on:jar:1.64:compile
[INFO] +- com.sap.cloud.security.xsuaa:xsuaa-spring-boot-starter:jar:2.8.4:compile
[INFO] |  +- com.sap.cloud.security.xsuaa:spring-xsuaa:jar:2.8.4:compile
[INFO] |  |  +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.13.3:compile
[INFO] |  |  |  \- org.apache.logging.log4j:log4j-api:jar:2.13.3:compile
[INFO] |  |  \- com.sap.cloud.security.xsuaa:api:jar:2.8.4:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-security:jar:2.4.2:compile
[INFO] |  |  +- org.springframework.security:spring-security-config:jar:5.4.2:compile
[INFO] |  |  \- org.springframework.security:spring-security-web:jar:5.4.2:compile
[INFO] |  +- org.springframework.security:spring-security-oauth2-jose:jar:5.4.2:compile
[INFO] |  |  +- com.nimbusds:nimbus-jose-jwt:jar:9.1.3:compile
[INFO] |  |  |  \- com.github.stephenc.jcip:jcip-annotations:jar:1.0-1:compile
[INFO] |  |  +- org.springframework.security:spring-security-core:jar:5.4.2:compile
[INFO] |  |  \- org.springframework.security:spring-security-oauth2-core:jar:5.4.2:compile
[INFO] |  \- org.springframework.security:spring-security-oauth2-resource-server:jar:5.4.2:compile
[INFO] +- org.springframework.boot:spring-boot-configuration-processor:jar:2.4.2:compile (optional)
[INFO] +- org.projectlombok:lombok:jar:1.18.20:compile (optional)
[INFO] \- org.springframework.boot:spring-boot-starter-test:jar:2.4.2:test
[INFO]    +- org.springframework.boot:spring-boot-test:jar:2.4.2:test
[INFO]    +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.4.2:test
[INFO]    +- com.jayway.jsonpath:json-path:jar:2.4.0:compile
[INFO]    +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:compile
[INFO]    |  \- jakarta.activation:jakarta.activation-api:jar:1.2.2:compile
[INFO]    +- org.assertj:assertj-core:jar:3.18.1:test
[INFO]    +- org.hamcrest:hamcrest:jar:2.2:test
[INFO]    +- org.junit.jupiter:junit-jupiter:jar:5.7.0:test
[INFO]    |  +- org.junit.jupiter:junit-jupiter-api:jar:5.7.0:test
[INFO]    |  |  +- org.apiguardian:apiguardian-api:jar:1.1.0:test
[INFO]    |  |  +- org.opentest4j:opentest4j:jar:1.2.0:test
[INFO]    |  |  \- org.junit.platform:junit-platform-commons:jar:1.7.0:test
[INFO]    |  +- org.junit.jupiter:junit-jupiter-params:jar:5.7.0:test
[INFO]    |  \- org.junit.jupiter:junit-jupiter-engine:jar:5.7.0:test
[INFO]    |     \- org.junit.platform:junit-platform-engine:jar:1.7.0:test
[INFO]    +- org.mockito:mockito-core:jar:3.6.28:test
[INFO]    |  +- net.bytebuddy:byte-buddy:jar:1.10.19:test
[INFO]    |  +- net.bytebuddy:byte-buddy-agent:jar:1.10.19:test
[INFO]    |  \- org.objenesis:objenesis:jar:3.1:test
[INFO]    +- org.mockito:mockito-junit-jupiter:jar:3.6.28:test
[INFO]    +- org.skyscreamer:jsonassert:jar:1.5.0:test
[INFO]    |  \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO]    +- org.springframework:spring-core:jar:5.3.3:compile
[INFO]    |  \- org.springframework:spring-jcl:jar:5.3.3:compile
[INFO]    +- org.springframework:spring-test:jar:5.3.3:test
[INFO]    \- org.xmlunit:xmlunit-core:jar:2.7.0:test

Project Details


Checklist

Emdee89 commented 3 years ago

Hi @nbblum, I am looking into your issue. Thanks for reaching out to the SAP Cloud SDK support!

I'll come back to you once I have more insights.

Emdee89 commented 3 years ago

@nbblum Can you please share the destination configuration with us? Make a screenshot or export the destination and upload the file here. Also, do you use a protected backend? Does the request which triggers your logic contain a JWT?

The log reveals that the destination requires a user identity to resolve the destination.

Emdee89 commented 3 years ago

Second idea: Since you use a Spring app, do you use these annotations on your application class?

nbblum commented 3 years ago

@Emdee89 the link for the annotations does not work The application is protected and a JWT exists. I tried fetching the destination manually via the rest api which works fine. So in general it works. But it would be cleaner to use the sdk.

In general webflux is supported?

Emdee89 commented 3 years ago

@nbblum Pls share the destination configuration with us.

Here is the link for the annotations: https://sap.github.io/cloud-sdk/docs/java/guides/cap-sdk-integration/#enable-the-component-scan-for-sap-cloud-sdk-package

nbblum commented 3 years ago

destination-config

Yes, the annotations are already there

Emdee89 commented 3 years ago

OK thanks. I guess I also need the full application log. You can download it from the BTP cockpit as log file. Can you provide that?

nbblum commented 3 years ago

@Emdee89 I attached the log but it's more or less what I posted in the issue. If you like you can contact me internally (I517250) mxp-hcms-data-resolver-2021-05-31 07_49_30.268+0000.txt

Emdee89 commented 3 years ago

Can you print the output of TenantAccessor.getCurrentTenant() and PrincipalAccessor.getCurrentPrincipal() to the log? Which values are returned? Are you sure that the incoming request contains a JWT from which the SDK can extract a tenant and a principal?

nbblum commented 3 years ago

TenantAccessor.getCurrentTenant()

ScpCfTenant(super=DefaultTenant(tenantId=23823d04-1ea5-425a-9840-c1f6f716d6ea), subdomain=sapit-strategicservices-dev)

PrincipalAccessor.getCurrentPrincipal()

com.sap.cloud.sdk.cloudplatform.security.principal.exception.PrincipalAccessException: Could not read a principal from neither a given JWT nor a given Basic Authentication header.
    at com.sap.cloud.sdk.cloudplatform.security.principal.ScpCfPrincipalFacade.createFallbackException(ScpCfPrincipalFacade.java:92) ~[security-scp-cf-3.45.0.jar:na]
    Suppressed: com.sap.cloud.sdk.cloudplatform.thread.exception.ThreadContextAccessException: No ThreadContext available for thread id=188.

But I can read the authentication header and JWT from the request with this example:

    @GetMapping("/headers/show")
    public HttpHeaders showHeaders(ServerWebExchange exchange) {
        var headers = exchange.getRequest().getHeaders();
        return headers;
    }

image

That's why I asked whether webflux is in general supported.

Emdee89 commented 3 years ago

We conclude that the SAP Cloud SDK does not work together with Spring WebFlux until today.

We will update this issue in case the compatibility will be provided.

artemkovalyov commented 3 years ago

Hey @nbblum,

We've added a note to our docs that Spring WebFlux is not yet supported by the SAP Cloud SDK. Earliest we might look into this direction is somewhere next year. If there will be coming more requests with production-ready use cases to supporting WebFlux we might reconsider the priorities.

In the meanwhile, you can use the classical Java threading model together with Java SDK and Spring Boot.

I'll be closing this issue for now. Don't hesitate to re-open it if you have any questions.