{"record":{"id":"3b24b80f06b9e652","repo":"hibernate/hibernate-orm","slug":"lifecycle-callback-method-not-found-s-s","errorCode":null,"errorMessage":"Lifecycle callback method not found - %s (%s)","messagePattern":"Lifecycle callback method not found - (.+?) \\((.+?)\\)","errorType":"exception","errorClass":"AnnotationException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/boot/models/xml/internal/XmlAnnotationHelper.java","lineNumber":1509,"sourceCode":"\t\tapplyLifecycleCallback( lifecycleCallbackContainer.getPreUpdate(), callbackType, JpaAnnotations.PRE_UPDATE, classDetails, xmlDocumentContext );\n\t\tapplyLifecycleCallback( lifecycleCallbackContainer.getPostUpdate(), callbackType, JpaAnnotations.POST_UPDATE, classDetails, xmlDocumentContext );\n\t\tapplyLifecycleCallback( lifecycleCallbackContainer.getPostLoad(), callbackType, JpaAnnotations.POST_LOAD, classDetails, xmlDocumentContext );\n\t}\n\n\tprivate static <A extends Annotation> void applyLifecycleCallback(\n\t\t\tJaxbLifecycleCallback lifecycleCallback,\n\t\t\tJpaEventListenerStyle callbackType,\n\t\t\tAnnotationDescriptor<A> annotationDescriptor,\n\t\t\tMutableClassDetails classDetails,\n\t\t\tXmlDocumentContext xmlDocumentContext) {\n\t\tif ( lifecycleCallback != null ) {\n\t\t\tfinal MutableMemberDetails methodDetails = getCallbackMethodDetails(\n\t\t\t\t\tlifecycleCallback.getMethodName(),\n\t\t\t\t\tcallbackType,\n\t\t\t\t\tclassDetails\n\t\t\t);\n\t\t\tif ( methodDetails == null ) {\n\t\t\t\tthrow new AnnotationException( String.format(\n\t\t\t\t\t\t\"Lifecycle callback method not found - %s (%s)\",\n\t\t\t\t\t\tlifecycleCallback.getMethodName(),\n\t\t\t\t\t\tclassDetails.getName()\n\t\t\t\t) );\n\t\t\t}\n\n\t\t\tmethodDetails.applyAnnotationUsage( annotationDescriptor, xmlDocumentContext.getModelBuildingContext() );\n\t\t}\n\t}\n\n\tprivate static MutableMemberDetails getCallbackMethodDetails(\n\t\t\tString name,\n\t\t\tJpaEventListenerStyle callbackType,\n\t\t\tClassDetails classDetails) {\n\t\tfor ( MethodDetails method : classDetails.getMethods() ) {\n\t\t\tif ( method.getName().equals( name )\n\t\t\t\t&& LifecycleEventHandler.matchesSignature( callbackType, method ) ) {\n\t\t\t\treturn (MutableMemberDetails) method;","sourceCodeStart":1491,"sourceCodeEnd":1527,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/boot/models/xml/internal/XmlAnnotationHelper.java#L1491-L1527","documentation":"Error \"Lifecycle callback method not found - %s (%s)\" thrown in hibernate/hibernate-orm.","triggerScenarios":"A JPA entity-listener or lifecycle callback violates the callback contract.","commonSituations":"Listener classes with missing lifecycle annotations, wrong method signatures, or multiple methods for the same event type.","solutions":["Ensure the named callback method exists on the listener class with the required signature (void return, correct single parameter, accessible)."],"exampleFix":"Ensure the named callback method exists on the listener class with the required signature (void return, correct single parameter, accessible).","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"}