hibernate/hibernate-orm · error · NoSuchElementException

Table group for navigable path not found: " + navigablePath

Error message

Table group for navigable path not found: " + navigablePath

What it means

Error "Table group for navigable path not found: " + navigablePath" thrown in hibernate/hibernate-orm.

Source

Thrown at hibernate-core/src/main/java/org/hibernate/sql/ast/tree/from/AbstractTableGroup.java:139

		int i = 0;
		if ( tableGroupJoins != null ) {
			for ( ; i < tableGroupJoins.size(); i++ ) {
				if ( tableGroupJoins.get( i ).getNavigablePath() == navigablePath ) {
					tableGroupJoins.add( i, join );
					return;
				}
			}
		}
		i = 0;
		if ( nestedTableGroupJoins != null ) {
			for ( ; i < nestedTableGroupJoins.size(); i++ ) {
				if ( nestedTableGroupJoins.get( i ).getNavigablePath() == navigablePath ) {
					nestedTableGroupJoins.add( i, join );
					return;
				}
			}
		}
		throw new NoSuchElementException("Table group for navigable path not found: " + navigablePath);
	}

	@Override
	public void addNestedTableGroupJoin(TableGroupJoin join) {
		if ( nestedTableGroupJoins == null ) {
			nestedTableGroupJoins = new ArrayList<>();
		}
		assert !nestedTableGroupJoins.contains( join );
		nestedTableGroupJoins.add( join );
	}

	@Override
	public void visitTableGroupJoins(Consumer<TableGroupJoin> consumer) {
		if ( tableGroupJoins != null ) {
			tableGroupJoins.forEach( consumer );
		}
	}

View on GitHub (pinned to fad1729dce)

Solutions

  1. The query references a navigable path for which no table group was registered in the from-clause. Ensure the association/join is declared before it is dereferenced in the query.
  2. If the path is produced internally by Hibernate, report it as a Hibernate bug with the query and mappings.

When it happens

Trigger: A table group lookup by navigable path fails: " + navigablePath.

Common situations: Dereferencing an association or attribute path in HQL/Criteria whose table group was not created in the FROM clause, often from implicit joins on unmapped or mis-mapped paths.


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