on 2023 Nov 10 7:22 AM
Request clarification before answering.
The error from the OData endpoint is not providing much inner details, in your application logs you should find a detailed exception that points to the root cause of the error.
Looking at your code it looks like you are creating an infinite recursion, as your event handler is registered on CatalogService, but you are also delegating your Select query to CatalogService again, effectively calling your own method.
I think the @Qualifier annotation on the external service should not be CatalogService, but the name of the remote service NorthWind.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi marcbecker thanks for your response
i replaced CatalogService with NorthWind and now i am getting error message as
{"error": {"code": "500","message": "Error executing the statement"}}
@Autowired @Qualifier("NorthWind") private CqnService external;}
i am new to cap java pls help
Again, please provide the error message that you see in the application logs rather. It contains more information.
Most likely you didn't configure the NorthWind as a remote service correctly, please take a look at the documentation here: https://cap.cloud.sap/docs/java/remote-services
Please also make sure that the dependency to cds-feature-remote-odata is present in your Maven dependencies.
Please check that you have configured the NorthWind service as a RemoteService in the configuration, as described here: https://cap.cloud.sap/docs/java/remote-services. The query is delegated to the database (CAPs default behaviour, if no configuration is present) and not the remote OData API.
User | Count |
---|---|
62 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.