on 08-03-2017 2:54 PM
I am stuck with exercise 2.5 of the Open SAP course Software Development on SAP HANA (Update Q4/2016).
In this exercise, first a user defined service to provide access to the SFLIGHT schema is defined with the command line interface:
xs cups CROSS_SCHEMA_SFLIGHT_00 -p "{\"host\":\"vhcalhexdb\",\"port\":\"30015\",\"user\":\"XSA_DEV\",\"password\":\"xxx\",\"driver\":\"com.sap.db.jdbc.Driver\",\"tags\":[\"hana\"] , \"schema\" :\"SFLIGHT\" }"
Then, this service is referenced with key hdi-sflight-service in the mta.yaml:
_schema-version: '2.0'
ID: openSAPHANA5
description: openSAP HANA5 Group 01
version: 0.0.1
modules:
- name: web
type: html5
path: web
requires:
- name: openSAPHANA5_00-uaa
- name: core-db
type: hdb
path: core-db
requires:
- name: hdi-container
properties:
target-container: ~{hdi-container-name}
- name: CrossSchemaService
group: SERVICE_REPLACEMENTS
properties:
key: hdi-sflight-service
service: ~{sflight-service-name}
resources:
- name: openSAPHANA5_00-uaa
type: com.sap.xs.uaa
parameters:
config_path: ./xs-security.json
- name: hdi-container
properties:
hdi-container-name: ${service-name}
type: com.sap.xs.hdi-container
- name: CrossSchemaService
type: org.cloudfoundry.existing-service
parameters:
service-name: CROSS_SCHEMA_SFLIGHT_00
properties:
sflight-service-name: ${service-name}
I reference this service key in SFLIGHT.hdbgrants
{
"hdi-sflight-service": {
"object_owner" : {
"schema_privileges":[
{
"reference":"SFLIGHT",
"privileges_with_grant_option":["SELECT", "SELECT METADATA"]
}
]
},
"application_user" : {
"schema_privileges":[
{
"reference":"SFLIGHT",
"privileges_with_grant_option":["SELECT", "SELECT METADATA"]
}
]
}
}
}
When I build, I get the error:
Error: more than one service definition found
Any help would be appreciated.
Thanks!
That error tells me that you missed step 9 in exercise 2.1.
An HDB module can also have more than one database resource associated with it. However it can only have one primary resouce which is the target for all database development objects it will create. Later we will add more resources for cross container access. This requires us to set this resources as the TARGET_CONTAINER in order to describe it as the primary database resource for this module.
properties:
TARGET_CONTAINER: ~{hdi-container-name}
Save the mta.yaml file.
Check the definition of core_db module and make sure you have properly set the TARGET_CONTAINER. This tells the system which of the two DB connections you want to be the primary connection of HDI deployment. This error is telling you that you have more than one service definition as a requirement for the module and it doesn't know which one should be primary.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
9 | |
9 | |
8 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.