Java – ora-24816: extended non long bound data provided after the actual long or lob column

I encountered an exception while updating the table in hibernate

Ora-24816: extended non long bound data provided after the actual long or lob column

I also extracted the SQL query, which looks like

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

Entity class

class Test{

    @Lob
    private String errorText;

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

Please help me. What's wrong with that

Xie lavikumar

Solution

Run oerr ora 24816 for details about the error:

$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.

Therefore, another solution using only one query is to move your lob / long binding after all non lob / long bindings Hibernate may or may not Maybe more like:

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

This DML restriction seems to come at least from Oracle 8i

reference:

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

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>