In the middle of development process of an application in Oracle APEX I started to get really weird 404 (Not Found)
exceptions from APEX engine.
Sometimes APEX responds 404 (Not Found)
on different actions. Points where I can get these exceptions may be different:
- When an AJAX call is made:
- When a modal page is submitted:
- When a page is changed in the App Builder:
- Sometimes even when a developer is logged in to the App Builder:
The weirdest thing about all this is that this exception occurs only once in a row. For example, If I press a button to submit a page, I get the exception the first time, when I press the button the second time, everything works.
One of the examples how to reproduce the exeption with the 100% probabilty - I have a page with several interactive reports on it. Each interactive report has a link column to edit the row. When a user clicks the link, a modal window appears with a form, then they should click the button "Save". So the steps to reproduce the error:
- Open the page with interactive reports.
- Choose a row to edit, click the link column.
- Change anything in the modal window, click save.
- The error appears.
- Click
Save
again. - Data is saved, modal window is closed and the report refreshed.
In the browser javascript console I see the following:
POST http://<my_ip_address>/apex/wwv_flow.ajax 404 (Not found)
XHR failed loading: POST "http://<my_ip_address>/apex/wwv_flow.ajax".
Also, I opened a discussion on OTN about the topic where I gave some additional information.
Using trial and error method, the reason of the error was found.
It appeared, that the error is related to items or report columns which base on
LOV
(List of Values). And only when theseLOV
are based on pipelined functions which return plenty of rows (let's say 1 hundred and more).This is what happens:
LOV
(which in their turn base on database pipelined functions). For example, severalPopup LOV
items. User1 set some values and pressed the submit button.APEX accept process
recieves the request, tries to fetch rows from LOV, but don't need all of them, and as far as I understand, tries to close the cursor.ORA-06548: no more rows needed
. This is absolutely legitimate behaviour.404 (Not Found)
as a result of the request.APEX show process
wraps this exception and returns it to User1. User1 sees one of the pictures I shown above.So the solution is to suppress any exceptions generated by pipelined functions which are used in LOV components. After doing so, everything started to work well.
I assume it an Oracle APEX bug because of three reasons - the reaction on the pipelined function is inadequate, the generated error in response is intransparent for both developers and users and it's not even logged properly anywhere.