0

我关注了博客:https ://blogs.sap.com/2018/04/30/deep-dive-10-with-sap-s4hana-cloud-sdk-generating-java-vdm-for-s4hana-custom-odata -service/comment-page-1/#comment-450108

VDM -.java创建文件,但每次编译都会失败,这似乎是我的一些愚蠢错误。

堆栈跟踪:

[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /C:/Users/armoghan.abbas/eclipse-workspace/Extensibility/application/target/vdm/com/sap/cloud/s4hana/examples/vdm/namespaces/businesspartner/BusinessPartnerAddress.java:[343,158] unmappable character for encoding UTF-8
[ERROR] /C:/Users/armoghan.abbas/eclipse-workspace/Extensibility/application/target/vdm/com/sap/cloud/s4hana/examples/vdm/namespaces/businesspartner/BusinessPartnerAddress.java:[348,32] unmappable character for encoding UTF-8
[ERROR] /C:/Users/armoghan.abbas/eclipse-workspace/Extensibility/application/target/vdm/com/sap/cloud/s4hana/examples/vdm/namespaces/businesspartner/BusinessPartnerAddress.java:[1124,158] unmappable character for encoding UTF-8
[ERROR] /C:/Users/armoghan.abbas/eclipse-workspace/Extensibility/application/target/vdm/com/sap/cloud/s4hana/examples/vdm/namespaces/businesspartner/BusinessPartnerAddress.java:[1127,32] unmappable character for encoding UTF-8
    [ERROR] /C:/Users/armoghan.abbas/eclipse-workspace/Extensibility/application/target/vdm/com/sap/cloud/s4hana/examples/vdm/namespaces/businesspartner/SupplierPurchasingOrganization.java:[209,1074] unmappable character for encoding UTF-8
    [ERROR] /C:/Users/armoghan.abbas/eclipse-workspace/Extensibility/application/target/vdm/com/sap/cloud/s4hana/examples/vdm/namespaces/businesspartner/SupplierPurchasingOrganization.java:[209,1088] unmappable character for encoding UTF-8
    [ERROR] /C:/Users/armoghan.abbas/eclipse-workspace/Extensibility/application/target/vdm/com/sap/cloud/s4hana/examples/vdm/namespaces/businesspartner/SupplierPurchasingOrganization.java:[646,1074] unmappable character for encoding UTF-8
    [ERROR] /C:/Users/armoghan.abbas/eclipse-workspace/Extensibility/application/target/vdm/com/sap/cloud/s4hana/examples/vdm/namespaces/businesspartner/SupplierPurchasingOrganization.java:[646,1088] unmappable character for encoding UTF-8
    [ERROR] /C:/Users/armoghan.abbas/eclipse-workspace/Extensibility/application/target/vdm/com/sap/cloud/s4hana/examples/vdm/namespaces/businesspartner/CustomerSalesArea.java:[444,1074] unmappable character for encoding UTF-8
    [ERROR] /C:/Users/armoghan.abbas/eclipse-workspace/Extensibility/application/target/vdm/com/sap/cloud/s4hana/examples/vdm/namespaces/businesspartner/CustomerSalesArea.java:[444,1088] unmappable character for encoding UTF-8
    [ERROR] /C:/Users/armoghan.abbas/eclipse-workspace/Extensibility/application/target/vdm/com/sap/cloud/s4hana/examples/vdm/namespaces/businesspartner/CustomerSalesArea.java:[1028,1074] unmappable character for encoding UTF-8
    [ERROR] /C:/Users/armoghan.abbas/eclipse-workspace/Extensibility/application/target/vdm/com/sap/cloud/s4hana/examples/vdm/namespaces/businesspartner/CustomerSalesArea.java:[1028,1088] unmappable character for encoding UTF-8
    [ERROR] /C:/Users/armoghan.abbas/eclipse-workspace/Extensibility/application/target/vdm/com/sap/cloud/s4hana/examples/vdm/namespaces/businesspartner/BusinessPartnerContactAddress.java:[342,158] unmappable character for encoding UTF-8
    [ERROR] /C:/Users/armoghan.abbas/eclipse-workspace/Extensibility/application/target/vdm/com/sap/cloud/s4hana/examples/vdm/namespaces/businesspartner/BusinessPartnerContactAddress.java:[347,32] unmappable character for encoding UTF-8
    [ERROR] /C:/Users/armoghan.abbas/eclipse-workspace/Extensibility/application/target/vdm/com/sap/cloud/s4hana/examples/vdm/namespaces/businesspartner/BusinessPartnerContactAddress.java:[1090,158] unmappable character for encoding UTF-8
    [ERROR] /C:/Users/armoghan.abbas/eclipse-workspace/Extensibility/application/target/vdm/com/sap/cloud/s4hana/examples/vdm/namespaces/businesspartner/BusinessPartnerContactAddress.java:[1093,32] unmappable character for encoding UTF-8
    [ERROR] /C:/Users/armoghan.abbas/eclipse-workspace/Extensibility/application/target/vdm/com/sap/cloud/s4hana/examples/vdm/namespaces/businesspartner/BusinessPartner.java:[450,240] unmappable character for encoding UTF-8
    [ERROR] /C:/Users/armoghan.abbas/eclipse-workspace/Extensibility/application/target/vdm/com/sap/cloud/s4hana/examples/vdm/namespaces/businesspartner/BusinessPartner.java:[1484,240] unmappable character for encoding UTF-8
    [ERROR] /C:/Users/armoghan.abbas/eclipse-workspace/Extensibility/application/target/vdm/com/sap/cloud/s4hana/examples/vdm/namespaces/businesspartner/Supplier.java:[435,240] unmappable character for encoding UTF-8
    [ERROR] /C:/Users/armoghan.abbas/eclipse-workspace/Extensibility/application/target/vdm/com/sap/cloud/s4hana/examples/vdm/namespaces/businesspartner/Supplier.java:[1007,240] unmappable character for encoding UTF-8
    [ERROR] /C:/Users/armoghan.abbas/eclipse-workspace/Extensibility/application/target/vdm/com/sap/cloud/s4hana/examples/vdm/namespaces/businesspartner/SupplierPurchasingOrganization.java:[54,8] com.sap.cloud.s4hana.examples.vdm.namespaces.businesspartner.SupplierPurchasingOrganization is not abstract and does not override abstract method getEndpointUrl() in com.sap.cloud.sdk.s4hana.datamodel.odata.helper.VdmEntity
    [ERROR] /C:/Users/armoghan.abbas/eclipse-workspace/Extensibility/application/target/vdm/com/sap/cloud/s4hana/examples/vdm/namespaces/businesspartner/SupplierPurchasingOrganization.java:[1134,5] method does not override or implement a method from a supertype
    [ERROR] /C:/Users/armoghan.abbas/eclipse-workspace/Extensibility/application/target/vdm/com/sap/cloud/s4hana/examples/vdm/namespaces/businesspartner/SupplierPurchasingOrganization.java:[1138,14] cannot find symbol
    symbol: method setServicePathForFetch(java.lang.String)
    [ERROR] /C:/Users/armoghan.abbas/eclipse-workspace/Extensibility/application/target/vdm/com/sap/cloud/s4hana/examples/vdm/namespaces/businesspartner/SupplierPurchasingOrganization.java:[1175,72] cannot find symbol
    symbol: method getServicePathForFetch()
    location: class com.sap.cloud.s4hana.examples.vdm.namespaces.businesspartner.SupplierPurchasingOrganization
    [ERROR] /C:/Users/armoghan.abbas/eclipse-workspace/Extensibility/application/target/vdm/com/sap/cloud/s4hana/examples/vdm/namespaces/businesspartner/SupplierPurchasingOrganization.java:[1181,43] cannot find symbol
    symbol: method getServicePathForFetch()
    location: class com.sap.cloud.s4hana.examples.vdm.namespaces.businesspartner.SupplierPurchasingOrganization
    [ERROR] /C:/Users/armoghan.abbas/eclipse-workspace/Extensibility/application/target/vdm/com/sap/cloud/s4hana/examples/vdm/namespaces/businesspartner/SupplierPurchasingOrganizationField.java:[45,9] constructor EntityField in class com.sap.cloud.sdk.s4hana.datamodel.odata.helper.EntityField<EntityT,FieldT> cannot be applied to given types;
    required: java.lang.String
    found: java.lang.String,com.sap.cloud.sdk.typeconverter.TypeConverter<FieldT,capture#1 of ?>
    reason: actual and formal argument lists differ in length
4

1 回答 1

4

感谢您的回复,我使用的是旧版本的 sdk,这与我在 pom.xml 中的版本不同(由复制提供),问题得到解决我切换到最新版本的 sdk。

于 2019-02-07T11:43:20.320 回答