{"record":{"id":"b4ce7bc64b380cce","repo":"oraios/serena","slug":"unsupported-platform-platform-id-for-upstream","errorCode":null,"errorMessage":"Unsupported platform '{platform_id}' for upstream JDTLS mode. Supported platforms: {sorted(set(JDTLS_CONFIG_DIR_BY_PLATFORM.values()))}.","messagePattern":"Unsupported platform '(.+?)' for upstream JDTLS mode\\. Supported platforms: (.+?)\\.","errorType":"exception","errorClass":"SolidLSPException","httpStatus":null,"severity":"error","filePath":"src/solidlsp/language_servers/eclipse_jdtls.py","lineNumber":552,"sourceCode":"                raise SolidLSPException(\n                    f\"No main Equinox launcher jar found in '{plugins_dir}'. \"\n                    f\"Expected file like 'org.eclipse.equinox.launcher_<version>.jar'. \"\n                    f\"Verify the JDTLS extraction is complete and not corrupted.\"\n                )\n            # if multiple versions are present (rare), pick the highest by name\n            return matches[-1]\n\n        @staticmethod\n        def _resolve_config_dir(jdtls_root: Path) -> Path:\n            \"\"\"\n            Locates the platform-specific OSGi configuration directory inside the JDTLS root.\n\n            :return: path to ``config_<platform>/`` directory matching the current OS/arch\n            \"\"\"\n            platform_id = PlatformUtils.get_platform_id().value\n            config_dir_name = JDTLS_CONFIG_DIR_BY_PLATFORM.get(platform_id)\n            if config_dir_name is None:\n                raise SolidLSPException(\n                    f\"Unsupported platform '{platform_id}' for upstream JDTLS mode. \"\n                    f\"Supported platforms: {sorted(set(JDTLS_CONFIG_DIR_BY_PLATFORM.values()))}.\"\n                )\n            config_dir = jdtls_root / config_dir_name\n            if not config_dir.is_dir():\n                raise SolidLSPException(\n                    f\"Config directory '{config_dir}' not found. \"\n                    f\"This JDTLS distribution does not support platform '{platform_id}'. \"\n                    f\"Verify you downloaded the correct tar.gz for your OS/architecture.\"\n                )\n            return config_dir\n\n        @staticmethod\n        def _resolve_system_jdk(custom_settings: SolidLSPSettings.CustomLSSettings) -> tuple[str, str]:\n            \"\"\"\n            Resolves the system-installed JDK home and ``java`` executable, validates the version.\n\n            The ``java`` executable is located by priority: ``java_home`` setting ->","sourceCodeStart":534,"sourceCodeEnd":570,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/solidlsp/language_servers/eclipse_jdtls.py#L534-L570","documentation":"This SolidLSPException is raised when the current OS/arch platform ID (from PlatformUtils) has no entry in JDTLS_CONFIG_DIR_BY_PLATFORM, so upstream JDTLS mode cannot select the matching config_<platform>/ directory. It indicates the platform is unsupported for upstream JDTLS mode in this Serena version.","triggerScenarios":"_setup_from_existing_install calls _resolve_config_dir during startup on an OS/arch combination (e.g. unusual linux arch like linux-arm64, freebsd, windows variant) whose PlatformUtils platform id is absent from the mapping table.","commonSituations":"Running Serena on ARM Linux or another niche platform while using upstream JDTLS mode; PlatformUtils returning a new platform id not yet covered by the table; cross-compiled/container environments reporting unexpected platform identifiers.","solutions":["Switch to default vscode-java VSIX mode by removing jdtls_path/lombok_path from ls_specific_settings.java (VSIX mode may support the platform).","Check supported platforms in JDTLS_CONFIG_DIR_BY_PLATFORM and run on one of them (x86_64/aarch64 macOS/Linux/Windows variants).","Upgrade Serena — newer releases may have added the platform mapping.","Run under an emulated/compatible architecture (e.g. Rosetta on macOS) if applicable.","File/patch an upstream issue adding your platform to the mapping table."],"exampleFix":"// before (unsupported platform, upstream mode)\n{\"ls_specific_settings\": {\"java\": {\"jdtls_path\": \"/opt/jdtls\", \"lombok_path\": \".../lombok.jar\"}}}\n// after (fall back to VSIX mode)\n{\"ls_specific_settings\": {\"java\": {}}}","handlingStrategy":"validation","validationCode":"from solidlsp.util.platform_utils import PlatformUtils  # adjust import\ncfg = settings.get('ls_specific_settings', {}).get('java', {})\nif cfg.get('jdtls_path') and PlatformUtils.get_platform_id().value not in SUPPORTED_JDTLS_PLATFORMS:\n    cfg.pop('jdtls_path'); cfg.pop('lombok_path', None)  # use VSIX mode instead","typeGuard":null,"tryCatchPattern":"try:\n    ls = SolidLSP(java_config)\nexcept SolidLSPException as e:\n    if 'Unsupported platform' in str(e):\n        cfg = java_config['ls_specific_settings']['java']\n        cfg.pop('jdtls_path', None); cfg.pop('lombok_path', None)\n        ls = SolidLSP(java_config)  # default VSIX mode\n    else:\n        raise","preventionTips":["Check PlatformUtils.get_platform_id() support before enabling upstream JDTLS mode on niche platforms (e.g. ARM Linux).","Prefer the default VSIX mode on platforms not listed in JDTLS_CONFIG_DIR_BY_PLATFORM.","Keep Serena updated to pick up newly supported platform mappings."],"tags":["java","jdtls","platform","compatibility"],"backgroundTag":"unsupported-platform","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}