c3p0 up to version 0.9.2.x only supports JDBC3 API. You are calling a JDBC4 method. The easiest solution is to upgrade to c3p0-0.9.5-pre5 (which, while still a prerelease, is pretty solid).
Hibernate with C3P0 createBlob gives AbstractMethodError
-
30-07-2022 - |
Pregunta
Hi i'm trying to create a blob with hibernate like this, i can't use Hibernate.getBlobCreator because i don't know the length of the stream
final Session currentSession = sessionFactory.getCurrentSession();
currentSession.doWork(new Work() {
@Override
public void execute(Connection connection) throws SQLException {
connection.createBlob();
}
});
"createBlob" gives me an "AbstractMethodError".
java.lang.AbstractMethodError: com.mchange.v2.c3p0.impl.NewProxyConnection.createBlob()Ljava/sql/Blob;
but connection is of type "com.mchange.v2.c3p0.impl.NewProxyConnection@26561d65", which has implemented this function, how can it be?
Solución
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow