{"record":{"id":"c0ae100a6dd23b97","repo":"OpenAPITools/openapi-generator","slug":"the-returnjbossresponse-requires-usejakartaee","errorCode":null,"errorMessage":"The [returnJBossResponse] requires [useJakartaEe] to be true, because org.jboss.resteasy.reactive.RestResponse was introduced in Quarkus 2.x","messagePattern":"The \\[returnJBossResponse\\] requires \\[useJakartaEe\\] to be true, because org\\.jboss\\.resteasy\\.reactive\\.RestResponse was introduced in Quarkus 2\\.x","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java","lineNumber":302,"sourceCode":"            supportingFiles.add(new SupportingFile(\"application.properties.mustache\", \"src/main/resources\", \"application.properties\")\n                    .doNotOverwrite());\n            supportingFiles.add(new SupportingFile(\"Dockerfile.jvm.mustache\", \"src/main/docker\", \"Dockerfile.jvm\")\n                    .doNotOverwrite());\n            supportingFiles.add(new SupportingFile(\"Dockerfile.native.mustache\", \"src/main/docker\", \"Dockerfile.native\")\n                    .doNotOverwrite());\n            supportingFiles.add(new SupportingFile(\"dockerignore.mustache\", \"\", \".dockerignore\")\n                    .doNotOverwrite());\n            if(returnResponse && returnJbossResponse) {\n              String msg = String.format(Locale.ROOT,\n                  \"You cannot combine [%s] and [%s] since they are mutually exclusive\",\n                  RETURN_RESPONSE, RETURN_JBOSS_RESPONSE);\n              throw new IllegalArgumentException(msg);\n            }\n            if(returnJbossResponse && !useJakartaEe) {\n              String msg = String.format(Locale.ROOT,\n                  \"The [%s] requires [%s] to be true, because org.jboss.resteasy.reactive.RestResponse was introduced in Quarkus 2.x\",\n                  RETURN_JBOSS_RESPONSE, USE_JAKARTA_EE);\n              throw new IllegalArgumentException(msg);\n            }\n        } else if (OPEN_LIBERTY_LIBRARY.equals(library)) {\n            supportingFiles.add(new SupportingFile(\"server.xml.mustache\", \"src/main/liberty/config\", \"server.xml\")\n                    .doNotOverwrite());\n            supportingFiles.add(new SupportingFile(\"beans.xml.mustache\", \"src/main/webapp/META-INF\", \"beans.xml\")\n                    .doNotOverwrite());\n            supportingFiles.add(new SupportingFile(\"MANIFEST.MF.mustache\", \"src/main/webapp/META-INF\", \"MANIFEST.MF\")\n                    .doNotOverwrite());\n            supportingFiles.add(new SupportingFile(\"microprofile-config.properties.mustache\", \"src/main/webapp/META-INF\", \"microprofile-config.properties\")\n                    .doNotOverwrite());\n            supportingFiles.add(new SupportingFile(\"ibm-web-ext.xml.mustache\", \"src/main/webapp/WEB-INF\", \"ibm-web-ext.xml\")\n                    .doNotOverwrite());\n        } else if (HELIDON_LIBRARY.equals(library)) {\n            additionalProperties.computeIfAbsent(\"helidonVersion\", key -> \"2.4.1\");\n            supportingFiles.add(new SupportingFile(\"logging.properties.mustache\", \"src/main/resources\", \"logging.properties\")\n                    .doNotOverwrite());\n            supportingFiles.add(new SupportingFile(\"microprofile-config.properties.mustache\", \"src/main/resources/META-INF\", \"microprofile-config.properties\")\n                    .doNotOverwrite());","sourceCodeStart":284,"sourceCodeEnd":320,"githubUrl":"https://github.com/OpenAPITools/openapi-generator/blob/fcec517be3cf5b7964296bcba25fbc97541484e7/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java#L284-L320","documentation":"Thrown by JavaJAXRSSpecServerCodegen.processOpts (quarkus library branch) when returnJBossResponse=true but useJakartaEe is false. The flag generates signatures returning org.jboss.resteasy.reactive.RestResponse, a type that only exists in Quarkus 2.x+ releases built on the jakarta.* namespace. Without useJakartaEe=true the generator would produce code referencing a class unavailable on the javax-era classpath, so it aborts with an explanation instead.","triggerScenarios":"Running -g jaxrs-jersey --library quarkus with --additional-properties returnJBossResponse=true while useJakartaEe is unset/false — typical when a Quarkus 1.x/early-2.x config adopts the new response flag. Also when a global preset sets returnJBossResponse but per-project configs never opted into Jakarta.","commonSituations":"Quarkus migrations to 3.x: RESTEasy Reactive becomes default and teams want RestResponse signatures, but the base config predates useJakartaEe and was never updated. Flag inherited from a shared parent config while the Jakarta toggle lives in a different file.","solutions":["Add useJakartaEe=true: --additional-properties returnJBossResponse=true,useJakartaEe=true","If you cannot move to Jakarta yet, drop returnJBossResponse and use returnResponse=true instead","Upgrade the Quarkus project itself to 2.x+/3.x, since the generated RestResponse imports require that runtime anyway","Keep returnJBossResponse and useJakartaEe as one bundled option set in your config template"],"exampleFix":"# before\nopenapi-generator-cli generate -g jaxrs-jersey -i api.yaml --library quarkus \\\n  --additional-properties returnJBossResponse=true\n\n# after\nopenapi-generator-cli generate -g jaxrs-jersey -i api.yaml --library quarkus \\\n  --additional-properties returnJBossResponse=true,useJakartaEe=true","handlingStrategy":"validation","validationCode":"boolean returnJBoss = Boolean.parseBoolean(String.valueOf(opts.getOrDefault(\"returnJBossResponse\", \"false\")));\nboolean jakartaEe = Boolean.parseBoolean(String.valueOf(opts.getOrDefault(\"useJakartaEe\", \"false\")));\nif (returnJBoss && !jakartaEe) {\n    throw new IllegalArgumentException(\"returnJBossResponse requires useJakartaEe=true (RestResponse needs Quarkus 2.x+ / jakarta)\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    generator.generate();\n} catch (IllegalArgumentException e) {\n    if (e.getMessage() != null && e.getMessage().contains(\"useJakartaEe\")) {\n        opts.put(\"useJakartaEe\", \"true\"); // RestResponse only exists on jakarta-era Quarkus\n        generator.generate();\n    } else throw e;\n}","preventionTips":["Bundle returnJBossResponse=true with useJakartaEe=true in config presets","Verify the target Quarkus major version before choosing RestResponse signatures","Assert prerequisite-pairs (flag requires namespace) in config validation tests"],"tags":["java","jaxrs","quarkus","openapi-generator","jakarta-ee","resteasy","configuration"],"backgroundTag":"requires-prerequisite-option","analyzedSha":"fcec517be3cf5b7964296bcba25fbc97541484e7","analyzedAt":"2026-08-22T11:13:11.613Z","schemaVersion":2},"datasetVersion":"2026-08-22T14:17:55.899Z"}