My Oracle Support Banner

ORA-40478 or ORA-40459 running JSON Generation Functions (Doc ID 2354511.1)

Last updated on OCTOBER 02, 2018

Applies to:

Oracle Database - Enterprise Edition - Version 12.2.0.1 and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Information in this document applies to any platform.

Symptoms

On a 12.2.0.1 database, when using JSON Generation Functions like JSON_OBJECT, JSON_ARRAY, JSON_OBJECTAGG or JSON_ARRAYAGG on JSON data fails with either one of these errors:

SQL> SELECT JSON_OBJECT (
KEY 'json_data' VALUE json_data
)
FROM huge_json_value;
ERROR:
ORA-40478: output value too large (maximum: 4000)

 

SQL>select JSON_OBJECT(
KEY 'objects' VALUE
(SELECT JSON_ARRAYAGG(
JSON_OBJECT(
KEY 'object_type' VALUE object_type,
KEY 'object_name' VALUE object_name
)
)
FROM dba_objects where rownum < 100
)
)
from dual;

ERROR at line 12:
ORA-40459: output value too large (actual: 4034, maximum: 4000)

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.