Skip to Content
avatar image
Former Member

Format validation failed - Route references unknown destination

Hi All,

I am getting below error while trying to start the web module of SAP HANA XSA MTA application.

2/13/17 6:03:10.527 AM [APP/20-0] ERR 2/13/17 6:03:10.528 AM [APP/20-0] ERR /sapmnt/shared/XXX/xs/ea_data/xxxxxxxxxx/executionroot/f5cdc9ec-3ea0-4cac-bfb0-eca981dfa0cb/app/node_modules/approuter/lib/utils/JsonValidator.js:30 2/13/17 6:03:10.528 AM [APP/20-0] ERR throw new VError('%s%s: %s', 2/13/17 6:03:10.528 AM [APP/20-0] ERR ^ 2/13/17 6:03:10.528 AM [APP/20-0] ERR VError: xs-app.json/routes/0: Format validation failed (Route references unknown destination "backend-service") 2/13/17 6:03:10.528 AM [APP/20-0] ERR at JsonValidator.validate (/sapmnt/shared/XXX/xs/ea_data/xxxxxxxxxx/executionroot/f5cdc9ec-3ea0-4cac-bfb0-eca981dfa0cb/app/node_modules/approuter/lib/utils/JsonValidator.js:30:11) 2/13/17 6:03:10.528 AM [APP/20-0] ERR at Object.module.exports.validateXsApp (/sapmnt/shared/XXX/xs/ea_data/xxxxxxxxxx/executionroot/f5cdc9ec-3ea0-4cac-bfb0-eca981dfa0cb/app/node_modules/approuter/lib/configuration/validators.js:70:15) 2/13/17 6:03:10.528 AM [APP/20-0] ERR at Object.exports.loadConfiguration (/sapmnt/shared/XXX/xs/ea_data/xxxxxxxxxx/executionroot/f5cdc9ec-3ea0-4cac-bfb0-eca981dfa0cb/app/node_modules/approuter/lib/configuration/app-config.js:36:16) 2/13/17 6:03:10.528 AM [APP/20-0] ERR at getConfig (/sapmnt/shared/XXX/xs/ea_data/xxxxxxxxxx/executionroot/f5cdc9ec-3ea0-4cac-bfb0-eca981dfa0cb/app/node_modules/approuter/lib/configuration.js:19:26) 2/13/17 6:03:10.528 AM [APP/20-0] ERR at bootstrap (/sapmnt/shared/XXX/xs/ea_data/xxxxxxxxxx/executionroot/f5cdc9ec-3ea0-4cac-bfb0-eca981dfa0cb/app/node_modules/approuter/lib/bootstrap.js:42:22) Application failed to run 2/13/17 6:03:10.528 AM [APP/20-0] ERR at Approuter.start (/sapmnt/shared/XXX/xs/ea_data/xxxxxxxxxx/executionroot/f5cdc9ec-3ea0-4cac-bfb0-eca981dfa0cb/app/node_modules/approuter/approuter.js:50:19) 2/13/17 6:03:10.528 AM [APP/20-0] ERR at Object.<anonymous> (/sapmnt/shared/XXX/xs/ea_data/xxxxxxxxxx/executionroot/f5cdc9ec-3ea0-4cac-bfb0-eca981dfa0cb/app/node_modules/approuter/approuter.js:81:6) 2/13/17 6:03:10.528 AM [APP/20-0] ERR at Module._compile (module.js:409:26) 2/13/17 6:03:10.529 AM [APP/20-0] ERR at Object.Module._extensions..js (module.js:416:10) 2/13/17 6:03:10.529 AM [APP/20-0] ERR at Module.load (module.js:343:32)

I have maintained destinations using group: destinations property. Is there anything that I am missing here?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Feb 13, 2017 at 01:47 PM

    Rename in your mta.yaml the the name of the provided service to something else than "js" (which is the module name for the nodejs module). For instance call it "js-service". Also adjust the requires section of the web module with the new name.

    ...
    
     - name: js
       type: nodejs
       path: js
       provides:
         - name: js-service
           properties:
             url: "${default-url}"
       requires:
         - name: xsprototype-uaa
         - name: db
         - name: hdi-container
           properties:
             TARGET_CONTAINER: ~{hdi-container-name}
    
    
     - name: web
       type: html5
       path: web
       requires:
         - name: xsprototype-uaa
         - name: js-service
           group: destinations
           properties:
             name: backend-service
             url: ~{url}
             forwardAuthToken: true
    
    ...

    Regards,
    Florian

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 13, 2017 at 01:59 PM

    Got it working. MTA.yaml file had an incorrect required service entry.

    Add comment
    10|10000 characters needed characters exceeded