cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to connect to OData Service on Cloud Foundry Using SAP Cloud SDK

Andy1
Product and Topic Expert
Product and Topic Expert
0 Kudos

Tutorials: https://developers.sap.com/tutorials/s4sdk-odata-service-cloud-foundry.html
--------------------------
I follow tutorials, in my case the backend s/4hana system is OP, I installed cloud connector and in cloud connector Cloud To On-Premise, configured HTTPS protocol to s4hana op system, then configure HTTP destination in BTP and check connection works(and use this HTTP destination to do another testing such as call s4hana Odata from postman, it works).But i follow the blog, after deployment to BTP, the hello world servlet can be called, but cannot call BusinessPartnerServlet just threw error "Internal Server Error". Then I followed the local deployment steps(which did in sap business application studio), and also run this command set destinations=[{name: "MyErpSystem", url: "https://URL"}], after run locally in BAS, I got the below error mentioned environment variable 'VCAP_SERVICES' is not defined. I checked all the steps in the tutorials, have no idea what is missed.

err.jpg

Andy1
Product and Topic Expert
Product and Topic Expert

By the way, from the SDK guide line, there is one section mentioned for connecting using OData Protocal connect to SAP S/4HANA Cloud and SAP S/4HANA On-premise 2020, the pom.xml dependency is different, I tried both still does not work.

0 Kudos

Let's ignore the BAS[*] local deployment for now. Is it possible for you to share (parts of) the application logs? Otherwise it'll be difficult to help.

[*] https://sap.github.io/cloud-sdk/docs/java/features/connectivity/sdk-connectivity-destination-service...

Andy1
Product and Topic Expert
Product and Topic Expert
0 Kudos

Dear Alexander,

I only attached BTP log service log here(I am not sure if this is the log you mentioned)

I am not sure whether this is helpful for you to identify the issues. I tried to include all the screenshots of the artifacts from the project such as cloud connector configuration,BTP destination configuration, java servlet code, mainfest.yml file, BTP log service log, but cannot save as here has some size limitation. So I send you an email, could you please kindly take a look at my email? Thank you.

Best regards,

Tikeer

0 Kudos

Unfortunately this does not really help (yet). Could you download the applications logs from Cloud Foundry directly (instead from Kibana)? You can either use the "cf logs" command, see documentation. Or you can use the "Logs" option in the left navigation bar:

You can also send it via email.

Accepted Solutions (1)

Accepted Solutions (1)

The problem got resolved by adding the missing "connectivity" service binding to the application. Now the OData request to BusinessPartner Service is working.

himmohanty
Explorer
0 Kudos

Can you help with the resolution step

Answers (0)