POST /apex/wwv_flow.ajax returns with 404 (Not found) on pages submit and load

2.6k views Asked by At

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: enter image description here
  • When a modal page is submitted: enter image description here
  • When a page is changed in the App Builder: enter image description here
  • Sometimes even when a developer is logged in to the App Builder: enter image description here

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:

  1. Open the page with interactive reports.
  2. Choose a row to edit, click the link column.
  3. Change anything in the modal window, click save.
  4. The error appears.
  5. Click Save again.
  6. 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.

1

There are 1 answers

0
whatsupbros On BEST ANSWER

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 these LOV are based on pipelined functions which return plenty of rows (let's say 1 hundred and more).

This is what happens:

  1. User1 submits a page where there're several items based on LOV (which in their turn base on database pipelined functions). For example, several Popup LOV items. User1 set some values and pressed the submit button.
  2. 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.
  3. Pipelined fuction raises an exception - ORA-06548: no more rows needed. This is absolutely legitimate behaviour.
  4. APEX engine reacts inadequately on it, and returns 404 (Not Found) as a result of the request.
  5. 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.