hibernate/hibernate-orm · error · HibernateException
Could not convert isolation value [{}] to java.sql.Connectio
Error message
Could not convert isolation value [{}] to java.sql.Connection constant name What it means
Error "Could not convert isolation value [{}] to java.sql.Connection constant name" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/engine/jdbc/connections/internal/ConnectionProviderInitiator.java:381
throw new ConnectionProviderConfigurationException( "Unknown transaction isolation level: " + isolationLevel );
}
}
/**
* Gets the {@link Connection} constant name corresponding to the given isolation.
*
* @param isolation The transaction isolation numeric value.
*
* @return The corresponding Connection constant name.
*
* @throws HibernateException If the given isolation does not map to JDBC standard isolation
*
* @see #toIsolationNiceName
*/
public static String toIsolationConnectionConstantName(Integer isolation) {
final String name = ISOLATION_VALUE_CONSTANT_NAME_MAP.get( isolation );
if ( name == null ) {
throw new HibernateException(
"Could not convert isolation value [" + isolation + "] to java.sql.Connection constant name"
);
}
return name;
}
/**
* Get the name of a JDBC transaction isolation level
*
* @param isolation The transaction isolation numeric value.
*
* @return a nice human-readable name
*
* @see #toIsolationConnectionConstantName
*/
public static String toIsolationNiceName(Integer isolation) {
final String name = isolation != null ? ISOLATION_VALUE_NICE_NAME_MAP.get( isolation ) : null;
return name == null ? "<unknown>" : name;View on GitHub (pinned to fad1729dce)
Solutions
- Provide an isolation value that maps to a java.sql.Connection constant (1, 2, 4, or 8)
- Use the constant name instead of an arbitrary string for the isolation setting
When it happens
Trigger: Thrown at hibernate-core/src/main/java/org/hibernate/engine/jdbc/connections/internal/ConnectionProviderInitiator.java:381 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/412c9b47f4e7fdee.
Report an issue: GitHub.