hibernate/hibernate-orm · error · HibernateException

Unable to make JDBC Connection

Error message

Unable to make JDBC Connection [{url}]

What it means

createConnection received a null Connection back from the underlying driver/datasource connect attempt for the configured JDBC URL. The driver 'succeeded' without throwing but produced no connection; the offending input is the URL/connection properties combination.

Solutions

  1. Verify the JDBC URL, credentials, and that the database is reachable
  2. Ensure the JDBC driver is on the classpath and the URL syntax matches the driver
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at hibernate-core/src/main/java/org/hibernate/engine/jdbc/connections/internal/BasicConnectionCreator.java:61 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/f1eca9095317dd30. Report an issue: GitHub.

Appendix: source

Thrown at hibernate-core/src/main/java/org/hibernate/engine/jdbc/connections/internal/BasicConnectionCreator.java:61

			String initSql) {
		this.serviceRegistry = serviceRegistry;
		this.url = url;
		this.connectionProps = connectionProps;
		this.autoCommit = autocommit;
		this.isolation = isolation;
		this.initSql = initSql;
	}

	@Override
	public String getUrl() {
		return url;
	}

	@Override
	public Connection createConnection() {
		final Connection conn = makeConnection( url, connectionProps );
		if ( conn == null ) {
			throw new HibernateException( "Unable to make JDBC Connection [" + url + "]" );
		}

		try {
			try {
				if ( isolation != null ) {
					conn.setTransactionIsolation( isolation );
				}
			}
			catch (SQLException e) {
				throw convertSqlException( "Unable to set transaction isolation (" + isolation + ")", e );
			}

			try {
				if ( conn.getAutoCommit() != autoCommit ) {
					conn.setAutoCommit( autoCommit );
				}
			}
			catch (SQLException e) {

View on GitHub (pinned to fad1729dce)