加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Java > 正文

java – ORA-24816:在实际LONG或LOB列之后提供的扩展非LONG绑定

发布时间:2020-12-14 05:46:33 所属栏目:Java 来源:网络整理
导读:我在Hibernate中更新表时遇到异常 ORA-24816:在实际LONG或LOB列之后提供的扩展非LONG绑定数据 我也提取了sql查询,它看起来像 Update table_name set columnName (LOB)=value,colmun2 (String with 4000)=value where id=?; 实体类 class Test{ @Lob private
我在Hibernate中更新表时遇到异常

ORA-24816:在实际LONG或LOB列之后提供的扩展非LONG绑定数据

我也提取了sql查询,它看起来像

Update table_name set columnName (LOB)=value,colmun2 (String with 4000)=value where id=?;

实体类

class Test{

    @Lob
    private String errorText;

    @Column(length = 4000)
    private String text;
}

请帮帮我,这有什么不妥

谢谢
拉维库马尔

解决方法

运行oerr ora 24816以获取有关错误的详细信息:
$oerr ora 24816
24816,... "Expanded non LONG bind data supplied after actual LONG or LOB column"
// *Cause:  A Bind value of length potentially > 4000 bytes follows binding for
//          LOB or LONG.
// *Action: Re-order the binds so that the LONG bind or LOB binds are all
//          at the end of the bind list.

因此,仅使用1个查询的另一个解决方案是在所有非LOB / LONG绑定后移动您的LOB / LONG绑定. Hibernate可能会或可能不会这样.也许更像是:

update T set column2 (String with 4000)=:1,columnName (LOB)=:3 where id=:2;

这个DML限制似乎至少来自Oracle 8i.

参考文献:

> http://openacs.org/forums/message-view?message_id=595742
> https://community.oracle.com/thread/417560

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读