{"record":{"id":"43bdfa02de6a5fff","repo":"hibernate/hibernate-orm","slug":"could-not-instantiate-collection-persister-s","errorCode":null,"errorMessage":"Could not instantiate collection persister %s","messagePattern":"Could not instantiate collection persister (.+?)","errorType":"exception","errorClass":"MappingException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/persister/internal/PersisterFactoryImpl.java","lineNumber":146,"sourceCode":"\t\t}\n\t\tcatch (InvocationTargetException e) {\n\t\t\tfinal Throwable target = e.getTargetException();\n\t\t\tif ( target instanceof HibernateException hibernateException ) {\n\t\t\t\tthrow hibernateException;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new MappingException(\n\t\t\t\t\t\tString.format(\n\t\t\t\t\t\t\t\t\"Could not instantiate collection persister implementor `%s` for collection-role `%s`\",\n\t\t\t\t\t\t\t\tpersisterClass.getName(),\n\t\t\t\t\t\t\t\tcollectionBinding.getRole()\n\t\t\t\t\t\t),\n\t\t\t\t\t\ttarget\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new MappingException( \"Could not instantiate collection persister \" + persisterClass.getName(), e );\n\t\t}\n\t}\n\n\tprivate Constructor<? extends CollectionPersister> resolveCollectionPersisterConstructor(Class<? extends CollectionPersister> persisterClass) {\n\t\ttry {\n\t\t\treturn persisterClass.getConstructor( COLLECTION_PERSISTER_CONSTRUCTOR_ARGS );\n\t\t}\n\t\tcatch (NoSuchMethodException noConstructorException) {\n\t\t\tthrow new MappingException( \"Could not find appropriate constructor for \" + persisterClass.getName(), noConstructorException );\n\t\t}\n\t}\n}\n","sourceCodeStart":128,"sourceCodeEnd":159,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/persister/internal/PersisterFactoryImpl.java#L128-L159","documentation":"Error \"Could not instantiate collection persister %s\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Hibernate bootstrap fails to create a configured custom implementation class.","commonSituations":"A custom persister/factory/resolver class is missing, non-public, or lacks the required constructor.","solutions":["Check the custom collection persister class for a compatible constructor and public visibility.","Inspect the causal exception for the real instantiation error."],"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"}