{"record":{"id":"3e400b535e539326","repo":"hibernate/hibernate-orm","slug":"produced-proxy-does-not-correctly-implement-proxyc","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/bytecode/internal/bytebuddy/BasicProxyFactoryImpl.java","lineNumber":69,"sourceCode":"\t\t\t\t\t.implement( constants.INTERFACES_for_ProxyConfiguration )\n\t\t\t\t\t\t\t.intercept( helpers.getInterceptorFieldAccessor() )\n\t\t\t\t)\n\t\t);\n\n\t\ttry {\n\t\t\tproxyClassConstructor = proxyClass.getConstructor();\n\t\t}\n\t\tcatch (NoSuchMethodException e) {\n\t\t\tthrow new AssertionFailure( \"Could not access default constructor from newly generated basic proxy\" );\n\t\t}\n\t}\n\n\t@Override\n\tpublic Object getProxy() {\n\t\tfinal var instance = instantiateProxy();\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\t// Create a dedicated interceptor for the proxy.\n\t\t// This is required as the interceptor is stateful.\n\t\tproxyConfiguration.$$_hibernate_set_interceptor(\n\t\t\t\tnew PassThroughInterceptor( proxyClass.getName() ) );\n\t\treturn instance;\n\t}\n\n\tprivate PrimeAmongSecondarySupertypes instantiateProxy() {\n\t\ttry {\n\t\t\treturn (PrimeAmongSecondarySupertypes) proxyClassConstructor.newInstance();\n\t\t}\n\t\tcatch (Throwable t) {\n\t\t\tthrow new HibernateException( \"Unable to instantiate proxy instance\", t );\n\t\t}\n\t}\n\n\tpublic boolean isInstance(Object object) {","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/bytecode/internal/bytebuddy/BasicProxyFactoryImpl.java#L51-L87","documentation":"Error \"Produced proxy does not correctly implement ProxyConfiguration\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Bytecode enhancement, proxy creation, or lazy interception is applied to an incompatible class or configuration.","commonSituations":"Build-time enhancement with module-system restrictions, mismatched Hibernate versions between build and runtime, or hibernate.bytecode.provider=none with a model that needs proxies.","solutions":["Regenerate/rebuild enhanced classes and proxies with the same Hibernate version used at runtime; clear stale build outputs."],"exampleFix":"Regenerate/rebuild enhanced classes and proxies with the same Hibernate version used at runtime; clear stale build outputs.","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"}