{"record":{"id":"a216c118cde41128","repo":"quarkusio/quarkus","slug":"no-implementation-of-interface-interface-was-fo","errorCode":null,"errorMessage":"No implementation of interface ${interface} was found","messagePattern":"No implementation of interface (.+?) was found","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions/spring-data-jpa/deployment/src/main/java/io/quarkus/spring/data/deployment/generate/FragmentMethodsUtil.java","lineNumber":38,"sourceCode":"\n        if (knownImplementors.size() > 1) {\n            DotName previouslyFound = null;\n            for (ClassInfo knownImplementor : knownImplementors) {\n                if (knownImplementor.name().toString().endsWith(\"Impl\")) { // the default suffix that Spring Data JPA looks for is 'Impl'\n                    if (previouslyFound != null) { // make sure we don't have multiple implementations suffixed with 'Impl'\n                        throw new IllegalArgumentException(\n                                \"Interface \" + customInterfaceToImplement\n                                        + \" must contain a single implementation whose name ends with 'Impl'. Multiple implementations were found: \"\n                                        + previouslyFound + \",\" + knownImplementor);\n                    }\n                    previouslyFound = knownImplementor.name();\n                }\n            }\n            return previouslyFound;\n        } else if (knownImplementors.size() == 1) {\n            return knownImplementors.iterator().next().name();\n        } else {\n            throw new IllegalArgumentException(\n                    \"No implementation of interface \" + customInterfaceToImplement + \" was found\");\n        }\n    }\n}\n","sourceCodeStart":20,"sourceCodeEnd":43,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/spring-data-jpa/deployment/src/main/java/io/quarkus/spring/data/deployment/generate/FragmentMethodsUtil.java#L20-L43","documentation":"Every custom fragment interface used by a Spring Data repository must have exactly one implementing class. This error is thrown when the Jandex index contains no class implementing the fragment interface, so Quarkus has nothing to wire the generated forwarding methods to.","triggerScenarios":"A repository extends a custom interface (e.g. UserRepositoryCustom) but no @Component/@Repository class implements it; the implementing class was deleted or renamed; the implementation exists in an un-indexed JAR.","commonSituations":"Declaring the fragment interface but forgetting the implementation class; typo in implementor's 'implements' clause; implementation removed during refactoring; implementor in an external un-indexed dependency.","solutions":["Create a class implementing the fragment interface, named with the 'Impl' suffix (e.g. UserRepositoryCustomImpl) and annotate it @Component (or @Repository)","Check the implementor's 'implements' clause actually names the fragment interface (typos, wrong package import)","If the implementation lives in a dependency JAR, index that JAR (META-INF/jandex.idx or quarkus.index-dependency.*)","Clean rebuild to refresh the index"],"exampleFix":"// before\npublic interface UserRepositoryCustom { List<User> findByCustomQuery(String q); }\n// (no implementation)\n// after\npublic class UserRepositoryCustomImpl implements UserRepositoryCustom {\n    @PersistenceContext EntityManager em;\n    public List<User> findByCustomQuery(String q) { return em.createQuery(...).getResultList(); }\n}","handlingStrategy":"validation","validationCode":"// Verify each fragment interface has an implementation before building\nfor i in $(grep -rl \"interface .*Custom\" src/main/java --include=*.java); do\n  name=$(basename $i .java)\n  grep -rq \"implements $name\" src/main/java || echo \"MISSING implementation for $name\"\ndone","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always create the matching <Interface>Impl class together with the fragment interface","Annotate implementations with @Component or @Repository","Keep interface and implementation in the same module"],"tags":["quarkus","spring-data-jpa","missing-implementation","build-time"],"backgroundTag":"missing-implementation-class","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}