HHH-16222 Improve warning triggered when the PostgreSQL JDBC driver is not accessible

This commit is contained in:
Sanne Grinovero 2023-02-23 12:20:21 +00:00 committed by Sanne Grinovero
parent bce328cb29
commit 02da5a81a8
2 changed files with 6 additions and 1 deletions

View File

@ -52,7 +52,7 @@ public abstract class PostgreSQLPGObjectJdbcType implements JdbcType {
valueSetter = ReflectHelper.setterMethodOrNull( pgObjectClass, "value", String.class ); valueSetter = ReflectHelper.setterMethodOrNull( pgObjectClass, "value", String.class );
} }
catch (Exception e) { catch (Exception e) {
LOG.warn( "PostgreSQL JDBC driver classes are inaccessible and thus, certain DDL types like JSONB, JSON, GEOMETRY can not be used!", e ); LOG.postgreSQLJdbcDriverNotAccessible();
} }
PG_OBJECT_CONSTRUCTOR = constructor; PG_OBJECT_CONSTRUCTOR = constructor;
TYPE_SETTER = typeSetter; TYPE_SETTER = typeSetter;

View File

@ -1819,4 +1819,9 @@ public interface CoreMessageLogger extends BasicLogger {
id = 513) id = 513)
void unableToGenerateReflectionOptimizer(String className, @Cause Throwable cause); void unableToGenerateReflectionOptimizer(String className, @Cause Throwable cause);
@LogMessage(level = WARN)
@Message(value = "PostgreSQL JDBC driver classes are inaccessible and thus, certain DDL types like JSONB, JSON, GEOMETRY can not be used.",
id = 514)
void postgreSQLJdbcDriverNotAccessible();
} }