hibernate/hibernate-orm · error · IllegalArgumentException
requested tuple index exceeds actual tuple size
Error message
requested tuple index exceeds actual tuple size
What it means
Error "requested tuple index exceeds actual tuple size" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/jpa/spi/NativeQueryTupleTransformer.java:121
return aliasToValue.get( aliasReference );
}
throw new IllegalArgumentException( "Unknown alias [" + alias + "]" );
}
@Override
public <X> X get(int i, Class<X> type) {
final Object untyped = get( i );
return ( untyped != null ) ? type.cast( untyped ) : null;
}
@Override
public Object get(int i) {
if ( i < 0 ) {
throw new IllegalArgumentException( "requested tuple index must be greater than zero" );
}
if ( i >= size ) {
throw new IllegalArgumentException( "requested tuple index exceeds actual tuple size" );
}
return tuple[i];
}
@Override
public Object[] toArray() {
// todo : make a copy?
return tuple;
}
@Override
public String toString() {
return Arrays.toString( tuple );
}
@Override
public boolean equals(Object obj) {View on GitHub (pinned to fad1729dce)
Solutions
- Use an index within the tuple size; check the tuple length before accessing by index.
When it happens
Trigger: Thrown at hibernate-core/src/main/java/org/hibernate/jpa/spi/NativeQueryTupleTransformer.java:121 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/4549f6c5c4c76064.
Report an issue: GitHub.