{"record":{"id":"515773f6b6f76203","repo":"hibernate/hibernate-orm","slug":"serviceregistry-not-yet-injected-propertyaccessst","errorCode":null,"errorMessage":"ServiceRegistry not yet injected; PropertyAccessStrategyResolver not ready for use.","messagePattern":"ServiceRegistry not yet injected; PropertyAccessStrategyResolver not ready for use\\.","errorType":"exception","errorClass":"HibernateException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyResolverStandardImpl.java","lineNumber":77,"sourceCode":"\t\telse {\n\t\t\treturn BASIC.getStrategy();\n\t\t}\n\t}\n\n\tprotected PropertyAccessStrategy resolveExplicitlyNamedPropertyAccessStrategy(String explicitAccessStrategyName) {\n\t\tfinal var builtInStrategyEnum = BuiltInPropertyAccessStrategies.interpret( explicitAccessStrategyName );\n\t\treturn builtInStrategyEnum != null\n\t\t\t\t? builtInStrategyEnum.getStrategy()\n\t\t\t\t: strategySelectorService().resolveStrategy( PropertyAccessStrategy.class, explicitAccessStrategyName );\n\n\t}\n\n\tprivate @Nullable StrategySelector strategySelectorService;\n\n\tprotected StrategySelector strategySelectorService() {\n\t\tif ( strategySelectorService == null ) {\n\t\t\tif ( serviceRegistry == null ) {\n\t\t\t\tthrow new HibernateException( \"ServiceRegistry not yet injected; PropertyAccessStrategyResolver not ready for use.\" );\n\t\t\t}\n\t\t\tstrategySelectorService = serviceRegistry.requireService( StrategySelector.class );\n\t\t}\n\t\treturn strategySelectorService;\n\t}\n\n}\n","sourceCodeStart":59,"sourceCodeEnd":85,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyResolverStandardImpl.java#L59-L85","documentation":"Error \"ServiceRegistry not yet injected; PropertyAccessStrategyResolver not ready for use.\" thrown in hibernate/hibernate-orm.","triggerScenarios":"A runtime precondition of the Hibernate API is violated.","commonSituations":"Occurs when application code or configuration does not satisfy the documented contract of the API being called.","solutions":["Access the PropertyAccessStrategyResolver only after bootstrap completes and the ServiceRegistry is injected.","Resolve strategies through the SessionFactory's ServiceRegistry instead of a manually created instance."],"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"}