{"record":{"id":"6f1938c227592248","repo":"quarkusio/quarkus","slug":"quarkus-narayana-lra-can-only-work-if-quarkus-r","errorCode":null,"errorMessage":"'quarkus-narayana-lra' can only work if 'quarkus-rest-jackson' or 'quarkus-resteasy-jackson' is present","messagePattern":"'quarkus-narayana-lra' can only work if 'quarkus-rest-jackson' or 'quarkus-resteasy-jackson' 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":44,"sourceCode":"import io.quarkus.deployment.annotations.BuildProducer;\nimport io.quarkus.deployment.annotations.BuildStep;\nimport io.quarkus.deployment.annotations.Record;\nimport io.quarkus.deployment.builditem.FeatureBuildItem;\nimport io.quarkus.narayana.lra.runtime.NarayanaLRAProducers;\nimport 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()","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/narayana-lra/deployment/src/main/java/io/quarkus/narayana/lra/deployment/NarayanaLRAProcessor.java#L26-L62","documentation":"The quarkus-narayana-lra extension needs a REST implementation with Jackson to host LRA participant endpoints and serialize LRA payloads. This build-time IllegalStateException in NarayanaLRAProcessor.registerFeature fails the build when neither quarkus-rest-jackson (reactive) nor quarkus-resteasy-jackson (classic) capability is present. It is a dependency/configuration error caught during application build, not at runtime.","triggerScenarios":"Building an application that includes quarkus-narayana-lra while neither REST JSON-Jackson capability is on the classpath — e.g. REST endpoints use a different serializer (no Jackson), or the app has no REST layer at all, or uses quarkus-resteasy with JSON-B instead of Jackson.","commonSituations":"Using quarkus-resteasy-jsonb or quarkus-rest-jackson replaced by another JSON mapper; forgetting to add a REST extension entirely; removing the REST dependency during refactoring while LRA stays in pom.xml.","solutions":["Add io.quarkus:quarkus-rest-jackson (reactive REST) or io.quarkus:quarkus-resteasy-jackson (classic REST) to the pom.xml","If you intentionally use JSON-B, still add the Jackson extension since LRA requires it, or switch the app's JSON layer to Jackson","If LRA is no longer needed, remove quarkus-narayana-lra from the dependencies"],"exampleFix":"<!-- before: no REST Jackson dependency -->\n<dependency><groupId>io.quarkus</groupId><artifactId>quarkus-narayana-lra</artifactId></dependency>\n// after\n<dependency><groupId>io.quarkus</groupId><artifactId>quarkus-rest-jackson</artifactId></dependency>","handlingStrategy":"validation","validationCode":"// build-time check: ensure a REST JSON-Jackson extension is in pom.xml\ngrep -E \"quarkus-(rest|resteasy)-jackson\" pom.xml || echo \"MISSING: add quarkus-rest-jackson\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["When adding quarkus-narayana-lra, also add quarkus-rest-jackson or quarkus-resteasy-jackson","Don't swap the app's JSON mapper to JSON-B while LRA is present","Run ./mvnw verify to catch capability conflicts at build time","Review extension 'capability requirements' in its README before adding"],"tags":["lra","build-time","dependency-missing","rest","jackson","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"}