Error when inserting a CLOB into Oracle DB using a JDBC step: ORA-01704 string literal too long

book

Article ID: 194819

calendar_today

Updated On:

Products

CLOUDTEST CA Application Test CA Cloud Test Mobile MOBILECLOUD Service Virtualization

Issue/Introduction

When trying to insert a 5000 character JSON string into an Oracle CLOB field, the following error message is shown: 
ORA-01704 string literal too long

The insert is done with a JDBC step and a database procedure.
There is no error if the string is less than 4000 characters.
The CLOB column is supposed to be able to contain more than 4000 characters.

Environment

Release : 10.5.1

Component : CA Service Virtualization

Resolution

Enter all parameters for the database procedure in the Parameter section of the step.
Not in the SQL Statement section.

Additional Information

https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/devops/devtest-solutions/10-5/reference/test-step-descriptions/other-transaction-steps/sql-database-execution-jdbc.html