简体   繁体   English

S / 4HANA Cloud SDK:com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces不存在

[英]S/4HANA Cloud SDK :com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces does not exist

The build is fails due to lack of resource: class com.sap.cloud.sdk.s4hana.datamodel.odata.services.BusinessPartnerService 由于缺少资源,构建失败: class com.sap.cloud.sdk.s4hana.datamodel.odata.services.BusinessPartnerService

Do we need to have/create this model classes in our project structure or will SDK take care of this static import? 我们是否需要在项目结构中创建/创建此模型类,或者SDK会处理此静态导入吗?

Error after executing: mvn clean install 执行后出错: mvn clean install

Please use the latest SDK release in your project. 请在项目中使用最新的SDK版本。 Info here: https://sap.github.io/cloud-s4-sdk-examples/release-notes/ 信息在这里: https//sap.github.io/cloud-s4-sdk-examples/release-notes/

This should resolve the error. 这应该可以解决错误。

Best regards, Akhil 最好的问候,Akhil

There are likely several things happening in parallel here: 这里可能会发生几件事:

  • Version 1.3.0 of the SAP S/4HANA Cloud SDK moved the entity classes of a service such as BusinessPartner to their own package, in your case, you now need to import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.businesspartner.BusinessPartner; SAP S / 4HANA Cloud SDK的1.3.0版将诸如BusinessPartner之类的服务的实体类移动到它们自己的包中,在您的情况下,您现在需要import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.businesspartner.BusinessPartner; .
  • Furthermore, BusinessPartnerService is now an interface with a default implementation available with DefaultBusinessPartnerService . 此外, BusinessPartnerService现在是一个带有DefaultBusinessPartnerService的默认实现的接口。 You need to replace the static access with new DefaultBusinessPartnerService() (or you could use dependency injection). 您需要使用new DefaultBusinessPartnerService()替换静态访问(或者您可以使用依赖注入)。 See the release-notes that Akhil already referenced. 请参阅Akhil已经引用的发行说明
  • There is no email field on the entity BusinessPartner. 实体BusinessPartner上没有电子邮件字段。 You need to use the entity AddressEmailAddress and associate it to the business partner via a BusinessPartnerAddress . 您需要使用实体AddressEmailAddress并通过BusinessPartnerAddress将其与业务伙伴关联。

暂无
暂无

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

相关问题 无法访问com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces中的私有类 - Unable to access private classes in com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces SAP S / 4HANA Cloud SDK请求语言 - SAP S/4HANA Cloud SDK Request language 如何在现有应用程序中使用SAP S / 4HANA Cloud SDK访问OData服务? - How do I access OData service using the SAP S/4HANA Cloud SDK in existing application? 使用SAP APM和S / 4HANA Cloud SDK时,OData导航会返回异常 - OData navigation returns exception when using SAP APM and S/4HANA Cloud SDK 尝试使用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 SDK在S / 4Hana上通过OData查询BAPI - Can't query BAPI via OData on S/4Hana using Cloud SDK 使用S / 4HANA Cloud SDK> = 2.0.0执行OData查询时的DestinationAccessException - DestinationAccessException while executing OData Query with S/4HANA Cloud SDK >= 2.0.0 适用于Javascript和目标服务的S / 4HANA Cloud SDK - S/4HANA Cloud SDK for Javascript and destination service 使用S / 4HANA Cloud SDK:web.xml错误,使用来自S / 4HANA Cloud的数据源创建自定义OData v2服务 - Create custom OData v2 service with data source from S/4HANA Cloud using S/4HANA Cloud SDK: web.xml error Maven构建失败与com.sap.cloud.s4hana.plugins相关联:s4sdk-maven-plugin - Maven Build Failure releated to com.sap.cloud.s4hana.plugins:s4sdk-maven-plugin
相关标签
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM