{"record":{"id":"7860c78595a3a214","repo":"hibernate/hibernate-orm","slug":"could-not-initialize-custom-persisterfactory-impl","errorCode":null,"errorMessage":"Could not initialize custom PersisterFactory impl [%s]","messagePattern":"Could not initialize custom PersisterFactory impl \\[(.+?)\\]","errorType":"exception","errorClass":"ServiceException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/persister/internal/PersisterFactoryInitiator.java","lineNumber":50,"sourceCode":"\t\tfinal Object customImpl = configurationValues.get( IMPL_NAME );\n\t\tif ( customImpl == null ) {\n\t\t\treturn new PersisterFactoryImpl();\n\t\t}\n\n\t\tif ( customImpl instanceof PersisterFactory persisterFactory ) {\n\t\t\treturn persisterFactory;\n\t\t}\n\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tfinal var customImplClass =\n\t\t\t\tcustomImpl instanceof Class\n\t\t\t\t\t\t? (Class<? extends PersisterFactory>) customImpl\n\t\t\t\t\t\t: locate( registry, customImpl.toString() );\n\t\ttry {\n\t\t\treturn customImplClass.newInstance();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new ServiceException( \"Could not initialize custom PersisterFactory impl [\" + customImplClass.getName() + \"]\", e );\n\t\t}\n\t}\n\n\tprivate Class<? extends PersisterFactory> locate(ServiceRegistryImplementor registry, String className) {\n\t\treturn registry.requireService( ClassLoaderService.class ).classForName( className );\n\t}\n}\n","sourceCodeStart":32,"sourceCodeEnd":58,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/persister/internal/PersisterFactoryInitiator.java#L32-L58","documentation":"Error \"Could not initialize custom PersisterFactory impl [%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":["Verify the class configured via hibernate.persister_factory implements PersisterFactory and has a public no-arg constructor.","Check the configured class name for typos and classpath availability."],"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"}