hibernate/hibernate-orm · error · IllegalArgumentException

No audit table info for table

Error message

No audit table info for table '{originalTableName}' (known tables: {tableAuditInfoMap.keySet()})

What it means

Audit-mapping lookup failure: no audit info was registered for the table being audited — the table name (shown in the message, plus known tables) is missing from the audit model, typically an unsupported/unknown table mapping.

Solutions

  1. Ensure the table is audited (@Audited on the entity mapping that table) so Envers registers audit info for it.
  2. Check the table name spelling matches the physical table name of the audited mapping.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown when audit (Envers-style) mapping metadata is requested for a table that has no registered audit table info.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AuditMappingImpl.java:125

		this.auditStrategy = sessionFactory.getSessionFactoryOptions().getAuditStrategy();
		final var changesetIdJavaType = sessionFactory.getChangesetCoordinator().getIdentifierType();

		jdbcMapping = resolveJdbcMapping( typeConfiguration, changesetIdJavaType );
		changesetIdBasicType = resolveBasicType( typeConfiguration, changesetIdJavaType );

		final var dialect = sessionFactory.getJdbcServices().getDialect();
		currentTimestampFunctionName =
				sessionFactory.getChangesetCoordinator().useServerTimestamp( dialect )
						? dialect.currentTimestamp()
						: null;

		maxFunctionDescriptor = resolveMaxFunction( sessionFactory );
	}

	private TableAuditInfo resolveInfo(String originalTableName) {
		final var info = tableAuditInfoMap.get( originalTableName );
		if ( info == null ) {
			throw new IllegalArgumentException(
					"No audit table info for table '" + originalTableName
							+ "' (known tables: " + tableAuditInfoMap.keySet() + ")" );
		}
		return info;
	}

	@Override
	public AuditEntityLoader getEntityLoader() {
		if ( entityLoader == null ) {
			if ( entityMappingType == null ) {
				throw new IllegalStateException( "getEntityLoader() is not available for collection audit mappings" );
			}
			entityLoader = new AuditEntityLoaderImpl( entityMappingType, sessionFactory );
		}
		return entityLoader;
	}

	@Override

View on GitHub (pinned to fad1729dce)