hibernate/hibernate-orm · error · IllegalArgumentException
org.hibernate.fetchProfile cannot be null
Error message
org.hibernate.fetchProfile cannot be null
What it means
Error "org.hibernate.fetchProfile cannot be null" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java:2688
case JAKARTA_SHARED_CACHE_STORE_MODE:
properties.put( JPA_SHARED_CACHE_STORE_MODE, value );
properties.put( JAKARTA_SHARED_CACHE_STORE_MODE, value );
setCacheMode(
interpretCacheMode(
(CacheStoreMode) value,
determineCacheRetrieveMode( properties )
)
);
break;
case CRITERIA_COPY_TREE:
if ( value == null ) {
throw new IllegalArgumentException( CRITERIA_COPY_TREE + " cannot be null" );
}
setCriteriaCopyTreeEnabled( parseBoolean( value.toString() ) );
break;
case HINT_FETCH_PROFILE:
if ( value == null ) {
throw new IllegalArgumentException( HINT_FETCH_PROFILE + " cannot be null" );
}
enableFetchProfile( value.toString() );
break;
case USE_SUBSELECT_FETCH:
case HINT_ENABLE_SUBSELECT_FETCH:
setSubselectFetchingEnabled( value != null && parseBoolean( value.toString() ) );
break;
case DEFAULT_BATCH_FETCH_SIZE:
case HINT_BATCH_FETCH_SIZE:
setFetchBatchSize( value == null ? -1 : parseInt( value.toString() ) );
break;
case STATEMENT_BATCH_SIZE:
case HINT_JDBC_BATCH_SIZE:
setJdbcBatchSize( value == null ? null : parseInt( value.toString() ) );
break;
default:
SESSION_LOGGER.tracef( "Unsupported property : %s", propertyName );
break;View on GitHub (pinned to fad1729dce)
Solutions
- Provide a valid fetch profile name when enabling a fetch profile, or remove the org.hibernate.fetchProfile hint.
When it happens
Trigger: Thrown at hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java:2688 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/fe0f852775bf26d6.
Report an issue: GitHub.