cancel
Showing results for 
Search instead for 
Did you mean: 

Help Needed to deploy MTA application with Java oData to XS Environment

Former Member
0 Kudos

Hello,

My project team and I are having great difficulty trying to deploy our working oData Service. The services (java and hdi) build correctly and even the MTA as a whole builds correctly and creates a *.mtar file but when we try to deploy to either the existing space or an alternate (eg 'live') it either just hangs or fails.

The HDI module appears to deploy properly but it's the Java module that's a problem. I've tried to deploy from the Web IDE using the non-technical process and I've also tried deploying from XS CLI, but with the command line, it can't find the *.war file even though in the WebIDE it's showing up.

We're working off Hana Express 2.0 SP 2 on AWS via CAL. It's also very confusing because in half the documents, it describes needing `mta.yaml` and `mtad.yaml` and in others specific to Java development it describes a `manifest.yaml` or `manifest.json` instead and they seem to require the same stuff.

Here is our mta.yaml

ID: com.company.appname
_schema-version: '2.0.0'
description: 'application backend'
version: 0.9.1


modules:
 - name: appname-odata
   type: java
   path: odata
   provides:
    - name: odata_api
      properties:
         url: ${default-url}
   requires:
    - name: appname-db
    - name: appname-hdi-container
      properties:
         JBP_CONFIG_RESOURCE_CONFIGURATION: '[tomcat/webapps/ROOT/META-INF/context.xml:
            {"service_name_for_DefaultDB" : "~{hdi-container-name}"}]'
 - name: appname-db
   type: hdb
   path: appnamedb
   requires:
    - name: appname-hdi-container


resources:
 - name: appname-hdi-container
   properties:
      hdi-container-name: ${service-name}
   type: com.sap.xs.hdi-container

And here is the `mtad.yaml` when trying to deploy via XS CLI

ID: com.company.appname
_schema-version: '2.0.0'
description: 'application backend'
version: 0.9.1


modules:
 - name: appname-odata
   type: java.tomcat
   path: odata/target/odata-0.0.2-SNAPSHOT.war
   provides:
    - name: odata_api
      properties:
         url: ${default-url}
   properties: 
      JBP_CONFIG_RESOURCE_CONFIGURATION: "['tomcat/webapps/ROOT/WEB-INF/resources.xml': {'service_name_for_DefaultDB' : 'appname-hdi-container'}]" 
   requires:
    - name: appname-hdi-container
    - name: appname-db


 - name: appname-db
   type: com.sap.xs.hdi
   path: appnamedb
   requires:
    - name: appname-hdi-container


resources:
 - name: appname-hdi-container
   properties:
      hdi-container-name: ${service-name}
   type: com.sap.xs.hdi-container


The only thing i can find in the deploy-service logs is this when i try to use a fresh mta "ID"

ERR Caused by: com.sap.cloud.lm.sl.common.SLException: Application "appname-db" exists and is associated with MTA "appname"

or this when the ID matches the folder and previous build attempts

(DeploymentToXSA) Deployment to XSA failed (Deployment timeout reached. Stop waiting for deployment result. Please try again later)
Former Member
0 Kudos

As an aside - if anyone can point me to how to clear these logs....the Application Monitor UI is pretty useless - it kinda doesn't even work.

Accepted Solutions (0)

Answers (1)

Answers (1)

Nachshon
Advisor
Advisor
0 Kudos

Hi

It could be that the module name appname-db was already used in other MTA application which was deployed previously to XSA, and now there is naming conflict when deploying another MTA with the same module name. If this is the issue it can easily be resolved by adding the flag --use-namespaces (available when deploying the mtar using the XSA command line).

Hope this helps.

Nachshon

Former Member
0 Kudos

Thanks for the suggestion...unfortunately this did not work.

I also took care to remove all previous deployment attempts. Then I tried both `--use-namespaces` and `-use-namespaces --delete-services`, but neither worked.