Skip to Content
0
Apr 08, 2023 at 05:35 AM

"No service definition found for" for an external odata service

616 Views Last edit Apr 08, 2023 at 02:36 PM 3 rev

Hello,

I am getting an error for a CAP CDS application when deployed in BTP. It runs fine in local VSCode environment. My CDS services refers to two other services. Both the external services are working and tested by themselves. independently. Both the services are defined in cds.requires as "kind": "odata" services. And both are pointing to destinations in destination service.

When tested locally the wrapper service that encompasses two underlying services works fine. It is able to resolve both the underlying services. In fact, the wrapper service default-env.json is referring to the xsuaa deployed in BTP. So both BTP and local wrapper application refer to the same "destination" in BTP.

When testing in BTP I get this error:

image.png

This error is coming from cds-connect.js. What is interesting is the definition for the failing service is not available in model definitions. The model definitions has both the wrapper service with all its entities. And the definitions also has the wrapped service (along with all its entities).

The fact that this is working in VS code makes me think there is some version difference between my local installation and deployed installation. I don't see how that will happen as the versions should be picked from the package.

Both the called/wrapped services are imported into the wrapper CDS using the import. And I see both of them in the srv/external. Here is the package.json for cds:

image.png

Can anyone point me to what I could be missing please?

Thank you

Attachments

image.png (104.4 kB)
image.png (65.3 kB)