{"record":{"id":"2a2969ea1396c3bf","repo":"OpenAPITools/openapi-generator","slug":"invalid-microprofileframework-microprofileframew","errorCode":null,"errorMessage":"Invalid microprofileFramework '{microprofileFramework}'. Must be 'kumuluzee' or none.","messagePattern":"Invalid microprofileFramework '(.+?)'\\. Must be 'kumuluzee' or none\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java","lineNumber":464,"sourceCode":"        if (libWebClient && (useSealedOneOfInterfaces || useJakartaEe)) {\n            writePropertyBack(JAVA_17, true);\n        }\n\n        if (libMicroprofile && useSealedOneOfInterfaces) {\n            writePropertyBack(JAVA_17, true);\n        }\n\n        if (!useRxJava && !useRxJava2 && !useRxJava3) {\n            additionalProperties.put(DO_NOT_USE_RX, true);\n        }\n\n        // Java Play\n        convertPropertyToBooleanAndWriteBack(USE_PLAY_WS, this::setUsePlayWS);\n\n        // Microprofile framework\n        if (additionalProperties.containsKey(MICROPROFILE_FRAMEWORK)) {\n            if (!MICROPROFILE_KUMULUZEE.equals(microprofileFramework)) {\n                throw new RuntimeException(\"Invalid microprofileFramework '\" + microprofileFramework + \"'. Must be 'kumuluzee' or none.\");\n            }\n//            this.setMicroprofileFramework(additionalProperties.get(MICROPROFILE_FRAMEWORK).toString());\n        }\n        convertPropertyToStringAndWriteBack(MICROPROFILE_FRAMEWORK, this::setMicroprofileFramework);\n\n        convertPropertyToBooleanAndWriteBack(MICROPROFILE_GLOBAL_EXCEPTION_MAPPER, this::setMicroProfileGlobalExceptionMapper);\n        convertPropertyToBooleanAndWriteBack(MICROPROFILE_REGISTER_EXCEPTION_MAPPER, this::setMicroProfileRegisterExceptionMapper);\n\n        additionalProperties.put(MICROPROFILE_REGISTER_EXCEPTION_MAPPER, microProfileRegisterExceptionMapper);\n        additionalProperties.put(MICROPROFILE_GLOBAL_EXCEPTION_MAPPER, microProfileGlobalExceptionMapper);\n\n        convertPropertyToBooleanAndWriteBack(MICROPROFILE_MUTINY, this::setMicroprofileMutiny);\n\n        convertPropertyToStringAndWriteBack(MICROPROFILE_REST_CLIENT_VERSION, value -> microprofileRestClientVersion = value);\n        if (!mpRestClientVersions.containsKey(microprofileRestClientVersion)) {\n            throw new IllegalArgumentException(\n                    String.format(Locale.ROOT,\n                            \"Version %s of MicroProfile Rest Client is not supported or incorrect. Supported versions are %s\",","sourceCodeStart":446,"sourceCodeEnd":482,"githubUrl":"https://github.com/OpenAPITools/openapi-generator/blob/fcec517be3cf5b7964296bcba25fbc97541484e7/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java#L446-L482","documentation":"Thrown by JavaClientCodegen.processOpts when the microprofileFramework additional property is present but the resolved microprofileFramework field is not 'kumuluzee' (the only framework the Java microprofile templates ship). The guard runs before convertPropertyToStringAndWriteBack, so it validates the framework choice at generation time; 'kumuluzee' or omitting the property entirely are the only passing states.","triggerScenarios":"Passing --additional-properties microprofileFramework=<anything other than kumuluzee> (e.g. helidon, open-liberty, quarkus, empty string) with -g java --library microprofile. Also triggered when a config file (--config config.json) contains a \"microprofileFramework\" key with an arbitrary value, or a Gradle plugin configOptions block carries it over from an old project.","commonSituations":"Developers assume microprofileFramework selects any MicroProfile implementation server and try to target Helidon MP or OpenLiberty through the Java client generator. Others copy a kumuluzee-specific config to a newer generator version where the accepted value set never grew, or typo the value ('Kumuluzee', 'kumuluz').","solutions":["Set the value exactly to kumuluzee: --additional-properties microprofileFramework=kumuluzee","If you do not specifically need KumuluzEE support, delete the microprofileFramework property and rely on the default","For Helidon MP or OpenLiberty targets, use their dedicated generators (-g java-helidon-server / --library open-liberty on -g jaxrs-jersey) instead of this option","Check for case sensitivity: 'Kumuluzee' is rejected; the comparison is exact"],"exampleFix":"# before\nopenapi-generator-cli generate -g java -i api.yaml \\\n  --library microprofile --additional-properties microprofileFramework=helidon\n\n# after\nopenapi-generator-cli generate -g java -i api.yaml \\\n  --library microprofile --additional-properties microprofileFramework=kumuluzee","handlingStrategy":"validation","validationCode":"Object fw = opts.get(\"microprofileFramework\");\nif (fw != null && !\"kumuluzee\".equals(String.valueOf(fw))) {\n    throw new IllegalArgumentException(\"microprofileFramework must be 'kumuluzee' or absent, got: \" + fw);\n}","typeGuard":null,"tryCatchPattern":"try {\n    CodegenConfig config = CodegenConfigLoader.forName(\"java\");\n    config.additionalProperties().putAll(opts);\n    new DefaultGenerator().opts(new ClientOptInput()).config(config).generate();\n} catch (RuntimeException e) {\n    // catches the 'Invalid microprofileFramework' RuntimeException from processOpts\n    log.error(\"Bad microprofileFramework option: {}\", opts.get(\"microprofileFramework\"), e);\n    throw e;\n}","preventionTips":["Whitelist exact enum-like option values in your config loader instead of passing strings through","Before adopting an option, confirm its accepted values from the generator's docs or config-help output","Avoid carrying options between generators when copying config files"],"tags":["java","openapi-generator","microprofile","kumuluzee","configuration","option-validation"],"backgroundTag":"unsupported-option-value","analyzedSha":"fcec517be3cf5b7964296bcba25fbc97541484e7","analyzedAt":"2026-08-22T11:13:11.613Z","schemaVersion":2},"datasetVersion":"2026-08-22T14:17:55.899Z"}