cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CAP Application 404 error after CF deployment

paulo_noronha2
Explorer
0 Kudos
1,071

Hi Experts, 

We are studying a proof of concept using CAP development. The application runs locally but raises a 404 error in CF after deployment. 

paulo_noronha2_0-1738084487405.png

paulo_noronha2_1-1738084565585.png

I published the app in the work zone, but I still received the same error, and I'm unsure how to resolve this issue.

paulo_noronha2_2-1738084636452.png

I've changed the YML and JSON extensions to the TXT to upload the files here. 

Does somebody know what I should do?
Thank you in advance.

 

Accepted Solutions (0)

Answers (1)

Answers (1)

MioYasutake
SAP Champion
SAP Champion

@paulo_noronha2 

In order to access the deployed service, the URL should be like: 

.../odata/v4/processor

Therefore, the 404 error from the destination is not an issue. The service may not be accessible from Work Zone due to the xs-app.json setting. Because the two routes have the same source, the Approuter cannot distinguish them. Try the following settings:

 

{
  "source": "^/odata/(.*)$",
  "target": "/odata/$1",
  "destination": "srv-api",
  ...,
},
{
  "source": "^(.*)$",
  "target": "$1",
  "service": "html5-apps-repo-rt",
  ...
}

 

 

paulo_noronha2
Explorer
0 Kudos
Hi, thanks for your support.
paulo_noronha2
Explorer
0 Kudos
Hi Thanks for you support.
paulo_noronha2
Explorer
0 Kudos

Hi Thanks for your support. It was possible to reach the service using the /odata/v4/processor to complete the URL. I've changed the xs-app.json file as you suggested but the error persists when I try to access the application through workzone: "Failed to load resource: the server responded with a status of 404 ()"

paulo_noronha2_0-1738239479425.png

Locally it's working fine

paulo_noronha2_1-1738239519251.png

 




MioYasutake
SAP Champion
SAP Champion
@paulo_noronha2 What is the exact URL that Work Zone is trying to connect to, which results in a 404 error?
paulo_noronha2
Explorer
0 Kudos

Hi, I am having a problem accessing the following link through the Workzone: https://9949bcdctrial.launchpad.cfapps.us10.hana.ondemand.com/site?siteId=3845475c-3244-425f-8dce-88....

I've found the 404 not found error below:

paulo_noronha2_0-1738672657353.png