cancel
Showing results for 
Search instead for 
Did you mean: 

For application 'app': Service instance 'db' not found

former_member735276
Participant
0 Kudos

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:

View Entire Topic
ManuelStampp
Advisor
Advisor

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

former_member735276
Participant
0 Kudos

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 "?

ManuelStampp
Advisor
Advisor

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

former_member735276
Participant
0 Kudos

@Manuel Stampp , thank you very much for being "by the handle" on all questions) Now I'm trying to connect to a third-party database P.S. I will close the question, how can I connect

former_member735276
Participant
0 Kudos

Hi manuel.stampp, please tell me, is it necessary to somehow describe the entities received from a third-party database? Or is it enough that tables are created in it and that's it?

I just tried to do it - 2 tables were displayed from the .csdl.xml file, and not from a third-party database

ManuelStampp
Advisor
Advisor

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

former_member735276
Participant
0 Kudos

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.

former_member735276
Participant
0 Kudos

In short, there is data in the cloud database and I need to get and implement it (set up a bundle of a mobile application and a server)

former_member735276
Participant
0 Kudos

manuel.stampp , have you disappeared somewhere? Can you tell me with this question how can I get data from a remote database in this OData service?

ManuelStampp
Advisor
Advisor

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

former_member735276
Participant
0 Kudos

Hi manuel.stampp !

Thank you very much! I more or less figured out this question: I did it on top of the base.