I am using on-premise APEX 24.1.0.
I have set a page item which is a Text Area to be data type "CLOB", and have tried RICH TEXT EDITOR also. When I try to load a CLOB field into the page item, when I go into view the SESSION state of the page, all I get is:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
The clob value appears to have loaded into the field, but now I cant see any of my session state when debugging, I just get the error above listed when viewing session of the page.
I have read that CLOB support is now much better in APEX, and I don't see why just changing the data type of the page item is not sufficient.
I have tried loading data in using simple SELECT INTO:
SELECT ABSTRACT INTO :P3_ABSTRACT FROM T_LITERATURE WHERE ID = :P3_ID
And I have tried:
DECLARE
l_clob CLOB;
BEGIN
-- Fetch CLOB from your table
SELECT ABSTRACT
INTO l_clob
FROM T_LITERATURE
WHERE ID = :P3_ID;
-- Direct assignment to CLOB page item
:P3_ABSTRACT := l_clob;
EXCEPTION
WHEN NO_DATA_FOUND THEN
:P3_ABSTRACT := NULL;
WHEN OTHERS THEN
apex_error.add_error(
p_message => 'Error reading CLOB data: ' || SQLERRM,
p_display_location => apex_error.c_inline_in_notification
);
END;
As this only manifests itself when I try to view SESSION via the app debug toolbar, I dont know what the issue is. Is there some database parameter missing.
I created an app on apex.oracle.com, created a CLOB value of 100,000 characters and it worked fine there, just my local copy.
What would be causing the CLOB to apparently load OK into the PAGE, but then give me a numeric error indicative of CLOB size issues when viewing the debug screen. In the DEBUG screen, no session variables are visible, just an error, almost like the SESSION viewer cant deal with showing me a CLOB value in session so it crashes.