Thursday, September 04, 2025

Item ID (P9999_USERNAME) is not an item defined on the current page.

If you are hitting this weird problem when trying to login to your APEX app running on Oracle ADB 23ai:

Item ID (P9999_USERNAME) is not an item defined on the current page. 

According to Oracle APEX development team members this seems to be related to an issue with the database result cache mechanism that can be fixed by executing this procedure as SYSDBA (ADMIN user on ADB):

begin dbms_result_cache.flush; end;

You can find the whole story about the problem on this forum thread.

Now, I am not completely clear if this problem was fixed at some point and then popped up again on a more recent version of Oracle 23ai, in my case ADB is version 23.9.0.25.08 and APEX has been recently upgraded to 24.2.8. 

I am glad I quickly found the workaround this morning as it was really driving me crazy.

PS: The same caching bug seems to affect also APEX_EXEC.OPEN_QUERY_CONTEXT, that is if you change the query in parameter p_sql_query, the new query will be ignored and the "cached" will continue to be executed. 

2 comments:

I appreciate your comment however bear in mind that I might not have the time to reply soon.
Normally I do not reply to all comments but I am glad if you found something useful or if you learned something new, in that case I strongly encourage you to promote the article with the +1 google button.
Flavio