Kbase P178706: Error 8184 inserting a record with CLOB fields using JPA - Java Persistence API
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/11/2011 |
|
Status: Unverified
SYMPTOM(s):
Error 8184 inserting a record with CLOB fields using JPA - Java Persistence API
Character string is too long (8184)
Error Code: -20152
Internal Exception: java.sql.SQLException: [DataDirect][OpenEdge JDBC Driver][OpenEdge] Character string is too long (8184)
Inserting a record on a Blob and Clob field using JPA
FACT(s) (Environment):
All Supported Operating Systems
OpenEdge 10.2B
CAUSE:
With JPA there is no need to use explicit SQL-92 statements. But in this case an INSERT is used, which includes data to be inserted in a CLOB field. The SQL statement is sent directly to Progress database and that?s why error 8184 is returned.
FIX:
On an INSERT, a character value might come from a character literal or from a Select subquery which returns character values in its result set. This is really a form of datatype conversion, from a character datatype to a CLOB datatype.
OpenEdge SQL does not support the datatype conversion from character datatypes (varchar or char) to CLOB. Internally to OpenEdge SQL, there is some provision for this type of conversion, which would enable when this type of Insert is used.An INSERT statement containing a string greater than 1024 characters for the CLOB field would generate an error.
If JDBC is used to insert a CLOB, please refer to solution P187033. If JPA is used to insert a CLOB then refer to solution P186818.