hibernate/hibernate-orm · error · HibernateException
The configured time zone storage type NATIVE is not…
Error message
The configured time zone storage type NATIVE is not supported with the configured dialect
What it means
Dialect capability check in toTimeZoneStorageStrategy: hibernate.timezone.default_storage is NATIVE, but the resolved dialect reports TimeZoneSupport other than NATIVE. The database cannot store TIMESTAMP WITH TIME ZONE natively, so the requested storage strategy is unusable with this dialect.
Solutions
- Change hibernate.timezone.default_storage away from NATIVE (use NORMALIZE, COLUMN, or DEFAULT) for this dialect/database.
- Upgrade to a database/driver version whose dialect supports native timestamptz storage.
- Check the dialect actually configured; a wrong dialect can falsely report missing support.
Defensive patterns
Strategy: validation
When it happens
Trigger: hibernate.timezone.default_storage=NATIVE is used with a dialect that cannot store time zones natively.
Common situations: Enabling native time zone storage on a database/dialect without native timezone-capable column types.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/3cd9708c286e7d27.
Report an issue: GitHub.
Appendix: source
Thrown at hibernate-core/src/main/java/org/hibernate/boot/internal/MetadataBuilderImpl.java:840
}
@Override
@Nonnull
public TimeZoneSupport getTimeZoneSupport() {
try {
return getDialect().getTimeZoneSupport();
}
catch ( ServiceException se ) {
return TimeZoneSupport.NONE;
}
}
@Nonnull
private TimeZoneStorageStrategy toTimeZoneStorageStrategy(@Nonnull TimeZoneSupport timeZoneSupport) {
return switch (defaultTimezoneStorage) {
case NATIVE -> {
if ( timeZoneSupport != TimeZoneSupport.NATIVE ) {
throw new HibernateException( "The configured time zone storage type NATIVE is not supported with the configured dialect" );
}
yield TimeZoneStorageStrategy.NATIVE;
}
case COLUMN -> TimeZoneStorageStrategy.COLUMN;
case NORMALIZE -> TimeZoneStorageStrategy.NORMALIZE;
case NORMALIZE_UTC -> TimeZoneStorageStrategy.NORMALIZE_UTC;
case AUTO -> switch (timeZoneSupport) {
// if the db has native support for timezones, we use that, not a column
case NATIVE -> TimeZoneStorageStrategy.NATIVE;
// otherwise we use a separate column
case NORMALIZE, NONE -> TimeZoneStorageStrategy.COLUMN;
};
case DEFAULT -> switch (timeZoneSupport) {
// if the db has native support for timezones, we use that, and don't normalize
case NATIVE -> TimeZoneStorageStrategy.NATIVE;
// otherwise we normalize things to UTC
case NORMALIZE, NONE -> TimeZoneStorageStrategy.NORMALIZE_UTC;
};View on GitHub (pinned to fad1729dce)