Pagina's

zondag 14 augustus 2011

Nice scenario



I received the following problem in Oracle Support that baffled me for some time.

Environment:
10.2.0.3 Rdbms
4.0.2.00.07 Application Express

Error in the browser:
Unable To Fetch Authentication_scheme In Application.

Error in the webserver log files:
ORA-06512: at "APEX_040000.WWV_FLOW", line xx
ORA-06512: at "APEX_040000.WWV_FLOW", line xx
ORA-06512: at "APEX_040000.F", line xx
ORA-06512: at "APEX_040000.F", line xx
ORA-06512: at line xx
ORA-20867: ORA-06502: PL/SQL: numeric or value error: character string buffer to small

Above error is also described in the known issues against Application Express Release 4.0.2
Known issues in APEX 4.0.2

Solution: Apply the patch for bug 5890966 (related bug) or apply the 10.2.0.3 Patch 6 on Windows Platforms (if on Windows Platforms) or apply the 10.2.0.4 database patch set or upgrade to 11gR1 or later.

But after applying the necessary patches the problem was not fixed yet.

Received the application without customer data. So a plain sql file.
Stripped the appliction completely.
At the end, I only had one page left.

Tried to create the most simple testcase as possible so replaced the tables used with the demo tables of Oracle DEPT and EMP.
Changed the authentication schema to application express.
Problem still reproduced.

Removed the form on the table and created a 'dummy HTML' region instead.
Tested the application:

After logging in, I received the ORA-06502 error
Could not write to error page

Checked the TAB pages and indeed, the problem was caused by the amount of TAB pages used!

Connclusion:
I was completely in the wrong direction because of the error message generated by the system.
Now, I can understand the error message generated by the system!
By eliminating, I was able to find the real underlying cause of the problem.