Skip to Content
avatar image
Former Member

XSA Cross container access for non-HDI schema - build failed

Trying to create synonyms for objects in the classical (non-HDI) schema. I created a user provided service in our DEV space successfully.

I created mta.yaml, .hdbsynonym, -hdbsynonymconfig and .hdbgrants files and roles according to the following blogs:

SAP Web IDE for SAP HANA SPS 12 Patch 1 Tips and Tricks

Synonyms in HANA XS Advanced, Accessing Objects in an External Schema

When I try to build the project, I get the following service not found error:

11:24:15 (Builder) Build of /dev02 started. 11:24:17 (DIBuild) Build of /dev02 in progress 11:24:31 (DIBuild) ********** Printing /dev02 Build Log **********
[INFO] Reading mta.yaml
[INFO] Processing mta.yaml
[INFO] Processing resource HdiService
[INFO] Processing resource CrossSchemaService
[INFO] Processing module db
[INFO] Logs of build task for module {1}:
> [INFO] Injecting source code into builder...
> [INFO] Source code injection finished
> [INFO] ------------------------------------------------------------------------
> sap-hdi-deploy@2.0.1 node_modules/sap-hdi-deploy
> ├── async@1.4.2
> ├── sap-xsenv@1.2.2 (debug@2.2.0, verror@1.6.0)
> └── hdb@0.5.3
>
> > deploy@ start /hana/shared/FED/xs/ea_data/saperp1/executionroot/783631d3-aaf5-4047-bbcf-0ed61e1f1a3e/app/tomcat/temp/builder/hdi-builder/builds/build-4024162633731788215/db
> > node node_modules/sap-hdi-deploy/deploy.js
>
> sap-hdi-deploy, version 2.0.1
> Using service replacements from environment variable "SERVICE_REPLACEMENTS" with 1 replacements
> Collecting files...
> Collecting files... ok (0s 3ms)
> Processing grants files...
> Error: Error: service CROSS_SCHEMA_SERVICE_HANA_LIVE as replacement for service hdi-hlive-service not found


This is the project structure:

mta.yaml

_schema-version: 2.0.0
ID: dev02
version: 0.0.1


modules:
- name: db
  type: hdb
  path: db
  requires:
     - name: HdiService
       properties:
         TARGET_CONTAINER: ~{hdi-service-name}
     - name: CrossSchemaService
       group: SERVICE_REPLACEMENTS
       properties:
         key: hdi-hlive-service
         service: ~{hlive-service-name}
resources:
 - name: HdiService
   type: com.sap.xs.hdi-container	
   properties:
     hdi-service-name: ${service-name}
 - name: CrossSchemaService
   type: org.cloudfoundry.existing-service
   parameters:
     service-name : CROSS_SCHEMA_SERVICE_HANA_LIVE
   properties: 
     hlive-service-name: ${service-name}

.hdbgrants

{
   "hdi-hlive-service": {
    	"object_owner": {
			"roles": [
				"sap.hba.ecc::hana_live_external_access_g"
    		]
    	},
    	"application_user": {
			"roles": [
				"sap.hba.ecc::hana_live_external_access"
    		]
		} 
	}
}

.hdbsynonymconfig

{
  "AccountingDocumentCategoryQuery": {
    "target": {
      "object": "sap.hba.ecc/AccountingDocumentCategoryQuery",
      "schema.configure"    : "CROSS_SCHEMA_SERVICE_HANA_LIVE/schema"
    }
  }
}

.hdbsynonym

{
	"AccountingDocumentCategoryQuery": {}
}

Not sure how to resolve this service not found error, am I missing anything in the config files? Any help is much appreciated.

The log referenced here:

> npm ERR! /hana/shared/FED/xs/ea_data/saperp1/executionroot/783631d3-aaf5-4047-bbcf-0ed61e1f1a3e/app/tomcat/temp/builder/hdi-builder/builds/build-4024162633731788215/db/npm-debug.log

doesn't seem to exist either

btw. the project is built in the correct DEV space.

Many thanks

Kruno

cups.png (12.5 kB)
hdiproject.png (11.6 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Apr 11, 2017 at 11:02 AM

    This has been resolved. User created CROSS SCHEMA SERVICE must be created with one of the tags set to "hana". I had it set to "hana live".

    e.g.

    xs cups EPM_XXX-table-grantor -p "{"host":"my_host","port":"30015","user":"EPM_DEV","password":"Grant_123","driver":"com.sap.db.jdbc.Driver","tags":["hana"] , "schema" : "EPM_DEV" }"

    Add comment
    10|10000 characters needed characters exceeded