{"record":{"id":"46e36334333b830d","repo":"OpenAPITools/openapi-generator","slug":"helidon-version-s-uses-the-s-prefix-for-ee-depen","errorCode":null,"errorMessage":"Helidon version %s uses the %s prefix for EE dependencies but options specified '%s'","messagePattern":"Helidon version (.+?) uses the (.+?) prefix for EE dependencies but options specified '(.+?)'","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaHelidonCommonCodegen.java","lineNumber":593,"sourceCode":"                                userRootEEPackage));\n            }\n            return userRootEEPackage;\n        }\n\n        // No explicit setting for the root EE package.\n        return packagePrefixImpliedByVersion;\n    }\n\n    private String checkAndSelectRootEEDepPrefix(String version) {\n        String mavenDepPrefixImpliedByVersion = usesJakartaPrefix(version)\n                ? MICROPROFILE_ROOT_PACKAGE_JAKARTA\n                : MICROPROFILE_ROOT_PACKAGE_JAVAX;\n\n        // Make sure any user-specified prefix is correct for the chosen Helidon version.\n        if (additionalProperties.containsKey(MICROPROFILE_ROOT_DEP_PREFIX)) {\n            String userMavenDepPrefix = additionalProperties.get(MICROPROFILE_ROOT_DEP_PREFIX).toString();\n            if (!mavenDepPrefixImpliedByVersion.equals(userMavenDepPrefix)) {\n                throw new IllegalArgumentException(\n                        String.format(Locale.ROOT,\n                                \"Helidon version %s uses the %s prefix for EE dependencies but options specified '%s'\",\n                                version,\n                                mavenDepPrefixImpliedByVersion,\n                                userMavenDepPrefix));\n            }\n            return userMavenDepPrefix;\n        }\n\n        // No explicit setting for the dependency prefix.\n        return mavenDepPrefixImpliedByVersion;\n    }\n\n    private boolean usesJakartaPackages(String version) {\n        return !version.startsWith(\"2.\") && !version.startsWith(\"1.\");\n    }\n\n    private boolean usesJakartaPrefix(String version) {","sourceCodeStart":575,"sourceCodeEnd":611,"githubUrl":"https://github.com/OpenAPITools/openapi-generator/blob/fcec517be3cf5b7964296bcba25fbc97541484e7/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaHelidonCommonCodegen.java#L575-L611","documentation":"Thrown by JavaHelidonCommonCodegen.checkAndSelectRootEEDepPrefix when the user-set x-helidon-rootJavaEEDepPrefix (the Maven artifactId prefix for EE dependencies) disagrees with the prefix implied by the Helidon version: jakarta for Helidon 4.x, javax for Helidon 3.x. This controls Maven groupId/artifact prefixes such as jakarta.json.bind vs javax.json.bind in the generated pom. It is the dependency-side twin of the rootJavaEEPackage check (error 127).","triggerScenarios":"Passing --additional-properties helidonVersion=4.1.0,x-helidon-rootJavaEEDepPrefix=javax (or the inverse for 3.x) to the Helidon server/client generators. Happens when a config pins the dep prefix for an older stack and helidonVersion is later bumped, or when both x-helidon-rootJavaEEDepPrefix and rootJavaEEPackage are hand-tuned inconsistently.","commonSituations":"Migration from Helidon 3 to 4 where CI configuration files carry the old javax prefix. Rarely hit by accident — this is an advanced (x- prefixed, undocumented-ish) property usually present only in carefully customized builds, so its presence almost always means a hand-tuned config that drifted from the chosen version.","solutions":["Match the prefix to the version: helidon 4.x -> x-helidon-rootJavaEEDepPrefix=jakarta, helidon 3.x -> javax","Best: delete the x-helidon-rootJavaEEDepPrefix property so the generator derives it from helidonVersion","Keep x-helidon-rootJavaEEDepPrefix and rootJavaEEPackage consistent with each other whenever both are set","If javax prefixes are required, pin helidonVersion to 3.x instead of forcing the prefix on 4.x"],"exampleFix":"# before\nopenapi-generator-cli generate -g java-helidon-server -i api.yaml \\\n  --additional-properties helidonVersion=4.1.0,x-helidon-rootJavaEEDepPrefix=javax\n\n# after\nopenapi-generator-cli generate -g java-helidon-server -i api.yaml \\\n  --additional-properties helidonVersion=4.1.0,x-helidon-rootJavaEEDepPrefix=jakarta","handlingStrategy":"validation","validationCode":"String helidonVersion = String.valueOf(opts.get(\"helidonVersion\"));\nString expected = helidonVersion.startsWith(\"4\") ? \"jakarta\" : \"javax\";\nString depPrefix = (String) opts.get(\"x-helidon-rootJavaEEDepPrefix\");\nif (depPrefix != null && !depPrefix.equals(expected)) {\n    throw new IllegalArgumentException(\"x-helidon-rootJavaEEDepPrefix=\" + depPrefix + \" conflicts with helidonVersion=\" + helidonVersion + \" (needs \" + expected + \")\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    generator.generate();\n} catch (IllegalArgumentException e) {\n    if (e.getMessage() != null && e.getMessage().contains(\"EE dependencies\")) {\n        throw new ConfigException(\"Helidon dep-prefix/namespace mismatch: \" + e.getMessage(), e);\n    }\n    throw e;\n}","preventionTips":["Avoid setting the x-helidon-rootJavaEEDepPrefix advanced property unless a downstream build strictly requires it","Keep namespace-related options (rootJavaEEPackage, x-helidon-rootJavaEEDepPrefix, helidonVersion) in one config block and review them together","Add a smoke generation step in CI to catch option drift before release pipelines hit it"],"tags":["java","helidon","openapi-generator","jakarta-ee","javax","maven","configuration","option-validation"],"backgroundTag":"jakarta-javax-namespace-mismatch","analyzedSha":"fcec517be3cf5b7964296bcba25fbc97541484e7","analyzedAt":"2026-08-22T11:13:11.613Z","schemaVersion":2},"datasetVersion":"2026-08-22T14:17:55.899Z"}