cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Format validation failed (Route references unknown destination "srv")

0 Kudos
485

Hi Team,

I am trying to deploy application but getting mention error:Format validation failed (Route references unknown destination "srv")

Attaching mta.yaml and xsapp.json for reference:20140-mta-3.txt xsappjson.txt

Regards

Daraksha

View Entire Topic
CarlosRoggan
Product and Topic Expert
Product and Topic Expert
0 Kudos

Your route refers to a destination with name "srv"
This destination is defined in mta.yaml. but commented out

0 Kudos

Hi Carlos,

The destination is not commented out. Please refer below mta.yaml:

ID: WNS

_schema-version: '3.1'

version: 0.0.1

modules:

# SAP HDI Container

- name: wns-db

type: hdb

path: db

parameters:

memory: 256M

disk-quota: 512M

requires:

- name: wns_db_dev

# Nodejs backend

- name: wns-srv

type: nodejs

path: srv

provides:

- name: wns_api

properties:

url: '${default-url}'

requires:

- name: wns_db_dev

#- name: wns_dev_uaa

# - name: prototype-wns-db-hdi-container

parameters:

memory: 325M

disk-quota: 1024M

- name: wns

type: html5

path: app

parameters:

memory: 250M

disk-quota: 512M

requires:

- name: wns_dev_uaa

- name: wns_api

group: destinations

properties:

name: wns_api

url: ~{url}

forwardAuthToken: true

provides:

- name: app_api

properties:

url: ${default-url}

application: ${app-name}

resources:

- name: wns_db_dev

type: com.sap.xs.hdi-container

properties:

hdi-container-name: '${service-name}'

- name: wns_dev_uaa

type: org.cloudfoundry.managed-service

parameters:

path: ./xs-security.json

service-plan: application

service: xsuaa

CarlosRoggan
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

I've had a look at the configuration which you've provided above.
I can only see one defined destination:

name: wns_api

I'm not so familiar with MTA and don't read thoroughly.
Just mentioning that there's no destination defined with name "srv", thus the error message seems to be correct.
A "destination" is an artifact which can be defined in SAP BTP cockpit manually.
Alternatively, it can be defined in MTA and then, during deploy, the destination will be generated and you an see it in the cockpit.
A "destination" is used to externalize URLs, thus removing them from code and making your code maintainable and portable.
Maybe you're confusing it with the "srv" artifact that you're exposing as node.js backend-service?

Kind Regards,
Carlos