hibernate/hibernate-orm · error · IllegalArgumentException
hibernate.criteria.copy_tree cannot be null
Error message
hibernate.criteria.copy_tree cannot be null
What it means
Error "hibernate.criteria.copy_tree cannot be null" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/internal/StatelessSessionImpl.java:296
determineCacheStoreMode( properties ),
(CacheRetrieveMode) value
)
);
break;
case JPA_SHARED_CACHE_STORE_MODE:
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 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;
}
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@Override
public boolean shouldAutoJoinTransaction() {
return true;View on GitHub (pinned to fad1729dce)
Solutions
- Set the hibernate.criteria.copy_tree configuration property to a non-null boolean value or omit it to use the default.
When it happens
Trigger: Thrown at hibernate-core/src/main/java/org/hibernate/internal/StatelessSessionImpl.java:296 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/232447e216144b86.
Report an issue: GitHub.