{"record":{"id":"1bb8dcc1eb216c56","repo":"quarkusio/quarkus","slug":"spring-web-can-only-work-if-quarkus-resteasy-jack","errorCode":null,"errorMessage":"Spring Web can only work if 'quarkus-resteasy-jackson' or 'quarkus-rest-jackson' is present","messagePattern":"Spring Web can only work if 'quarkus-resteasy-jackson' or 'quarkus-rest-jackson' is present","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/spring-web/core/deployment/src/main/java/io/quarkus/spring/web/deployment/SpringWebProcessor.java","lineNumber":150,"sourceCode":"        beanDefiningAnnotations\n                .produce(new BeanDefiningAnnotationBuildItem(REST_CONTROLLER_ADVICE, BuiltinScope.SINGLETON.getName()));\n    }\n\n    @BuildStep\n    public void exceptionHandlingSupport(CombinedIndexBuildItem index,\n            BuildProducer<GeneratedClassBuildItem> generatedExceptionMappers,\n            BuildProducer<GeneratedResourceBuildItem> generatedResources,\n            BuildProducer<ResteasyJaxrsProviderBuildItem> providersProducer,\n            BuildProducer<ExceptionMapperBuildItem> exceptionMapperProducer,\n            BuildProducer<ReflectiveClassBuildItem> reflectiveClassProducer,\n            BuildProducer<UnremovableBeanBuildItem> unremovableBeanProducer,\n            Capabilities capabilities) {\n\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                    \"Spring Web can only work if 'quarkus-resteasy-jackson' or 'quarkus-rest-jackson' is present\");\n        }\n\n        TypesUtil typesUtil = new TypesUtil(Thread.currentThread().getContextClassLoader());\n\n        // Look for all exception classes that are annotated with @ResponseStatus\n\n        IndexView indexView = index.getIndex();\n        ClassOutput classOutput = new GeneratedClassGizmo2Adaptor(generatedExceptionMappers, generatedResources, true);\n        generateMappersForResponseStatusOnException(providersProducer, exceptionMapperProducer, indexView, classOutput,\n                typesUtil,\n                isResteasyClassicAvailable);\n        generateMappersForExceptionHandlerInControllerAdvice(providersProducer, exceptionMapperProducer,\n                reflectiveClassProducer, unremovableBeanProducer, indexView, classOutput,\n                typesUtil, isResteasyClassicAvailable);\n    }\n\n    private void generateMappersForResponseStatusOnException(BuildProducer<ResteasyJaxrsProviderBuildItem> providersProducer,","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/spring-web/core/deployment/src/main/java/io/quarkus/spring/web/deployment/SpringWebProcessor.java#L132-L168","documentation":"The Quarkus Spring Web extension translates Spring @ExceptionHandler/@ResponseStatus annotations into JAX-RS ExceptionMappers at build time, but it needs a JSON serializer to build response bodies. Neither the RESTEasy Classic JSON-Jackson nor the RESTEasy Reactive JSON-Jackson capability is present, so the processor aborts the build. This is a deliberate dependency check, not a runtime failure.","triggerScenarios":"Building an application that includes quarkus-spring-web (or spring-web resteasy-reactive variant) without any of quarkus-resteasy-jackson or quarkus-rest-jackson on the classpath.","commonSituations":"Projects migrated from Spring Boot where Jackson came transitively; apps using quarkus-rest (reactive) without the -jackson variant; manually trimmed dependency lists that removed the JSON extension.","solutions":["Add quarkus-rest-jackson (RESTEasy Reactive) or quarkus-resteasy-jackson (Classic) to pom.xml/build.gradle.","Verify with mvn dependency:tree that a jackson REST extension is actually resolved and not excluded.","If you don't need Spring Web compat, remove the quarkus-spring-web extension instead."],"exampleFix":"// before (pom.xml)\n<dependency>\n  <groupId>io.quarkus</groupId>\n  <artifactId>quarkus-spring-web</artifactId>\n</dependency>\n\n// after\n<dependency>\n  <groupId>io.quarkus</groupId>\n  <artifactId>quarkus-spring-web</artifactId>\n</dependency>\n<dependency>\n  <groupId>io.quarkus</groupId>\n  <artifactId>quarkus-rest-jackson</artifactId>\n</dependency>","handlingStrategy":"validation","validationCode":"// build-time check: verify pom.xml includes one of\n// io.quarkus:quarkus-rest-jackson OR io.quarkus:quarkus-resteasy-jackson\n// shell: mvn dependency:tree | grep -E 'quarkus-(rest|resteasy)-jackson'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pair quarkus-spring-web with a jackson REST extension in your BOM/dependency list.","Run a quick build (mvn -Dquickly) after dependency changes to surface build-time checks early."],"tags":["quarkus","spring-web","missing-dependency","build-time"],"backgroundTag":"missing-required-extension","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"}