java.sql.SQLFeatureNotSupportedException in LobCreatorBuilderImpl

Description

Application throws exception java.sql.SQLFeatureNotSupportedException: Method org.postgresql.jdbc.PgConnection.createClob() is not yet implemented during hibernation initialization.

This exception not interrupting application work but it very annoying.

As I see hibernate trying to guess is driver support such function or not.

And this driver say that it not supporting this by throwing SQLFeatureNotSupportedException exception. And this is correct answer

I think it will be good to teach hibernate to handle such answer from driver.

In attach Spring Boot Application that illustrate this situation.
Need to change application.properties befor compile and run

spring.datasource.url = jdbcostgresql://localhost:5434/<database>
spring.datasource.username=username
spring.datasource.password=secret

Application ends with NPE. This sample is used as test case for HHH-12332

Attachments

1

Activity

Show:

Anton Mityagin October 3, 2018 at 9:53 AM

added PR.

Josef Bajada March 19, 2018 at 12:19 AM

This error is mostly harmless but is creating a lot of confusion to users upgrading to Spring Boot 2.0 which has gone GA, suddenly seeing exceptions in the log which weren't there before.

https://github.com/spring-projects/spring-boot/issues/12007
https://stackoverflow.com/questions/46493500/hibernate-with-c3p0-createclob-is-not-yet-implemented
https://stackoverflow.com/questions/49110818/method-org-postgresql-jdbc-pgconnection-createclob-is-not-yet-implemented

Former user March 9, 2018 at 12:22 AM

I would say this is very low priority, especially since, as you mentioned, you can set hibernate.jdbc.lob.non_contextual_creation=true

Anton Mityagin March 8, 2018 at 8:41 AM

Yes, it does. But why such exception is logged? I mean what useful information I got when I see SQLFeatureNotSupportedException in my log, while hibernate trying to understand is driver support feature or not

I think that hibernate should handle SQLFeatureNotSupportedException exception, somthing like that:

Former user March 7, 2018 at 11:33 PM

, IIUC, the exception just gets logged as INFO and Hibernate deals with it properly, doesn't it?

Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

Created March 7, 2018 at 3:49 PM
Updated August 4, 2019 at 8:13 PM
Resolved October 12, 2018 at 10:08 AM