Search code examples
jsonweblogicoracle-adfclob

Weblogic CLOB column storing JSON - Error ORA-02290


We are trying to save JSON string to the database column defined as CLOB. We get the below error:

Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-02290: check constraint (MYSCHEMA.MY_JSON_CHK) violated

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:466)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:407)
    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1113)
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:546)
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:269)
    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:603)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:234)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:55)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1006)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1316)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:5010)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:5136)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1519)
    at weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStatement.java:170)

Version: Weblogic 12.2.1.2

  • Attempted two data types at application ORM layer for this column
    java.sql.Clob & oracle.jbo.domain.ClobDomain
  • Direct update via SQL works good
  • Enabled & Disabled wrapping of datatype in weblogic JDBC datasource.

Solution

  • I attempted to switch my EO (ORM) attribute from oracle.jbo.ClobDomain back to a plain String and this worked.