hibernate/hibernate-orm · error · UnsupportedOperationException
The application must supply JDBC connections
Error message
The application must supply JDBC connections
What it means
Error "The application must supply JDBC connections" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/engine/jdbc/connections/internal/UserSuppliedConnectionProviderImpl.java:40
public class UserSuppliedConnectionProviderImpl implements ConnectionProvider {
@Override
public boolean isUnwrappableAs(@Nonnull Class<?> unwrapType) {
return unwrapType.isAssignableFrom( UserSuppliedConnectionProviderImpl.class );
}
@Override
public <T> T unwrap(@Nonnull Class<T> unwrapType) {
if ( unwrapType.isAssignableFrom( UserSuppliedConnectionProviderImpl.class ) ) {
return unwrapType.cast( this );
}
else {
throw new UnknownUnwrapTypeException( unwrapType );
}
}
@Override
public Connection getConnection() throws SQLException {
throw new UnsupportedOperationException( "The application must supply JDBC connections" );
}
@Override
public void closeConnection(Connection connection) throws SQLException {
throw new UnsupportedOperationException( "The application must supply JDBC connections" );
}
@Override
public boolean supportsAggressiveRelease() {
return false;
}
}
View on GitHub (pinned to fad1729dce)
Solutions
- Supply JDBC connections programmatically via the ConnectionProvider passed to the SessionFactory
- Configure a real ConnectionProvider (driver manager or datasource) instead of the user-supplied one
When it happens
Trigger: Thrown at hibernate-core/src/main/java/org/hibernate/engine/jdbc/connections/internal/UserSuppliedConnectionProviderImpl.java:40 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/6022fae9cea0f494.
Report an issue: GitHub.