cancel
Showing results for 
Search instead for 
Did you mean: 

Destination not found after deploying application from Web IDE to SAP Cloud Foundry

former_member516725
Discoverer
3,285

Hi All,

I have a trial account. I have created a MTA Project in WEB IDE and consume Northwind data through Destination. This has been working fine in NEO. But after deploying this app to SAP Cloud Foundry, it shows the destination error (404 Not Found).

Please check the details below:

Creation of Project:

Then select "SAPUI5 Application".

manifest.json:

Destination:

Also created the same Destination with the same name at Cloud Foundry.

xs-security.json:

{
  "xsappname": "mta_myDemo",
  "tenant-mode": "dedicated",
  "description": "Security profile of called application",
  "role-templates": [
    {
      "name": "Token_Exchange",
      "description": "UAA",
      "scope-references": [
        "uaa.user"
      ]
    }
  ]
}


xs-app.json:

{
  "welcomeFile": "/index.html",
  "authenticationMethod": "route",
  "logout": {
    "logoutEndpoint": "/do/logout"
  },
  "routes": [
    {
      "source": "^(.*)$",
      "target": "$1",
      "service": "html5-apps-repo-rt",
      "authenticationType": "xsuaa"
    }
  ]
}


package.json:

{
  "name": "myDemo",
  "version": "0.0.1",
  "description": "",
  "devDependencies": {
    "@ui5/cli": "1.13.0",
    "@sap/ui5-builder-webide-extension": "1.0.x"
  },
  "scripts": {
    "build": "ui5 build --clean-dest --include-task=generateManifestBundle generateCachebusterInfo"
  },
  "ui5": {
    "dependencies": [
      "@sap/ui5-builder-webide-extension"
    ]
  }
}


mta.yaml:

ID: mta_myDemo
_schema-version: '2.1'
parameters:
  deploy_mode: html5-repo
version: 0.0.1
modules:
  - name: mta-mydemo-approuter
    type: approuter.nodejs
    path: mta-mydemo-approuter
    parameters:
      disk-quota: 256M
      memory: 256M
    requires:
      - name: mta_myDemo_html5_repo_runtime
      - name: uaa_mta_myDemo
  - name: mta_myDemo_ui_deployer
    type: com.sap.html5.application-content
    path: mta_myDemo_ui_deployer
    requires:
      - name: mta_myDemo_html5_repo_host
    build-parameters:
      requires:
        - name: myDemo
          artifacts:
            - './*'
          target-path: resources/myDemo
  - name: myDemo
    type: html5
    path: myDemo
    build-parameters:
      builder: custom
      commands:
        - npm install
        - npm run build
      supported-platforms: []
      build-result: dist
resources:
  - name: mta_myDemo_html5_repo_runtime
    parameters:
      service-plan: app-runtime
      service: html5-apps-repo
    type: org.cloudfoundry.managed-service
  - name: mta_myDemo_html5_repo_host
    parameters:
      service-plan: app-host
      service: html5-apps-repo
    type: org.cloudfoundry.managed-service
  - name: uaa_mta_myDemo
    parameters:
      path: ./xs-security.json
      service-plan: application
      service: xsuaa
    type: org.cloudfoundry.managed-service
  - name: dest_mta_myDemo
    parameters:
      service-plan: lite
      service: destination
    type: org.cloudfoundry.managed-service


NEO-success:

Cloud Foundry error:

Need help on this issue.

Thanks,

Prasun

Accepted Solutions (0)

Answers (3)

Answers (3)

WouterLemaire
Active Contributor

I think you’re missing the route tinhoudend destination in the Xs-app.json file.


This tutorial from mariusobert might help you as well: https://developers.sap.com/tutorials/sapui5-webide-setup-datasource.html

former_member516725
Discoverer
0 Kudos

Hi Wounter,

Thanks for your comment. I have tried with those steps which has mentioned at your provided URL. But there is no success. It shows "Internal Server Error" while the app runs.

Any further help is appreciated.

Kind Regards,

Prasun

venkatesh_r_hulekal
Product and Topic Expert
Product and Topic Expert
0 Kudos
yerlan1
Explorer
0 Kudos

Hi prasun_k venkatesh.r.hulekal were able to solve the problem? I'm facing the same issue.

geert-janklaps
Active Contributor
0 Kudos

Hi prasun_k,

Since you're using the HTML5 repository on SAP Cloud Foundry, your app will run through the single point of entry => the approuter.

Did you check the xs-app.json of your approuter? Did you add a route that points to your destination there?

Example of what I'm using for one of my projects:

Best regards,

Geert-Jan Klaps