简体   繁体   English

在启动cloud-s4-sdk-book / RequestContextServletFilter问题期间找不到租户

[英]Tenant not found during startup of cloud-s4-sdk-book / RequestContextServletFilter issue

During (local) startup of the example application cloud-s4-sdk-book in the branch 15_2_spring_boot the following exception is thrown: 分支15_2_spring_boot中的示例应用程序cloud-s4-sdk-book的 (本地)启动期间,抛出以下异常:

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?

The exception is thrown inside method "loadFactory" of class RequestContextServletFilter. 在类RequestContextServletFilter的方法“ loadFactory”中引发异常。

I am starting the application using mvn spring-boot:run. 我正在使用mvn spring-boot:run启动应用程序。

What can I do the get the application started correctly? 如何正确启动应用程序?

This exception is expected and can usually be ignored if you are running this application locally, where no tenant is available. 如果您在本地没有租户的情况下运行此应用程序,则应预料到此异常,通常可以忽略此异常。 The application should still work, because there is a fallback in place to a tenant identifier default-tenant . 该应用程序仍将正常运行,因为租户标识符default-tenant有一个后备位置。

Keep in mind that you need to subscribe the default tenant before interacting with the database - do an HTTP request PUT /api/callback/tenant/default-tenant . 请记住,在与数据库交互之前,您需要预订默认租户-进行HTTP请求PUT /api/callback/tenant/default-tenant

Please note that this exception is only being logged as a warning. 请注意,此异常仅作为警告记录。 If you want to clean the log, adapt the TenantIdentifierResolver class. 如果要清除日志,请改编TenantIdentifierResolver类。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法通过Cloud SDK连接到S / 4 Hana - Failure connecting to S/4 Hana via Cloud SDK SAP S / 4HANA Cloud SDK请求语言 - SAP S/4HANA Cloud SDK Request language 尝试使用S / 4HANA Cloud SDK从S / 4HANA Cloud创建包含数据源的自定义OData v2服务 - Trying to create custom OData v2 service with data source from S/4HANA Cloud using S/4HANA Cloud SDK 在Cloud Foundry环境中使用S4 SDK执行ODATA V2调用时的DestinationAccessException错误 - DestinationAccessException Error in executing ODATA V2 calls using S4 SDK in cloud foundry environment 使用S / 4HANA Cloud SDK管道时,如何跳过功能分支构建的生产部署阶段? - How to skip Production Deployment stage for feature branch build when using S/4HANA Cloud SDK Pipeline? 无法访问com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces中的私有类 - Unable to access private classes in com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces 无法使用Cloud SDK在S / 4Hana上通过OData查询BAPI - Can't query BAPI via OData on S/4Hana using Cloud SDK Cloud-SDK按子字段过滤 - Cloud-SDK Filter by subfields 无法获取元数据:无法执行 OData 元数据请求。 将 s4sdk 部署到 Cloud Foundry 后出错 - Unable to fetch the metadata : Failed to execute OData Metadata request. error after deploying s4sdk to cloud foundry 无法使用S / 4 Hana Cloud SDK对API_PRODUCT_SRV标准白名单API执行深度插入操作 - Not able to perform Deep Insert operation for API_PRODUCT_SRV Standard WhiteListed API using S/4 Hana Cloud SDK
相关标签
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM