LAdO (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on HHH-8511 (
https://hibernate.atlassian.net/browse/HHH-8511?atlOrigin=eyJpIjoiZDkyNTN...
)
Re: "Can't convert fromnull" when inserting clob in Informix (
https://hibernate.atlassian.net/browse/HHH-8511?atlOrigin=eyJpIjoiZDkyNTN...
)
The same error occurred in the latest Hibernate master branch (5.5.0-SNAPSHOT) when using
Informix JDBC Driver version 3.70.JC8.
Caused by: java.sql.SQLException: Can't convert fromnull
at com.informix.util.IfxErrMsg.getSQLMinorException(IfxErrMsg.java:547)
at com.informix.jdbc.IfxObject.fromCharacterStream(IfxObject.java:706)
at com.informix.jdbc.IfxValue.a(IfxValue.java:929)
at
com.informix.jdbc.IfxPreparedStatement.setCharacterStream(IfxPreparedStatement.java:4440)
at
org.hibernate.type.descriptor.sql.ClobTypeDescriptor$3$1.doBind(ClobTypeDescriptor.java:129)
at org.hibernate.type.descriptor.sql.BasicBinder.bind(BasicBinder.java:73)
at
org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:276)
at
org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:271)
at
org.hibernate.type.AbstractSingleColumnStandardBasicType.nullSafeSet(AbstractSingleColumnStandardBasicType.java:39)
at
org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:2948)
at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3245)
... 34 more
@Lars Blomenkamp's suggestion helped with this version
@Override
public boolean useInputStreamToInsertBlob () {
return false ;
}
Conversely, when using the Informix JDBC Driver version 4.10.JC12, everything is OK. If
useInputStreamToInsertBlob () returns false, the database returns incorrect data.
java.lang.AssertionError:
Expected: is "xxxxxxxxxx"
but: was " xxxxxxxxxx"
The unit test is in the attachment InformixLobStringTest.java (
https://hibernate.atlassian.net/secure/attachment/49703/49703_InformixLob...
)
(
https://hibernate.atlassian.net/browse/HHH-8511#add-comment?atlOrigin=eyJ...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-8511#add-comment?atlOrigin=eyJ...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100129- sha1:b514962 )