{"record":{"id":"232447e216144b86","repo":"hibernate/hibernate-orm","slug":"hibernate-criteria-copy-tree-cannot-be-null-232447","errorCode":null,"errorMessage":"hibernate.criteria.copy_tree cannot be null","messagePattern":"hibernate\\.criteria\\.copy_tree cannot be null","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/internal/StatelessSessionImpl.java","lineNumber":296,"sourceCode":"\t\t\t\t\t\t\t\tdetermineCacheStoreMode( properties ),\n\t\t\t\t\t\t\t\t(CacheRetrieveMode) value\n\t\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase JPA_SHARED_CACHE_STORE_MODE:\n\t\t\tcase JAKARTA_SHARED_CACHE_STORE_MODE:\n\t\t\t\tproperties.put( JPA_SHARED_CACHE_STORE_MODE, value );\n\t\t\t\tproperties.put( JAKARTA_SHARED_CACHE_STORE_MODE, value );\n\t\t\t\tsetCacheMode(\n\t\t\t\t\t\tinterpretCacheMode(\n\t\t\t\t\t\t\t\t(CacheStoreMode) value,\n\t\t\t\t\t\t\t\tdetermineCacheRetrieveMode( properties )\n\t\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase CRITERIA_COPY_TREE:\n\t\t\t\tif ( value == null ) {\n\t\t\t\t\tthrow new IllegalArgumentException( CRITERIA_COPY_TREE + \" cannot be null\" );\n\t\t\t\t}\n\t\t\t\tsetCriteriaCopyTreeEnabled( parseBoolean( value.toString() ) );\n\t\t\t\tbreak;\n\t\t\tcase STATEMENT_BATCH_SIZE:\n\t\t\tcase HINT_JDBC_BATCH_SIZE:\n\t\t\t\tsetJdbcBatchSize( value == null ? null : parseInt( value.toString() ) );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSESSION_LOGGER.tracef( \"Unsupported property : %s\", propertyName  );\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n\t@Override\n\tpublic boolean shouldAutoJoinTransaction() {\n\t\treturn true;","sourceCodeStart":278,"sourceCodeEnd":314,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/internal/StatelessSessionImpl.java#L278-L314","documentation":"Error \"hibernate.criteria.copy_tree cannot be null\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Thrown at hibernate-core/src/main/java/org/hibernate/internal/StatelessSessionImpl.java:296 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the hibernate.criteria.copy_tree configuration property to a non-null boolean value or omit it to use the default."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fad1729dce015f908198d57a8d80274a30f905a5","analyzedAt":"2026-08-22T04:13:57.527Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}