Skip to content

Material description fetching failing #769

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
i307698 opened this issue Apr 3, 2025 · 5 comments
Open

Material description fetching failing #769

i307698 opened this issue Apr 3, 2025 · 5 comments
Labels
question Further information is requested

Comments

@i307698
Copy link

i307698 commented Apr 3, 2025

Describe the Bug

We use com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultProductMasterService to fetch the material description for a particular material. This call is failing with an error message saying that "communication failed".__

We got this response from your team and changed accordingly.
Your original ticket did not mention kubernetes.

Have you considered our documentation on Gardener..?
https://sap.github.io/cloud-sdk/docs/java/environments/kubernetes-gardener

or Kyma..?
https://sap.github.io/cloud-sdk/docs/java/environments/kubernetes-kyma

Please open a new issue.

After implementing connectivity proxy and binding it to our app, I tried the API which was supposed to get the material description again.
It gave me this problem -

{"msg":"S4 Material description fetch failed with error: com.sap.cloud.sdk.cloudplatform.thread.exception.ThreadContextExecutionException: com.sap.cloud.sdk.cloudplatform.connectivity.exception.HttpClientInstantiationException: com.sap.cloud.sdk.cloudplatform.connectivity.exception.DestinationAccessException: Unable to create an HttpClient from the provided destination. The destination is supposed to target an on-premise system but lacks the correct proxy configuration. Please check the application logs for further details.","tenant_id":"ac76728d-e6de-493a-8eb7-209c1eb1cf84","level":"INFO","written_ts":"1742797238460961395","logger":"com.sap.qm.psp.extensions.apiservice.imp.S4HDescriptionService","correlation_id":"489ad550-cb0f-445b-9e44-d51e4401e729","written_at":"2025-03-24T06:20:38.460Z","thread":"http-nio-8080-exec-1","type":"log"}

Please let me know if there are any additional changes required from my side.

My GitHub link is -

https://github.tools.sap/DigitalManufacturing/psp-core-ms

The link to the PR -

https://github.tools.sap/DigitalManufacturing/psp-core-ms/commit/bb61921fff3168bc29b6bf30e53f002bc76a4c35

Thanks,
Saurabh

Steps to Reproduce

  1. Create a PSP from S4 or using tools like Postman.
  2. Call goes to S4 to get the material description using DefaultProductMasterService
  3. This call fails saying communication failed.

Expected Behavior

Material description is fetched without issues.

Screenshots

No response

Used Versions

Java - 17 and
Maven version - 3.8.6
SAP Cloud SDK version:
com.sap.cloud.sdk.s4hana s4hana-all 4.32.0

  • Spring Boot or CAP version: 3.3.4
    <cds.services.version>3.2.0</cds.services.version>
    <cloud.sdk.version>5.11.0</cloud.sdk.version>

Code Examples

// Your code here

Stack Trace

No response

Log File

Log file ...

Affected Development Phase

Getting Started

Impact

No Impact

Timeline

No response

@i307698 i307698 added the bug Something isn't working label Apr 3, 2025
@Jonas-Isr
Copy link
Member

Hi @i307698,

you are using our Cloud SDK on version 4.32.0. The end of life/end of support for versions 4.x was 2 years ago already. I would thus recommend to update to version 5 of the SDK. You can find a detailed update guide in our docs.

We can continue to help and support you once you updated. In the best case scenario, the problem is solved through the update.

Best,
Jonas

@i307698
Copy link
Author

i307698 commented Apr 4, 2025

Hello @Jonas-Isr
I followed the documentation and tried generating the OData client that is compatible with the OData VDM the SAP Cloud SDK provided in version 4.
But I can see nothing created in my output folder.

Here is the branch where I pushed my changes-
https://github.tools.sap/DigitalManufacturing/psp-core-ms/tree/material_desc

Please let me know if I am missing something.
Thanks,
Saurabh

@Jonas-Isr
Copy link
Member

Hi @i307698,

what exactly were you doing when you tried generating the OData client? Did you follow the steps outlined here and/or here?

I looked into the repository you linked and saw that you are still using version 4.32.0 here even though you are trying to generate the OData client. Is this on purpose?

Additionally, we strongly advice to not mix different version of our SDK in the same application. It might lead to unexpected behaviour or errors. I saw that you are using three different versions (5.11.0, 5.14.0 and 5.17.0) here. Refer to this guide for more information.

I hope this helps!
Best,
Jonas

@i307698
Copy link
Author

i307698 commented Apr 7, 2025

Hi @Jonas-Isr ,

What I intended to do was to generate classes like "ECCDescriptionService" which were provided as a part of s4hana-all dependency. But now that this dependancy has been removed, I was trying to generate these classes so that we can develop a typed data client around it.

I have made the changes to the same branch and have made it clean but I have still not got the classes that belonged to "com.sap.qm.psp.models" package.

https://github.tools.sap/DigitalManufacturing/psp-core-ms/tree/material_desc

Thanks,
Saurabh

@newtork
Copy link
Contributor

newtork commented Apr 14, 2025

It looks like you are not discussing the originally observed issue

We use com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultProductMasterService to fetch the material description for a particular material. This call is failing with an error message saying that "communication failed".__

{"msg":"S4 Material description fetch failed with error: com.sap.cloud.sdk.cloudplatform.thread.exception.ThreadContextExecutionException: com.sap.cloud.sdk.cloudplatform.connectivity.exception.HttpClientInstantiationException: com.sap.cloud.sdk.cloudplatform.connectivity.exception.DestinationAccessException: Unable to create an HttpClient from the provided destination. The destination is supposed to target an on-premise system but lacks the correct proxy configuration. Please check the application logs for further details.","tenant_id":"ac76728d-e6de-493a-8eb7-209c1eb1cf84","level":"INFO","written_ts":"1742797238460961395","logger":"com.sap.qm.psp.extensions.apiservice.imp.S4HDescriptionService","correlation_id":"489ad550-cb0f-445b-9e44-d51e4401e729","written_at":"2025-03-24T06:20:38.460Z","thread":"http-nio-8080-exec-1","type":"log"}


Now you are talking about generator plugin usage. Please create a new issue, if you face problems. But make sure you read everything necessary here in our documentation:

https://sap.github.io/cloud-sdk/docs/java/features/odata/vdm-generator

I briefly looked into your branch.

<inputDirectory>${project.basedir}/src/main/resources/edmx</inputDirectory>
  • You may want to check whether EDMX files actually in this path.
<outputDirectory>${project.build.directory}/vdm</outputDirectory>
  • Please understand the setting above will generate files under /target/vdm/. You can move the files into your source directory manually, or automatically make Maven aware of this generated-sources folder for compilation.

    In our internal sample project we generate the code directly in /src/main/java, However all files will be deleted from this folder if deleteOutputDirectory=true which is true for our project and your branch. Probably not what you want. Instead your original /target/vdm/ approach looks safer.

Maybe this helps already, and we can close this issue.

If you still have questions regarding code generation, unfortunately I will not give further instructions until a dedicated issue has been created.

@newtork newtork added question Further information is requested and removed bug Something isn't working labels Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants