cancel
Showing results for 
Search instead for 
Did you mean: 

OData services stopped working after deployment of attachments plugin

naveenvishal
Contributor

Hi,

I have deployed a CAP application on production with reads data from SuccessFactors and it works fine.

Additionally, I have to use Attachment plugin (cap-js/attachments (github.com)) for file upload. The attachment plugin works fine on development without breaking anything.

The issue occurred when I deployed the attachment changes to production, where attachment plugin is working fine but it has causes SuccessFactors OData calls to stop working. 

The changes that I did for adding attachments plugin is 1. CDS changes to include attachment plugin and 2. including it in package.json.

Please suggest where else I need to adjust so that this plugin does not conflict with the OData calls.  

naveenvishal_0-1715996972205.png

Thanks and Regards,

Naveen

MioYasutake
Active Contributor
0 Kudos

@naveenvishal

Let me confirm the following points:

  • Is it only the /User API that fails to connect out of the two APIs (/User, /Background_SpecialAssign)?
  • You mentioned that errors occur in the "production" environment. By "production," do you mean the Cloud Foundry Runtime, or do you mean that it only fails in the prod environment among multiple Cloud Foundry Runtime environments (dev, qas, prod)?
  • Do you see any error logs in the backend ? (by command `cf logs <your-service-name> --recent')
naveenvishal
Contributor
0 Kudos

Hi @MioYasutake ,

Please find the details:

Is it only the /User API that fails to connect out of the two APIs (/User, /Background_SpecialAssign)? The other API I cannot check until we bypass User API call. User API call is before we save to pull SF data and /Background_SpecialAssign when we save the data.

You mentioned that errors occur in the "production" environment. By "production," do you mean the Cloud Foundry Runtime, or do you mean that it only fails in the prod environment among multiple Cloud Foundry Runtime environments (dev, qas, prod)? I meant CF Runtime as we have only 1 (Dev) environment where I am test-building the application.

Do you see any error logs in the backend ? (by command `cf logs <your-service-name> --recent') -> Please find attached below the file with errors.

Thank you,

Naveen Vishal

View Entire Topic
naveenvishal
Contributor
0 Kudos

Hi @MioYasutake ,

Please find the details:

  • Is it only the /User API that fails to connect out of the two APIs (/User, /Background_SpecialAssign)? The other API I cannot check until we bypass User API call. User API call is before we save to pull SF data and /Background_SpecialAssign when we save the data.
  • You mentioned that errors occur in the "production" environment. By "production," do you mean the Cloud Foundry Runtime, or do you mean that it only fails in the prod environment among multiple Cloud Foundry Runtime environments (dev, qas, prod)? I meant CF Runtime as we have only 1 (Dev) environment where I am test-building the application. 
  • Do you see any error logs in the backend ? (by command `cf logs <your-service-name> --recent') -> Please find attached below the file with errors

Thank you,

Naveen Vishal

MioYasutake
Active Contributor
0 Kudos

@naveenvishal

Looking at the log you provided, I found the following message:

"Error: Entity \"sfsf.projman.service.ProjectManager.SFSF_User\" is annotated with \"@cds.persistence.skip\" and cannot be served generically."

This error occurs when an event handler for an entity based on an external service is not implemented, as explained in this link. Have you implemented the event handler for SFSF_User?

 

naveenvishal
Contributor
0 Kudos

Hi Mio, you are correct, the issue "Error: Entity \"sfsf.projman.service.ProjectManager.SFSF_User\" is annotated with \"@cds.persistence.skip\" and cannot be served generically." comes when event is not handled. Strangely, looks like somehow event handler not reachable or unhandled event being raised on deploy.

Somehow the inclusion of attachments plugin causing the event/OData to be overridden.