hibernate/hibernate-orm · error · PersistenceException

Unable to parse org.hibernate.flushMode: {}

Error message

Unable to parse org.hibernate.flushMode: {}

What it means

Error "Unable to parse org.hibernate.flushMode: {}" thrown in hibernate/hibernate-orm.

Source

Thrown at hibernate-core/src/main/java/org/hibernate/jpa/internal/util/ConfigurationHelper.java:62

		}
		else {
			return FlushModeTypeHelper.interpretQueryFlushMode( value.toString() );
		}
	}

	public static FlushMode getFlushMode(Object value, FlushMode defaultFlushMode) {
		if ( value instanceof FlushMode mode ) {
			return mode;
		}
		else if ( value instanceof jakarta.persistence.FlushModeType flushModeType ) {
			return getFlushMode( flushModeType );
		}
		else if ( value instanceof String string ) {
			return getFlushMode( string );
		}
		else {
			if ( defaultFlushMode == null ) {
				throw new PersistenceException( "Unable to parse org.hibernate.flushMode: " + value );
			}
			return defaultFlushMode;
		}
	}

	public static FlushMode getFlushMode(Object value) {
		return getFlushMode( value, null );
	}

	private static FlushMode getFlushMode(String flushMode)  {
		return flushMode == null ? null : FlushMode.valueOf( flushMode.toUpperCase(Locale.ROOT) );
	}

	private static FlushMode getFlushMode(FlushModeType flushMode)  {
		return switch ( flushMode ) {
			case AUTO -> FlushMode.AUTO;
			case COMMIT -> FlushMode.COMMIT;
			case EXPLICIT ->  FlushMode.MANUAL;

View on GitHub (pinned to fad1729dce)

Solutions

  1. Set org.hibernate.flushMode to a valid FlushMode value (AUTO, COMMIT, ALWAYS, MANUAL) as string; fix typos in configuration.

When it happens

Trigger: Thrown at hibernate-core/src/main/java/org/hibernate/jpa/internal/util/ConfigurationHelper.java:62 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


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