{"record":{"id":"51e38c6da8651028","repo":"quarkusio/quarkus","slug":"quarkus-narayana-lra-can-only-work-if-quarkus-r-51e38c","errorCode":null,"errorMessage":"'quarkus-narayana-lra' can only work if 'quarkus-rest-client' or 'quarkus-resteasy-client' is present","messagePattern":"'quarkus-narayana-lra' can only work if 'quarkus-rest-client' or 'quarkus-resteasy-client' is present","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/narayana-lra/deployment/src/main/java/io/quarkus/narayana/lra/deployment/NarayanaLRAProcessor.java","lineNumber":49,"sourceCode":"import io.quarkus.narayana.lra.runtime.NarayanaLRARecorder;\nimport io.quarkus.smallrye.openapi.deployment.spi.AddToOpenAPIDefinitionBuildItem;\n\nclass NarayanaLRAProcessor {\n\n    private static final DotName PATH = DotName.createSimple(\"jakarta.ws.rs.Path\");\n\n    @BuildStep\n    void registerFeature(BuildProducer<FeatureBuildItem> feature, Capabilities capabilities) {\n        boolean isResteasyClassicAvailable = capabilities.isPresent(Capability.RESTEASY_JSON_JACKSON);\n        boolean isResteasyReactiveAvailable = capabilities.isPresent(Capability.RESTEASY_REACTIVE_JSON_JACKSON);\n\n        if (!isResteasyClassicAvailable && !isResteasyReactiveAvailable) {\n            throw new IllegalStateException(\n                    \"'quarkus-narayana-lra' can only work if 'quarkus-rest-jackson' or 'quarkus-resteasy-jackson' is present\");\n        }\n\n        if (!capabilities.isCapabilityWithPrefixPresent(Capability.REST_CLIENT)) {\n            throw new IllegalStateException(\n                    \"'quarkus-narayana-lra' can only work if 'quarkus-rest-client' or 'quarkus-resteasy-client' is present\");\n        }\n\n        feature.produce(new FeatureBuildItem(Feature.NARAYANA_LRA));\n    }\n\n    @BuildStep\n    @Record(RUNTIME_INIT)\n    public void build(NarayanaLRARecorder recorder) {\n        recorder.setConfig();\n    }\n\n    @BuildStep()\n    @Record(STATIC_INIT)\n    void createLRAParticipantRegistry(NarayanaLRARecorder recorder,\n            BeanArchiveIndexBuildItem beanArchiveIndex) {\n\n        final List<String> classNames = new ArrayList<>();","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/narayana-lra/deployment/src/main/java/io/quarkus/narayana/lra/deployment/NarayanaLRAProcessor.java#L31-L67","documentation":"The quarkus-narayana-lra extension uses REST clients to communicate with the LRA coordinator, so the build fails with this IllegalStateException if no REST client capability (quarkus-rest-client / quarkus-rest, or the classic quarkus-resteasy-client) is present. Like the sibling check, this is enforced at build time in NarayanaLRAProcessor.registerFeature via Capabilities.","triggerScenarios":"Building an app with quarkus-narayana-lra on the classpath while capabilities.isCapabilityWithPrefixPresent(REST_CLIENT) is false — no quarkus-rest-client, quarkus-rest-client-jackson, quarkus-rest, or quarkus-resteasy-client dependency included.","commonSituations":"Adding only the LRA extension without any REST client; removing the REST client dependency after refactoring away REST calls; assuming LRA bundles its own HTTP client dependency (it does not in Quarkus).","solutions":["Add io.quarkus:quarkus-rest-client (or quarkus-rest-client-jackson) for reactive, or io.quarkus:quarkus-resteasy-client for classic REST","Verify with ./mvnw dependency:tree that a REST client artifact is present alongside quarkus-narayana-lra","Remove quarkus-narayana-lra if LRA participation is no longer needed"],"exampleFix":"<!-- before -->\n<dependency><groupId>io.quarkus</groupId><artifactId>quarkus-narayana-lra</artifactId></dependency>\n// after\n<dependency><groupId>io.quarkus</groupId><artifactId>quarkus-narayana-lra</artifactId></dependency>\n<dependency><groupId>io.quarkus</groupId><artifactId>quarkus-rest-client-jackson</artifactId></dependency>","handlingStrategy":"validation","validationCode":"// build-time check: ensure a REST client extension is in pom.xml\ngrep -E \"quarkus-(rest-client|resteasy-client|rest)\" pom.xml || echo \"MISSING: add quarkus-rest-client\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pair quarkus-narayana-lra with quarkus-rest-client (or resteasy-client) at all times","Verify with ./mvnw dependency:tree that the client artifact is present","Keep REST client and LRA versions aligned (same Quarkus BOM)","Remember LRA needs both a JSON-Jackson REST layer and a REST client — add both"],"tags":["lra","build-time","dependency-missing","rest-client","quarkus"],"backgroundTag":"missing-required-dependency","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"}