cancel
Showing results for 
Search instead for 
Did you mean: 

Business Application Studio: Error: service ${service-name} not found

martinstenzig
Contributor
0 Kudos

I took an existing (working) project I have containing some HANA hdbreptasks and imported them into Business Application studio. When I try to deploy I receive via the HANA Projects Screen I receive this error

Error: service ${service-name} not found; the service definition does not exist.

I know that my MTA, grant file and other definitions are consistent as I can deploy it using mbt build and cf deploy, but there seems to be some magic happening in BAS when I hit the deploy command that is not transparent.

Any ideas as to what it could be?

0 Kudos

Hi Martin,

How are you trying to deploy? using the HANA Projects panel?

Did you bind your resource (under the database connections in the HANA Projects explorer) to your HDI container?

Thanks

Ayala

martinstenzig
Contributor
0 Kudos

Yes, I clicked on the topmost deploy button in the HANA Projects panel and yes, I made sure both, the hdi container and my user defined service that is necessary for the grant is bound.

detakeo
Participant
0 Kudos

You must have switched between containers and sometimes it makes it entry in mta file which is there. You need to review those files and mention the instance you are using.

Accepted Solutions (1)

Accepted Solutions (1)

martinstenzig
Contributor
0 Kudos

Thomas, check if your grantor password contains a #. Support told me that - as unlikely as it sounds - there seems to be a confirmed bug that you must not use a # in the grantor password. As soon as I changed my password to something without a # it seems to have solved the issue

Answers (3)

Answers (3)

martinstenzig
Contributor

Make sure you are 1. doing a CF login and 2. unbinding and re-binding the service in the BAS HANA screen. I still have challenges doing the initial deployments with this approach, but at least the ongoing deployments seem to work most of the times.

former_member872615
Discoverer
0 Kudos

please try to bind to your HDI container by click on the connect button

martinstenzig
Contributor
0 Kudos

I investigated this further and it turns out there seems to be an overall problem in Business Application Studio when you try to use a variable TARGET_CONTAINER specification.

I used a similar notation to the one outlined in the Readme.md of hid-deploy (line 910 or see below).

Once I change the dynamic reference to an explicit name of my hdi-container-service, it suddenly works.

ayalaha, Do you want me to create a SAP ticket for that?

modules:
 - name: db
 type: hdb
 path: db
 requires:
 - name: hdi-container
 properties: # 1.
 TARGET_CONTAINER: ~{hdi-container-service} # 1.
 - name: granting-service # 2.
resources:
 - name: hdi-container
 type: com.sap.xs.hdi-container
 properties:
 hdi-container-service: ${service-name} 
- name: granting-service # 3.
 type: org.cloudfoundry.existing-service # 3.
``` 

Hi Martin,

I believe that if you change the dynamic reference in the MTA.yaml to an explicit name of your hdi-container-service and it works, it means that in design time you are not correctly bounded.

Can you add a screenshot of the database connections section in the HANA project explorer?

Any way please open a ticket, the engineering will be able to look closly at your problem.

Best regards,

Ayala

0 Kudos

I am getting a similar error . Not sure if it is related - https://answers.sap.com/questions/13385863/deploy-hana-project-in-business-application-studio.html any pointers/workarounds would be helpful.

martinstenzig
Contributor
0 Kudos

Thomas, the only workaround I found for this problem was to eliminate all "variables" and replace them with hardcoded references in the mta.yaml.
The implementation of the HANA functionality in the Business Application Studio is based on my experience, very unreliable at present. I have also created a ticket, but as some of the problems seem to be sporadic, It's not easy to even get SAP a reproducible case.

0 Kudos

Thank you, appreciate your help. Hard-coding was the workaround that fixed my issue too.

shiv_parijatam
Explorer
0 Kudos

Even I am getting same error while loading data using .hdtabledata.

Error Message:service ${service-name} not found; the service definition does not exist.

Accoun ID: shivram.parijatam @ invenio-solutions.com

pass: 143@Learning

sarita_namuduri
Explorer
0 Kudos

Hi, I too get the same issue . Any recomended solution please ?

sarita_namuduri
Explorer
0 Kudos

------------------------------------------------------------------------------------------------------------------------------------------------------------

> deploy@ start /home/user/projects/DM/db
> node node_modules/@sap/hdi-deploy/deploy.js "--exit"

Deployment ended at 2021-09-14 13:30:36
Error: service ${service-name} . not found; the service definition does not exist.
(0s 38ms)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! deploy@ start: `node node_modules/@sap/hdi-deploy/deploy.js "--exit"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the deploy@ start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/user/.npm/_logs/2021-09-14T13_30_36_679Z-debug.log
> Executing task: echo 'Prepared environment for deployment' && (npm ls --depth 0 --production || npm install) && (npm start -- --exit) <

Prepared environment for deployment
deploy@ /home/user/projects/DM/db
`-- @sap/hdi-deploy@4.2.0

npm WARN lifecycle The node binary used for scripts is /extbin/bin/node but npm is using /opt/nodejs/node-v14.16.0-linux-x64/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
--------------------------------------------------------------------------------------------------------------------------------------------------------------