on 04-14-2021 3:54 PM
Good day!
I tried to put together a project for this TUTORIAL and the question arose: when generating tasks.json, I indicated that I would use the PostgreSQL database, after which I started executing this (tasks.json) task, but the error indicated in the title of this question "For application 'app': Service instance 'db' not found" ... As I understand it, it does not find the DB. Where should it be generated or connected to the project? And what if my database is located on a third-party cloud, for example?
Thanks in advance!
P.S. I am attaching a screenshot of the tasks.json, manifest.yml and mta.yaml file.
MTA:
Error:
Manifest.yml:
Tasks.json:
Hey Sergey,
I read out of the logs that your postgreSQL service instance does not exist or cannot be found in that name. It should be created as a user-provided service instance.
Which steps have you actually followed?
This part here describes how to bind databases to the service:
Service Generator Tool - SAP Mobile Services Documentation
There it is described how to provide DB credentials via a user-provided service instance and bind it.
Your bind should therefore rather e.g. be "-bind", "pgsql:user-provided:test_db_postgresql" from what I understood.
Regards
Manuel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good day @Manuel Stampp ! I did not do so many steps - I generated the tasks.json file and tried to complete the task - and therefore, I encountered this error "Service instance <my-db> not found. So I'm trying to understand what's the matter and how to bind a third-party database. You described in your comment what you can bind ("-bind", "pgsql: user-provided: test_db_postgresql" "), and what exactly should be filled in" pgsql "and" provided "?
Hello Sergey,
in order to allow connection, you need to specify access path and credentials in the from of Apache DBCP as in the following screenshot:
For best performance, you should make sure it is running on the same hyperscaler as the subaccount. Also you may need to allow-list your application on the database hyperscaler.
Kind regards
Manuel
Hi Sergey,
I still do not know exactly what you are trying to do.
I assume from your answer that your trying something related to Working with Existing Database Tables - SAP Mobile Services Documentation?
Kind regards
Manuel
I will try to describe to you:
The task is to create a mobile application with a connection to a database in the cloud (in this case, the Russian company Yandex.Cloud on PostgreSQL). I read the backend-tools and created a project accordingly in SAP Bussiness Application Studio, with your help I tied it to a third-party database (test_db_postgresql) located on Yandex.Cloud, deployed the application and created a service in the SAP Mobile Service (Mobile Connection with Application Routes from the deployed application ).
Now I create a mobile application using Android Studio and SAP BTP For Android, where I actually bind the service created in the Mobile Service. So the task is for the mobile application to receive data from a database located at Yandex.Cloud.
Hey Sergey,
there are basically two possibilities. Either, according to the docs linked above, you can build the OData service on top of the existing database tables.
Or you can cache/replicate data with MBT using entity handlers for JDBC: Caching Data in the Cloud - SAP Mobile Services Documentation
I must admit that this platform is not a medium where I can give support for such a question and I do not have a valid example that I can give to you.
Kind regards
Manuel
User | Count |
---|---|
76 | |
10 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.