Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Critical Bug in APEX 24.2 Edit Report Query: ORA-06502 Error with Multibyte Characters

Bozo030Jun 16 2025

Error: ORA-06502: PL/SQL: numeric or value error: character string buffer too small

Location: Shared Components → Report Queries → Edit → Source Queries

Problem: After upgrading from APEX 22.1 to 24.2, queries over 4000 chars with multibyte characters (like '☒') crash the Application Builder.

Root Cause: Someone modified the wwv_flow_report_query_dev.GET_DISPLAY_NAME function and used:

...
L_DISPLAY_NAME VARCHAR2( 4000 );
...
L_DISPLAY_NAME := SYS.DBMS_LOB.SUBSTR( P_SQL_QUERY, 4000 )

This tries to fit 4000 characters (potentially 12,000 bytes) into a VARCHAR2(4000) variable. Basic Oracle mistake.

Impact: Application Builder unusable for international queries. This worked perfectly in 22.1.

Fix: Either increase buffer size to VARCHAR2(32767) or use proper byte handling.

This is an unacceptable regression that breaks existing functionality. How did this pass QA without testing multibyte character sets?

Environment: APEX 24.2, Oracle 19c, AL32UTF8, 8000+ char queries

Demand immediate hotfix.

Comments
Post Details
Added on Jun 16 2025
4 comments
93 views