hibernate/hibernate-orm · error · IllegalArgumentException
Unsupported temporal amount type: ${literal}
Error message
Unsupported temporal amount type: ${literal} What it means
Error "Unsupported temporal amount type: ${literal}" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java:6378
appender.appendSql( "' " );
if ( unit == ChronoUnit.YEARS ) {
appender.appendSql( "year" );
}
else if ( unit == ChronoUnit.MONTHS ) {
appender.appendSql( "month" );
}
else {
assert unit == ChronoUnit.DAYS;
appender.appendSql( "day" );
}
}
}
if ( parenthesis ) {
appender.appendSql( ')' );
}
}
else {
throw new IllegalArgumentException( "Unsupported temporal amount type: " + literal );
}
}
/**
* Append a literal SQL {@code uuid} representing the given Java
* {@link UUID}.
* <p>
* This is usually a {@code cast()} expression, but it might be
* a function call.
*/
public void appendUUIDLiteral(SqlAppender appender, UUID literal) {
appender.appendSql( "cast('" );
appender.appendSql( literal.toString() );
appender.appendSql( "' as uuid)" );
}
/**
* Does this dialect support timezone offsets in temporal literals?View on GitHub (pinned to fad1729dce)
Solutions
- Use Duration or Period for temporal amounts.
- Convert the value to a supported temporal amount type.
When it happens
Trigger: Triggered when the application calls a Hibernate dialect feature that the configured database dialect cannot provide: Unsupported temporal amount type: the given literal.
Common situations: Common when running against a database whose dialect lacks this capability, when a mapping or HQL/Criteria query requests unsupported functionality, or when the wrong dialect is configured for the database in use. Error: Unsupported temporal amount type: the given literal.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/21ee6c0096bece7f.
Report an issue: GitHub.