开发者

ORA-22835 using JPA (Buffer too small)

开发者 https://www.devze.com 2022-12-21 03:30 出处:网络
I am trying to persist an Entity with a @Lob annotated String field.The content of that fiels if bigger than the 40k buffer size limit.

I am trying to persist an Entity with a @Lob annotated String field. The content of that fiels if bigger than the 40k buffer size limit.

The first problem I had was related to the setString method used internally by the JPA implementation (Hibernate in my case) and the Oracle JDBC Driver. This problem was solved adding

<property name="hibernate.connection.SetBigStringTryClob" value="true"/>

to my persistence.xml file.

Then, the error changed to a ORA-22835 error (the buffe开发者_StackOverflow中文版r is too small). ¿Is there any way that JPA solves this problem without going to a low-level implementation? ¿Any suggestions?


Can your try with Oracle 10g Release 2 drivers (pick up the most recent ojdbc14.jar i.e. 10.2.0.4) or later (older versions are buggy as mentioned in this previous answer).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号