hibernate/hibernate-orm · error · ServiceException

Specified ConnectionCreatorFactory

Error message

Specified ConnectionCreatorFactory {} could not be loaded

What it means

loadConnectionCreatorFactory resolved the configured ConnectionCreatorFactory class but could not instantiate it reflectively. The offending input is the hibernate.connection.creator_factory class name setting.

Solutions

  1. Ensure the ConnectionCreatorFactory class is on the classpath and loadable
  2. Correct the factory class name in the configuration
Defensive patterns

Strategy: try-catch

When it happens

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

Appendix: source

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

			}
		}
	}

	private static ConnectionCreatorFactory loadConnectionCreatorFactory(
			String connectionCreatorFactoryClassName, ServiceRegistry serviceRegistry) {
		if ( connectionCreatorFactoryClassName == null ) {
			CONNECTION_INFO_LOGGER.noConnectionCreatorFactoryClassSpecified();
			return null;
		}
		else if ( serviceRegistry != null ) {
			final Class<ConnectionCreatorFactory> factoryClass =
					serviceRegistry.requireService( ClassLoaderService.class )
							.classForName( connectionCreatorFactoryClassName );
			try {
				return factoryClass.newInstance();
			}
			catch ( Exception e ) {
				throw new ServiceException( "Specified ConnectionCreatorFactory " + connectionCreatorFactoryClassName
											+ " could not be loaded", e );
			}
		}
		else {
			try {
				return (ConnectionCreatorFactory) Class.forName( connectionCreatorFactoryClassName ).newInstance();
			}
			catch (Exception e1) {
				throw new ServiceException( "Specified ConnectionCreatorFactory " + connectionCreatorFactoryClassName
											+ " could not be loaded", e1 );
			}
		}
	}


	// use the pool ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

	@Override

View on GitHub (pinned to fad1729dce)