hibernate/hibernate-orm · error · ConfigurationException

Unable to locate specified properties file

Error message

Unable to locate specified properties file [%s]

What it means

Wraps the FileNotFoundException caught when opening the explicitly specified properties File in loadProperties(File): the file at that absolute path does not exist, so its settings cannot be loaded.

Solutions

  1. Create the referenced properties file or correct the path configured via hibernate configuration.
  2. Ensure the file is on the classpath or that the absolute file system path is correct.
  3. Check for typos and case mismatches in the file name.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: A configuration resource (cfg.xml URL or properties file) cannot be opened or read.

Common situations: Unreadable or missing config files, wrong URLs, or IO errors while Hibernate loads settings during bootstrap.


AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22). Data as JSON: /api/errors/675a8d9a33336fe0. Report an issue: GitHub.

Appendix: source

Thrown at hibernate-core/src/main/java/org/hibernate/boot/cfgxml/internal/ConfigLoader.java:156

				return loadProperties( stream );
			}
			catch (IOException e) {
				throw new ConfigurationException(
						"Unable to apply settings from properties file [" + file.getAbsolutePath() + "]",
						e
				);
			}
			finally {
				try {
					stream.close();
				}
				catch (IOException e) {
					BOOT_LOGGER.unableToClosePropertiesFileStream( file.getAbsolutePath(), e );
				}
			}
		}
		catch (FileNotFoundException e) {
			throw new ConfigurationException(
					"Unable to locate specified properties file [" + file.getAbsolutePath() + "]",
					e
			);
		}
	}

	private static Properties loadProperties(InputStream stream) throws IOException {
		final var properties = new Properties();
		properties.load( stream );
		return properties;
	}
}

View on GitHub (pinned to fad1729dce)