hibernate/hibernate-orm · error · MappingException
Logical column name cannot be null
Error message
Logical column name cannot be null
What it means
Error "Logical column name cannot be null" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/boot/internal/InFlightMetadataCollectorImpl.java:1163
@Override
public String getPhysicalColumnName(Table table, String logicalName) throws MappingException {
final Identifier identifier = getDatabase().toIdentifier( logicalName );
if ( identifier == null ) {
throw new MappingException( String.format(
Locale.ENGLISH,
"Column with logical name '%s' in table '%s' cannot be mapped to column identifier",
logicalName,
table.getName()
) );
}
return getPhysicalColumnName( table, identifier );
}
@Override
public String getPhysicalColumnName(Table table, Identifier logicalName) throws MappingException {
if ( logicalName == null ) {
throw new MappingException( "Logical column name cannot be null" );
}
Table currentTable = table;
while ( currentTable != null ) {
final TableColumnNameBinding binding = columnNameBindingByTableMap.get( currentTable );
if ( binding != null ) {
final String physicalName = binding.logicalToPhysical.get( logicalName );
if ( physicalName != null ) {
return physicalName;
}
}
currentTable =
currentTable instanceof DenormalizedTable denormalizedTable
? denormalizedTable.getIncludedTable()
: null;
}
assert table != null;View on GitHub (pinned to fad1729dce)
Solutions
- Pass a non-null logical column name when looking up or registering a column mapping.
- Check annotation/mapping configuration for a column definition with a missing or empty name.
- Use @Column(name=...) explicitly if the implicit naming produces a null.
When it happens
Trigger: A null logical column name is passed when linking logical-to-physical column mappings.
Common situations: Internal binding of a mapping that did not produce a column name, typically a formula or an incomplete mapping annotation combination.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/a239cc2c13bad410.
Report an issue: GitHub.