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

查看:109
本文介绍了S/4HANA Cloud SDK:com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于缺少资源,构建失败:class com.sap.cloud.sdk.s4hana.datamodel.odata.services.BusinessPartnerService

The build is fails due to lack of resource: class com.sap.cloud.sdk.s4hana.datamodel.odata.services.BusinessPartnerService

我们是否需要在项目结构中拥有/创建此模型类,还是SDK会执行此静态导入?

Do we need to have/create this model classes in our project structure or will SDK take care of this static import?

执行后出现错误: MVN全新安装

推荐答案

此处可能并行发生了几件事:

There are likely several things happening in parallel here:

  • SAP S/4HANA Cloud SDK的版本1.3.0将诸如 BusinessPartner 之类的服务的实体类移至它们自己的包中,对于您而言,您现在需要import com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.businesspartner.BusinessPartner;./li>
  • 此外, BusinessPartnerService 现在是一个带有默认实现的接口,该接口可用于 DefaultBusinessPartnerService .您需要用new DefaultBusinessPartnerService()替换静态访问(或者您可以使用依赖注入).请参阅Akhil已引用的发行说明. li>
  • 实体BusinessPartner上没有 email 字段.您需要使用实体 AddressEmailAddress 并将其通过 BusinessPartnerAddress 关联到业务伙伴.
  • 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;.
  • Furthermore, BusinessPartnerService is now an interface with a default implementation available with DefaultBusinessPartnerService. You need to replace the static access with new DefaultBusinessPartnerService() (or you could use dependency injection). See the release-notes that Akhil already referenced.
  • There is no email field on the entity BusinessPartner. You need to use the entity AddressEmailAddress and associate it to the business partner via a BusinessPartnerAddress.

这篇关于S/4HANA Cloud SDK:com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆