hibernate/hibernate-orm · error · ParsingException

Illegal domain path '" + ctx.getText() + "'

Error message

Illegal domain path '" + ctx.getText() + "'

What it means

Error "Illegal domain path '" + ctx.getText() + "'" thrown in hibernate/hibernate-orm.

Source

Thrown at hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java:5826

										),
										new SqmLiteral<>(
												1,
												nodeBuilder().getIntegerType(),
												nodeBuilder()
										),
										nodeBuilder()
								)
						),
						null,
						queryEngine()
				);
			}
			else {
				throw new SemanticException( "Slice operator applied to expression which is not a string or SQL array", query );
			}
		}
		else {
			throw new ParsingException( "Illegal domain path '" + ctx.getText() + "'" );
		}
	}

	private SemanticPathPart visitIndexedPathAccessFragment(
			SemanticPathPart pathPart,
			HqlParser.IndexedPathAccessFragmentContext idxCtx) {
		if ( idxCtx == null ) {
			return pathPart;
		}

		final var indexExpression = (SqmExpression<?>) idxCtx.expression().accept(this );
		final boolean hasIndexContinuation = idxCtx.DOT() != null;
		final var indexedPath =
				pathPart.resolveIndexedAccess( indexExpression, !hasIndexContinuation, this );
		if ( hasIndexContinuation ) {
			dotIdentifierConsumerStack.push(
					new BasicDotIdentifierConsumer( indexedPath, this ) {
						@Override

View on GitHub (pinned to fad1729dce)

Solutions

  1. The domain path is illegal. Check that each path step exists on the previous type and that the root is a valid entity or identification variable.

When it happens

Trigger: A runtime precondition of the Hibernate query API is violated: Illegal domain path '" + ctx.getText() + "'

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/0d6e1b26bdd331c1. Report an issue: GitHub.