‎2024 Aug 06 3:57 PM - edited ‎2024 Aug 06 4:10 PM
Hello Expert,
If I deploy my application locally then in temporary port it displays data in the endpoints which do exists in the database explorer.
SS-1 :
Temporary Port:
DB Explorer Data Exist:
But once we deploy this then service created in dev space in my BTP account does not display any data in it.
Is this issue with CDS 7 ?
Note: I'm using {"auth":"mocked"} in the package.json;
Also note that even if I use xsuaa authentication then also after authentication data is not getting populated.
Can anyone help me understand what is error? or If I'm missing anything here?
With xsuaa authentication no data fetched; tested it in postman. Refer the screen shot.
My 'package.json' for reference is:
{
"name": "IT_CHARM",
"version": "1.0.0",
"description": "A simple CAP project.",
"repository": "<Add your repository here>",
"license": "UNLICENSED",
"engine": {
"node": "^12 || ^14"
},
"private": true,
"dependencies": {
"@sap/cds": "^7",
"@sap/cds-hana": "^2",
"@sap/xssec": "^4",
"express": "^4"
},
"devDependencies": {
"@cap-js/sqlite": "^1",
"@sap/cds-dk": "^7",
"@sap/eslint-plugin-cds": "^3",
"eslint": "^9"
},
"scripts": {
"start": "cds-serve"
},
"cds": {
"build": {
"tasks": [
{
"for": "hana",
"dest": "../db"
},
{
"for": "node-cf"
}
]
},
"requires": {
"db": {
"kind": "hana-cloud"
},
"auth":"mocked"
}
}
}
Regards,
Ganesh N.
Request clarification before answering.
I suspect the deployment of your application to create a new HDI container in HANA Cloud. Verify that your deployed application is connecting to the same database as your local testing. You can see this in the BTP Cockpit under Environment Variables for your app.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That is defined during deployment. Are you using an MTA file? In there is probably mentioned that the database is a 'managed service', so the deployment process deploys it for the application. The one you created 'manually' for testing is not relevant. The standard process would be that you let the deployer create the database, and then use hybrid testing to use the same database for your tests. But you should never manually change database tables or data outside of the development framework (eg. CAP artifacts and HANA native artifacts) because the deployer will overwrite that with your code
Hi @Willem_Pardaens ,
This is my HDB explorer DB instance
My SAP HANA PROJECTS deployed in SAP BAS
It is reflecting correct db name but pointing to wrong instance which I already deleted.
Below screen shot from ENV Var in application.
Please check and let me know how to correct this issue.
I guess issue is with yaml file is it not getting updated with correct instance for my db?
Below was my old HDI instance which I had deleted from the explorer.
Regards,
Ganesh N
You can try and update your MTA file to point to the existing HDI container:
resources:
- name: IT_CHARM-HDB01
type: org.cloudfoundry.existing-service
Hi @Willem_Pardaens ,
Your solution worked. But this is strange that after bind complete yaml file is not getting updated with recent HDI container instance attached to SAP project.
Thanks for the help. 🙂
| User | Count |
|---|---|
| 7 | |
| 7 | |
| 7 | |
| 7 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.