on 2022 Jul 25 11:44 AM
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
Request clarification before answering.
Your route refers to a destination with name "srv"
This destination is defined in mta.yaml. but commented out
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
User | Count |
---|---|
41 | |
15 | |
10 | |
9 | |
6 | |
5 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.