hibernate/hibernate-orm · error · IllegalStateException

No path or attribute

Error message

No path or attribute

What it means

Error "No path or attribute" thrown in hibernate/hibernate-orm.

Source

Thrown at hibernate-core/src/main/java/org/hibernate/query/specification/internal/SimpleProjectionSpecificationImpl.java:118

	}

	@Override
	@Nullable
	public String getName() {
		return null;
	}

	@Override
	@Nonnull
	public Class<X> getResultType() {
		if ( path != null ) {
			return path.getType();
		}
		else if ( attribute != null ) {
			return attribute.getJavaType();
		}
		else {
			throw new IllegalStateException( "No path or attribute" );
		}
	}

	@Override
	@Nonnull
	public Map<String, Object> getHints() {
		return Collections.emptyMap();
	}

	@Override
	@Nullable
	public Timeout getTimeout() {
		return null;
	}

	@Override
	@Nonnull
	public String getEntityGraphName() {

View on GitHub (pinned to fad1729dce)

Solutions

  1. No path or attribute was supplied for the projection. Provide an attribute path to project.

When it happens

Trigger: A runtime precondition of the Hibernate query API is violated: No path or attribute

Common situations: Application code or configuration calls the query API in a way that violates its documented contract; the interpolated values in the message identify the offending input.


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