Skip to Content

Unable to call odata service after switching from 1.17.1 to 1.20.1

Hi,

I generate new SAP Cloud Platform Business Application on SAP WebIDE with custom VDM odata classes.

I've copied most of my methods from my old project and deployed it to CF.

However, when I run it on CF, it gives me the error.

Failed to get destinations of subaccount: Failed to get access token for destination service. If your application is not running on Cloud Foundry, for example, when deploying to a local container, consider declaring the "destinations" environment variable to configure destinations.

When I run in the old project with version 1.17.1, it does return data.

	<parent>
		<groupId>com.sap.cloud.servicesdk.prov</groupId>
		<artifactId>projects-parent-odatav2</artifactId>
		<version>1.17.1</version>
	</parent>

I notice that the new project is generated with version 1.20.1.

Both projects are using service instance destination and com.sap.xs.uaa.

What does it have anything to do with this error?

Thanks

Tri

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Oct 30, 2018 at 09:29 AM

    Hi Tri,

    the SDK in question is not the S/4HANA Cloud SDK, but the SAP Cloud Platform SDK for Service Development.

    Best regards
    Dennis

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 02, 2018 at 09:53 AM

    Hi,

    Can you kindly provide the stack trace and the code that you write to fetch data?

    Meanwhile check how does the uaa definition in mta.yml look like. Make it like...

    - name: <uaa-name>

    type: org.cloudfoundry.managed-service

    parameters:

    service: xsuaa

    service-plan: application

    parameters:

    config:

    xsappname: <your_app_name>

    tenant-mode: dedicated

    Add comment
    10|10000 characters needed characters exceeded