on 2020 May 17 9:01 PM
Hello all
I am trying to deploy an application built with SAP CAP using MTA archive method and getting he following error:
Error: Could not find the "com.sap.hana.di.cds" build plugin
There are other error items linked to this:
Deploying the namespace file "src/gen/.hdinamespace"... ok (0s 19ms)
Adding "src/gen/ADMINSERVICE_AUTHORS.hdbcds" for deploy...
Error: "src/gen/ADMINSERVICE_AUTHORS.hdbcds": could not create a compile unit for the file [8211714]
at "src/gen/ADMINSERVICE_AUTHORS.hdbcds" (0:0)
Error: Could not find the "com.sap.hana.di.cds" build plugin [8210501]
Error: Adding "src/gen/ADMINSERVICE_AUTHORS.hdbcds" for deploy... failed [8211700]
Preparing the make transaction... ok (0s 129ms)
Error: Preparing... failed [8211602]
Make failed (5 errors, 10 warnings): tried to deploy 43 files, undeploy 0 files, redeploy 0 dependent files
Error: Making... failed [8211605]
Error: Starting make in the container "F0D7D39BA1464C9FB647049B03B2FBAD" with 43 files to deploy, 0 files to undeploy... failed [8214168]
Deployment to container F0D7D39BA1464C9FB647049B03B2FBAD failed - error: HDI make failed [Deployment ID: none].
Error: HDI make failed
The generated .hdiconfig files has the plugin spec for hdbcds:
},
"hdbcds": {
"plugin_name": "com.sap.hana.di.cds"
},
Any idea what the problem is?
Kind Regards
Serdar
Request clarification before answering.
Are you on the SAP HANA Cloud? If so this newest version of HANA no longer supports HDBCDS. In order to use CAP, you have to set the experimental feature in the package.json to use hdbtable/hdbview instead hdbcds as the generation target.
"cds": {
"hana": {
"deploy-format": "hdbtable"
},
"requires": {
"db": {
"kind": "hana"
}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi thomas.jung
Thanks for your response. Actually, I was going to try both options, but could not find details for the new HANA Cloud service.
1. The above error is related to the already existing HaaS instance on SCP. Any solution you can offer in that case?
2. When you say "the newest version of HANA Cloud no longer supports HDBCDS" and suggest an experimental feature, does that mean SAP CAP does not support this newest HANA Cloud service at the moment? I am asking because, we are in the process of starting a migration programme from older HANA service to this newest HANA Cloud service.
3. If this was the newest HANA Cloud service, would you know how I should refer to the service instance in mta.yaml as a resource, I reckon service:hana-cloud and service-plan: hana; but, not sure about what type I should use?
Kind Regards
Serdar
Are you sure it is HaaS and not HANA Clould? That error sounds exactly like it's HANA Cloud.
Yes CAP needs an experimental feature to support HANA Cloud. This new feature will generate hdbtable/hdbview instead of hdbcds because hdbcds is no longer supported on HANA Cloud.
The resource definition in the MTA.yaml is no different because the resource is still an HDI container. You don't create the HANA instance from the MTA but always just the HDI container or schema.
Hi thomas.jung
In the target space, I have both the old and new services running.
The mta.yaml refers to the HDI container resource like below (this is generated by "cds add mta").
- name: bookshop-db
type: com.sap.xs.hdi-container
parameters:
service: hana
service-plan: hdi-shared
properties:
hdi-service-name: ${service-name} Now that I have two instances, i.e. one for the old and one for the newest service, does that mean it automatically picks the newest service. And, in that case, how can I make sure the container deployment addresses to a specific instance (I want to test for both old and new services)?
Yes it does mean its automatically picking the service for you. If you want to avoid this you have to specify the database_id in the parameters of the resource. This will force the choice. But of course then this DB ID is tied to the content of your mta.yaml. Better to avoid that situation if possible and only have one HANA instance per space.
I could not add my follow up question to thomas.jung here as this SAP Community page seems to have a problem and it started an infinite loop retrieving the images I uploaded in my comment and did not submit my comment with images.
So, to whomever is interested: You need to refer to the exact HANA DB using the database_id config parameter as below. Note that this is a parameter subordinate to "config".
resources:
# services extracted from CAP configuration
# 'service-plan' can be configured via 'cds.requires.<name>.vcap.plan'
# ------------------------------------------------------------
- name: bookshop-db
# ------------------------------------------------------------
type: com.sap.xs.hdi-container
parameters:
service: hana # or 'hanatrial' on trial landscapes
service-plan: hdi-shared
config:
database_id: "abcdefab-abcd-abcd-abcd-abcdefabcdef"
properties:
hdi-service-name: ${service-name}
With the explicit referral to the specific databases, I managed to deploy to both old and newest HANA databases (check Thomas' package.json content suggestion above for the newest HANA Cloud). Obviously, this introduces the challenge of fixing the database ID in the code and it will not be the same in subsequent environments where the code will be deployed. I reckon this can be managed by using MTA extension descriptors if needed, e.g. if you must have two HANA DBs co-exist in the same space.
thomas.jung : this option is now documented: https://cap.cloud.sap/docs/guides/databases#hana-cloud
Can you adjust your answer such that you remove the `hana.syntax` option? This is no longer needed (though still supported for compatibility reasons).
Hello thomas.jung ,
Do you mean that your provided solution could enable me to deploy an existing mta project (with hdbcds's) to my new HANA cloud environment. I already deployed some older projects build with web ide for XSA to HANA cloud but so far I was not successful of deploying projects that contain .hdbcds artefacts to HANA cloud.
Kr,Tom.
No that setting only impacts CAP applications and the generated HANA artifacts. It causes the CAP CDS compiler to output hdbtable instead of hdbcds files. If you are only using CAP then this setting will help move that CAP application to HANA Cloud. However if you have hand coded hdbcds files in a HANA DB project, this setting will do nothing for those. Those files must be migrated to either CAP .cds or to HDBTABLE. The hana-cli tool does have a feature that will help with such migrations. https://github.com/SAP-samples/hana-developer-cli-tool-example#massconvert
Hello Thomas,
is there an extension concept for hdbtables similar to the approach in hdbcds?
Having the following scenario: we use CAP to generate hdbtable and we want to use the technical configuration for tables (which is not supported in CAP cds). With hdbcds we were creating an extension and adding the tech config on top of the generated files.
What would be the best approach for hdbtable?
Thanks,
Alex
Hello thomas.jung
We have hand coded hdbcds file in our HANA DB project.
We have migrated the .hdbcds file to .hdbtable but still the deployment fails with Error: Could not find the "com.sap.hana.di.cds" build plugin.
Error Log:
#2.0#2023 04 26 04:51:08.866#Z#DEBUG#com.sap.cloud.lm.sl.xs2.849c8d52-e3ed-11ed-9a1a-eeee0a9b5868.elsa-db.executeTaskTask#
######org.cloudfoundry.multiapps.controller.persistence.services.ProcessLogger########flowable-async-job-executor-thread-45788###
[PollExecuteTaskStatusExecution] [elsa-db] 390a82fb-0ff7-4f9a-80c4-8f8685e937fb [2023-04-26T04:51:05.513041] Adding "src/views/VYearSH.hdbview" for deploy... ok (0s 0ms) (STDOUT, APP/TASK/deploy)#
#2.0#2023 04 26 04:51:08.866#Z#DEBUG#com.sap.cloud.lm.sl.xs2.849c8d52-e3ed-11ed-9a1a-eeee0a9b5868.elsa-db.executeTaskTask#
######org.cloudfoundry.multiapps.controller.persistence.services.ProcessLogger########flowable-async-job-executor-thread-45788###
[PollExecuteTaskStatusExecution] [elsa-db] 390a82fb-0ff7-4f9a-80c4-8f8685e937fb [2023-04-26T04:51:05.513043] Adding "src/views/VprivacyObjText.hdbview" for deploy... (STDOUT, APP/TASK/deploy)#
#2.0#2023 04 26 04:51:08.866#Z#DEBUG#com.sap.cloud.lm.sl.xs2.849c8d52-e3ed-11ed-9a1a-eeee0a9b5868.elsa-db.executeTaskTask#
######org.cloudfoundry.multiapps.controller.persistence.services.ProcessLogger########flowable-async-job-executor-thread-45788###
[PollExecuteTaskStatusExecution] [elsa-db] 390a82fb-0ff7-4f9a-80c4-8f8685e937fb [2023-04-26T04:51:05.513054] Adding "src/views/VprivacyObjText.hdbview" for deploy... ok (0s 0ms) (STDOUT, APP/TASK/deploy)#
#2.0#2023 04 26 04:51:08.866#Z#DEBUG#com.sap.cloud.lm.sl.xs2.849c8d52-e3ed-11ed-9a1a-eeee0a9b5868.elsa-db.executeTaskTask#
######org.cloudfoundry.multiapps.controller.persistence.services.ProcessLogger########flowable-async-job-executor-thread-45788###
[PollExecuteTaskStatusExecution] [elsa-db] 390a82fb-0ff7-4f9a-80c4-8f8685e937fb [2023-04-26T04:51:05.513056] Error: Could not find the "com.sap.hana.di.cds" build plugin [8210501] (STDOUT, APP/TASK/deploy)#
package.json
{ "name": "deploy", "dependencies": { "@sap/hdi-deploy": "4.6.0", "@sap/cds": "^6.7.1", "express": "^4.18.2", "@sap/hana-client": "^2.16.21" }, "scripts": { "start": "node node_modules/@sap/hdi-deploy/deploy.js" }, "cds": { "hana": { "syntax": "hdi", "deploy-format": "hdbtable" }, "requires": { "db": { "kind": "hana" } } }}below lines are removed from .hdiconfig as those are not supported on HANA Cloud "hdbfulltextindex" : { "plugin_name" : "com.sap.hana.di.fulltextindex" }, "hdbcds" : { "plugin_name" : "com.sap.hana.di.cds" }, "hdbhadoopmrjob" : { "plugin_name" : "com.sap.hana.di.virtualfunctionpackage.hadoop" }, "jar" : { "plugin_name" : "com.sap.hana.di.virtualfunctionpackage.hadoop" }, "hdbafllangprocedure" : { "plugin_name" : "com.sap.hana.di.afllangprocedure" }, "hdbtextconfig" : { "plugin_name" : "com.sap.hana.di.textconfig" }, "hdbtextdict" : { "plugin_name" : "com.sap.hana.di.textdictionary" }, "hdbtextrule" : { "plugin_name" : "com.sap.hana.di.textrule" }, "hdbtextlexicon" : { "plugin_name" : "com.sap.hana.di.textrule.lexicon" }, "hdbtextminingconfig" : { "plugin_name" : "com.sap.hana.di.textminingconfig" }, Any idea what could be the issue?Regards,RavindraHello @thomas_jung
I get the same Error "Could not find the "com.sap.hana.di.cds" build plugin" when trying to deploy my CAP Project via MTA archives. The deployment worked a few Weeks ago and now the db deployer fails.
I changed the db to kind:"hana" and added the deploy-format "hdbtable" in the package.json. After i added "src/gen/*hdbcds" to the undeploy.json the "hdbcds" plugin specs aren't in the genareted ".hdiconfig" anymore. Despite this i still get the error.
Do you have any idea what the problem is and what i can do?
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 6 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.