{"record":{"id":"c81c0faee77858a8","repo":"hibernate/hibernate-orm","slug":"found-multiple-bytecodeprovider-service-registrati","errorCode":null,"errorMessage":"Found multiple BytecodeProvider service registrations, cannot determine which one to use","messagePattern":"Found multiple BytecodeProvider service registrations, cannot determine which one to use","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/bytecode/internal/BytecodeProviderInitiator.java","lineNumber":68,"sourceCode":"\t\treturn getBytecodeProvider( ServiceLoader.load(\n\t\t\t\tBytecodeProvider.class,\n\t\t\t\tBytecodeProvider.class.getClassLoader()\n\t\t) );\n\t}\n\n\t@Internal\n\t@Nonnull\n\tpublic static BytecodeProvider getBytecodeProvider(@Nonnull Iterable<BytecodeProvider> bytecodeProviders) {\n\t\tfinal var iterator = bytecodeProviders.iterator();\n\t\tif ( !iterator.hasNext() ) {\n\t\t\t// If no BytecodeProvider service is available,\n\t\t\t// default to the \"no-op\" enhancer\n\t\t\treturn new BytecodeProviderImpl();\n\t\t}\n\t\telse {\n\t\t\tfinal var provider = iterator.next();\n\t\t\tif ( iterator.hasNext() ) {\n\t\t\t\tthrow new IllegalStateException(\n\t\t\t\t\t\t\"Found multiple BytecodeProvider service registrations, cannot determine which one to use\" );\n\t\t\t}\n\t\t\treturn provider;\n\t\t}\n\t}\n}\n","sourceCodeStart":50,"sourceCodeEnd":75,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/bytecode/internal/BytecodeProviderInitiator.java#L50-L75","documentation":"Error \"Found multiple BytecodeProvider service registrations, cannot determine which one to use\" 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":["Keep only one bytecode provider on the classpath (bytebuddy or none); remove the conflicting hibernate-bytecode provider dependency."],"exampleFix":"Keep only one bytecode provider on the classpath (bytebuddy or none); remove the conflicting hibernate-bytecode provider dependency.","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"}