Hi all
I have the following view (let out extra columns):
create or replace view v_exp_camelcase
as
select api_system
,JSON_OBJECT(
'filterTest' VALUE filter
) val_api
from v_filter
;
The handler:
ORDS.DEFINE_HANDLER(
p_module_name => 'api_camelCaseFilter'
,p_pattern => 'test/'
,p_method => 'GET'
,p_source_type => ords.source_type_media
,p_source => 'select ''application/json'', val_api "{}jsons" from v_exp_camelcase where api_system = ''TEST'''
,p_items_per_page => 100
,p_mimes_allowed => 'application/json'
,p_comments => NULL
);
When executed in SQLDeveloper (GET => Edit), I get all the records. When executed in the browser, only one record is returned:
{"filter": 0}
OK, let's try aggregating:
ORDS.DEFINE_HANDLER(
p_module_name => 'api_cus_anschluss-filter'
,p_pattern => 'test/'
,p_method => 'GET'
,p_source_type => ords.source_type_media
,p_source => 'select ''application/json'', JSON_OBJECT(''anschlussFilter'' VALUE JSON_ARRAYAGG(val_api)) "{}jsons" from v_exp_camelcase where api_system = ''TEST'''
,p_items_per_page => 100
,p_mimes_allowed => 'application/json'
,p_comments => NULL
);
Now, I get:
User Defined Resource Error
HTTP Status Code: 555
Request ID: tTY945Yl6pyuWMltcc-7ew
Request Timestamp: 2025-06-17T10:44:12.237644862Z
Error Code: ORDS-25001
The request could not be processed because an error occurred whilst attempting to evaluate a SQL statement associated with this resource. Verify that the URI and payload are correctly specified for the requested operation. If the issue persists then please contact the author of the resource. SQL Error Code: 40478, Error Message: ORA-40478: output value too large (maximum: 4000) https://docs.oracle.com/error-help/db/ora-40478/
Can someone tell me how to fix this problem? (I have already read and reread and reread this: https://www.thatjeffsmith.com/archive/2017/09/ords-returning-raw-json/ ) .
Thank you!