{"record":{"id":"3a1a1f24978b0476","repo":"pinpoint-apm/pinpoint","slug":"unsupported-profile-or-profile-alias","errorCode":null,"errorMessage":"unsupported profile or profile alias:","messagePattern":"unsupported profile or profile alias:","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"agent-module/bootstraps/bootstrap/src/main/java/com/navercorp/pinpoint/bootstrap/config/ProfilePropertyLoader.java","lineNumber":146,"sourceCode":"        }\n\n        // prevent directory traversal attack\n        for (Path supportedProfile : supportedProfiles) {\n            if (supportedProfile.toString().equalsIgnoreCase(profile)) {\n                return supportedProfile.toString();\n            }\n        }\n\n        // handle alias\n        for (Path supportedProfile : supportedProfiles) {\n            String supportedProfileName = supportedProfile.toString();\n            String aliasesStr = getProfileProperties(defaultProperties, ProfileConstants.PROFILE_ALIAS_KEY_PREFIX + supportedProfileName);\n            if (containsAlias(aliasesStr, profile)) {\n                logger.info(String.format(\"resolved profile alias '%s' to supported profile '%s'\", profile, supportedProfileName));\n                return supportedProfileName;\n            }\n        }\n        throw new IllegalStateException(\"unsupported profile or profile alias:\" + profile);\n    }\n\n    private String getProfileProperties(Properties defaultProperties, String key) {\n//        env option support??\n//        String envProfile = System.getenv(ACTIVE_PROFILE_KEY);\n        String value = javaSystemProperty.getProperty(key);\n        if (value == null) {\n            value = defaultProperties.getProperty(key);\n        }\n        return value;\n    }\n\n\n    private void loadProperties(Properties dstProperties, Properties property) {\n        Map<Object, Object> copy = PropertyLoaderUtils.filterAllowedPrefix(property);\n        dstProperties.putAll(copy);\n    }\n","sourceCodeStart":128,"sourceCodeEnd":164,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/agent-module/bootstraps/bootstrap/src/main/java/com/navercorp/pinpoint/bootstrap/config/ProfilePropertyLoader.java#L128-L164","documentation":"Thrown by ProfilePropertyLoader.getActiveProfile when the configured profile value is neither one of the supported profile names nor a registered alias defined via pinpoint.profile.alias.<profile> in the root config. The loader validates the active profile against known names (with alias resolution) and rejects unknown values.","triggerScenarios":"Setting -Dpinpoint.active.profile=prod (or any typo/custom value) when supported profiles are e.g. local/test/release and no alias maps the value to a supported profile.","commonSituations":"Typo in profile name (PROD vs release); reusing custom profile names from other frameworks; forgetting to declare pinpoint.profile.alias.release=prod in pinpoint-root.config; case/whitespace mismatches.","solutions":["Use a supported profile name exactly as listed in the error message (e.g. release)","Register your custom name as an alias: add pinpoint.profile.alias.release=prod to pinpoint-root.config","Fix typos and casing in the -Dpinpoint.active.profile value (trim stray whitespace)","Check the root config actually loaded (correct file path) so the alias definitions are visible"],"exampleFix":"// before\n-Dpinpoint.active.profile=prod // not a supported profile\n// after (option A)\n-Dpinpoint.active.profile=release\n// after (option B: keep 'prod' as alias)\n# pinpoint-root.config\npinpoint.profile.alias.release=prod","handlingStrategy":"validation","validationCode":"Set<String> valid = Set.of(\"local\",\"test\",\"release\");\nString p = System.getProperty(\"pinpoint.active.profile\");\nif (p != null && !valid.contains(p)) { log.warn(\"profile '{}' not supported; use {} or define pinpoint.profile.alias\", p, valid); }","typeGuard":null,"tryCatchPattern":"try { loadProfile(); } catch (IllegalStateException e) { if (e.getMessage().startsWith(\"unsupported profile\")) { log.error(\"check -Dpinpoint.active.profile and pinpoint.profile.alias entries\"); } throw e; }","preventionTips":["Only use names from the supportedProfiles list","Declare custom names as aliases in pinpoint-root.config (pinpoint.profile.alias.release=prod)","Trim whitespace and watch casing in VM options","Keep profile names consistent across environments/scripts"],"tags":["java","pinpoint","configuration","profile"],"backgroundTag":"invalid-enum-value","analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}