{"record":{"id":"4613c086757873ee","repo":"hibernate/hibernate-orm","slug":"produced-proxy-does-not-correctly-implement-proxyc-4613c0","errorCode":null,"errorMessage":"Produced proxy does not correctly implement ProxyConfiguration","messagePattern":"Produced proxy does not correctly implement ProxyConfiguration","errorType":"exception","errorClass":"HibernateException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/proxy/pojo/bytebuddy/ByteBuddyProxyFactory.java","lineNumber":80,"sourceCode":"\tpublic HibernateProxy getProxy(\n\t\t\tObject id,\n\t\t\tSharedSessionContractImplementor session) throws HibernateException {\n\t\tfinal var interceptor = new ByteBuddyInterceptor(\n\t\t\t\tentityName,\n\t\t\t\tpersistentClass,\n\t\t\t\tinterfaces,\n\t\t\t\tid,\n\t\t\t\tgetIdentifierMethod,\n\t\t\t\tsetIdentifierMethod,\n\t\t\t\tcomponentIdType,\n\t\t\t\tsession,\n\t\t\t\toverridesEquals\n\t\t);\n\n\t\tfinal var instance = getHibernateProxy();\n\t\tfinal var proxyConfiguration = instance.asProxyConfiguration();\n\t\tif ( proxyConfiguration == null ) {\n\t\t\tthrow new HibernateException( \"Produced proxy does not correctly implement ProxyConfiguration\" );\n\t\t}\n\t\tproxyConfiguration.$$_hibernate_set_interceptor( interceptor );\n\t\treturn instance;\n\t}\n\n\tprivate HibernateProxy getHibernateProxy() {\n\t\tfinal var internal = getHibernateProxyInternal();\n\t\tfinal var hibernateProxy = internal.asHibernateProxy();\n\t\tif ( hibernateProxy == null ) {\n\t\t\tthrow new HibernateException( \"Produced proxy does not correctly implement HibernateProxy\" );\n\t\t}\n\t\treturn hibernateProxy;\n\t}\n\n\t/**\n\t * This technically returns a HibernateProxy, but declaring that type as the return\n\t * type for the newInstance() action triggers an implicit case of type pollution.\n\t * We therefore declare it as PrimeAmongSecondarySupertypes, and require the","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/proxy/pojo/bytebuddy/ByteBuddyProxyFactory.java#L62-L98","documentation":"Error \"Produced proxy does not correctly implement ProxyConfiguration\" 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":["Regenerate proxies with a compatible ByteBuddy/Hibernate version.","Check for bytecode-provider version conflicts on the classpath."],"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"}