Hibernate does not work anymore with c3p0

Description

Some changes introduced by (In efficient LOB creations backed by streams) are creating issues when c3p0 is used.

It appears to be a side effect caused by the change of org.hibernate.engine.jdbc.CharacterStream.getLength() for it to return a long.

As a consequence, when org.hibernate.type.descriptor.sql.ClobTypeDescriptor.STREAM_BINDING calls st.setCharacterStream(index,characterStream.asReader(), characterStream.getLength()), the method of javax.sql.PreparedStatement being called is setCharacterStream(int, Reader, long) when it use to be setCharacterStream(int, Reader, int).

The call to setCharacterStream(int, Reader, long) results in a AbstractMethodError as this method was introduced by JDBC 4 which is not yet supported by c3p0.

Environment

None

Status

Assignee

Unassigned

Reporter

Jean-Philippe Courson

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Critical
Configure