{"record":{"id":"edadadd96eca7da0","repo":"oraios/serena","slug":"resource-paths-inside-the-vscode-java-vscode-java","errorCode":null,"errorMessage":"Resource paths inside the vscode-java {vscode_java_version} VSIX are not pinned in serena (known: {cls.INITIAL_VSCODE_JAVA_VERSION}, {cls.DEFAULT_VSCODE_JAVA_VERSION}). Either remove the 'vscode_java_version' override (defaults to {cls.DEFAULT_VSCODE_JAVA_VERSION}), or use upstream JDTLS mode by setting both 'jdtls_path' and 'lombok_path' in ls_specific_settings.java (no pinning required).","messagePattern":"Resource paths inside the vscode-java (.+?) VSIX are not pinned in serena \\(known: (.+?), (.+?)\\)\\. Either remove the 'vscode_java_version' override \\(defaults to (.+?)\\), or use upstream JDTLS mode by setting both 'jdtls_path' and 'lombok_path' in ls_specific_settings\\.java \\(no pinning required\\)\\.","errorType":"exception","errorClass":"SolidLSPException","httpStatus":null,"severity":"error","filePath":"src/solidlsp/language_servers/eclipse_jdtls.py","lineNumber":361,"sourceCode":"            gradle_version = custom_settings.get(\"gradle_version\", cls.DEFAULT_GRADLE_VERSION)\n            vscode_java_version = custom_settings.get(\"vscode_java_version\", cls.DEFAULT_VSCODE_JAVA_VERSION)\n\n            # install-dir name per the version-pinning convention (see module-level block):\n            # INITIAL -> legacy unversioned dir; everything else -> \"{name}-{resolved}\" subdir\n            vscode_java_dirname = (\n                \"vscode-java\" if vscode_java_version == cls.INITIAL_VSCODE_JAVA_VERSION else f\"vscode-java-{vscode_java_version}\"\n            )\n\n            # Resolve internal VSIX paths (JRE / Lombok / launcher filenames). For pinned versions\n            # these are known; for any other user-supplied version we bail out — guessing would\n            # silently produce broken paths at JDTLS launch time, which is a worse UX than failing\n            # fast here with a pointer to upstream-JDTLS mode (which doesn't need pinned paths).\n            if vscode_java_version == cls.INITIAL_VSCODE_JAVA_VERSION:\n                vsix_paths = cls.INITIAL_VSCODE_JAVA_PATHS\n            elif vscode_java_version == cls.DEFAULT_VSCODE_JAVA_VERSION:\n                vsix_paths = cls.DEFAULT_VSCODE_JAVA_PATHS\n            else:\n                raise SolidLSPException(\n                    f\"Resource paths inside the vscode-java {vscode_java_version} VSIX are not pinned in serena \"\n                    f\"(known: {cls.INITIAL_VSCODE_JAVA_VERSION}, {cls.DEFAULT_VSCODE_JAVA_VERSION}). \"\n                    f\"Either remove the 'vscode_java_version' override (defaults to {cls.DEFAULT_VSCODE_JAVA_VERSION}), \"\n                    f\"or use upstream JDTLS mode by setting both 'jdtls_path' and 'lombok_path' in \"\n                    f\"ls_specific_settings.java (no pinning required).\"\n                )\n\n            vscode_java_configs: dict[str, VSCodeJavaConfig] = {\n                \"osx-arm64\": VSCodeJavaConfig(\n                    jre_home_path=f\"extension/jre/{vsix_paths.jre_version}-macosx-aarch64\",\n                    jre_path=f\"extension/jre/{vsix_paths.jre_version}-macosx-aarch64/bin/java\",\n                    lombok_jar_path=f\"extension/lombok/{vsix_paths.lombok_jar_basename}\",\n                    jdtls_launcher_jar_path=f\"extension/server/plugins/{vsix_paths.equinox_launcher_basename}\",\n                    jdtls_readonly_config_path=\"extension/server/config_mac_arm\",\n                ),\n                \"osx-x64\": VSCodeJavaConfig(\n                    jre_home_path=f\"extension/jre/{vsix_paths.jre_version}-macosx-x86_64\",\n                    jre_path=f\"extension/jre/{vsix_paths.jre_version}-macosx-x86_64/bin/java\",","sourceCodeStart":343,"sourceCodeEnd":379,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/solidlsp/language_servers/eclipse_jdtls.py#L343-L379","documentation":"This SolidLSPException is raised when 'vscode_java_version' is overridden to a version for which Serena has no pinned resource paths inside the vscode-java VSIX. Serena only knows the internal file layout for explicitly pinned versions (INITIAL and DEFAULT), so unknown overrides fail fast with an explanation of the two supported alternatives.","triggerScenarios":"_setup_runtime_dependencies reads custom_settings['vscode_java_version']; the value matches neither INITIAL_VSCODE_JAVA_VERSION nor DEFAULT_VSCODE_JAVA_VERSION, so no VSIX path table exists for it.","commonSituations":"User bumps vscode_java_version to a newer upstream release hoping for newer Java support; copy-pasted version string from vscode-java changelog; default version changed in a Serena upgrade while an old override lingers in config.","solutions":["Remove the 'vscode_java_version' override so the default pinned version is used.","Switch to upstream JDTLS mode by setting both 'jdtls_path' and 'lombok_path' in ls_specific_settings.java (no version pinning required).","Upgrade Serena to a release that pins the vscode-java version you need.","Verify the override string exactly matches a pinned version constant in eclipse_jdtls.py."],"exampleFix":"// before\n{\"ls_specific_settings\": {\"java\": {\"vscode_java_version\": \"1.34.0\"}}}\n// after\n{\"ls_specific_settings\": {\"java\": {}}}","handlingStrategy":"validation","validationCode":"java = settings.get('ls_specific_settings', {}).get('java', {})\nv = java.get('vscode_java_version')\nif v is not None and v not in (KNOWN_INITIAL_VSCODE_JAVA_VERSION, KNOWN_DEFAULT_VSCODE_JAVA_VERSION):\n    java.pop('vscode_java_version')  # fall back to the pinned default","typeGuard":"def vscode_java_version_is_pinned(java_settings: dict, pinned: set[str]) -> bool:\n    v = java_settings.get('vscode_java_version')\n    return v is None or v in pinned","tryCatchPattern":"try:\n    ls = SolidLSP(java_config)\nexcept SolidLSPException as e:\n    if 'not pinned in serena' in str(e):\n        java_config['ls_specific_settings']['java'].pop('vscode_java_version', None)\n        ls = SolidLSP(java_config)\n    else:\n        raise","preventionTips":["Avoid overriding vscode_java_version unless you know Serena pins that version.","After upgrading Serena, re-check any vscode_java_version override against its new pinned constants.","Use upstream JDTLS mode (jdtls_path + lombok_path) if you need a specific JDTLS version without pinning."],"tags":["java","jdtls","configuration","versioning"],"backgroundTag":"unsupported-version","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}