Weblogic CLOB列存储JSON-错误ORA-02290

时间:2019-02-09 03:08:58

标签: json weblogic oracle-adf clob

我们正在尝试将JSON字符串保存到定义为CLOB的数据库列中。我们收到以下错误:

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)

版本: Weblogic 12.2.1.2

  • 在应用程序ORM层为该列尝试了两种数据类型
    java.sql.Clob和oracle.jbo.domain.ClobDomain
  • 通过SQL直接更新效果很好
  • 在weblogic中启用和禁用wrapping of datatype JDBC数据源。

1 个答案:

答案 0 :(得分:0)

我尝试将我的EO(ORM)属性从oracle.jbo.ClobDomain切换回纯字符串,并且可以正常工作。