Skip to Content
0

Format validation failed - Route references unknown destination

Feb 13, 2017 at 06:10 AM

254

avatar image
Former Member

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?

10 |10000 characters needed characters left characters exceeded

Can you show your mta.yaml and xs-app.json files.

0
Former Member
Florian Pfeffer

mta.txt

xs-app.txt

Thank you for your response. I am attaching the MTA.YAML and XS-APP.JSON files.

mta.txt (1.1 kB)
xs-app.txt (367 B)
xs-app.txt (367 B)
0
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Florian Pfeffer
Feb 13, 2017 at 01:47 PM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thanks Florian. That worked.

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

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Can you point out the problem and the solution of your problem :)

0