首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在云启动过程中找不到租户-S4SDK-book/ RequestContextServletFilter问题

在云启动过程中找不到租户-S4SDK-book/ RequestContextServletFilter问题
EN

Stack Overflow用户
提问于 2018-12-29 15:06:40
回答 1查看 218关注 0票数 0

在示例应用程序开机的(本地)启动期间,将引发以下异常:

代码语言:javascript
复制
16:01:38.786 [localhost-startStop-1] DEBUG com.sap.cloud.sdk.cloudplatform.servlet.RequestContextServletFilter - Filter initialization parameter factory not defined.
16:01:38.787 [localhost-startStop-1] INFO com.sap.cloud.sdk.cloudplatform.servlet.RequestContextServletFilter - No RequestContextFactory configured. Falling back to DefaultRequestContextFactory.
16:01:38.798 [localhost-startStop-1] INFO com.sap.cloud.sdk.cloudplatform.servlet.RequestContextListenerChain - Added default listener com.sap.cloud.sdk.cloudplatform.security.user.UserRequestContextListener with priority -4.
16:01:38.798 [localhost-startStop-1] INFO com.sap.cloud.sdk.cloudplatform.servlet.RequestContextListenerChain - Added default listener com.sap.cloud.sdk.cloudplatform.tenant.TenantRequestContextListener with priority -3.
16:01:38.799 [localhost-startStop-1] INFO com.sap.cloud.sdk.cloudplatform.servlet.RequestContextListenerChain - Added default listener com.sap.cloud.sdk.cloudplatform.connectivity.DestinationsRequestContextListener with priority -2.
16:01:38.799 [localhost-startStop-1] INFO com.sap.cloud.sdk.cloudplatform.servlet.RequestContextListenerChain - Added default listener com.sap.cloud.sdk.cloudplatform.security.AuthTokenRequestContextListener with priority -5.
16:01:43.862 [main] WARN com.sap.cloud.s4hana.examples.addressmgr.config.TenantIdentifierResolver - Tenant not found
com.sap.cloud.sdk.cloudplatform.tenant.exception.TenantAccessException: Failed to get current tenant: no RequestContext available. Have you correctly configured a RequestContextServletFilter or have you wrapped your logic in a RequestContextExecutor when executing background tasks that are not triggered by a request?

异常将在类loadFactory的方法“RequestContextServletFilter”中抛出。

我正在使用mvn spring:run启动应用程序。

,我能做什么使应用程序正确启动?

EN

回答 1

Stack Overflow用户

发布于 2019-01-02 12:24:17

如果您在本地运行此应用程序,并且没有可用的租户,则通常可以忽略此异常。应用程序仍然可以工作,因为租户标识符default-tenant有一个回退的地方。

请记住,在与数据库交互之前,您需要订阅默认的租户--执行HTTP请求PUT /api/callback/tenant/default-tenant

请注意,此异常仅作为警告记录。如果要清理日志,请调整TenantIdentifierResolver类。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53970688

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档