{
  "id": "cicd/jenkins-agent-java-version-mismatch",
  "signature": "java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0",
  "signature_zh": "java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher 由较新版本的 Java 运行时编译（类文件版本 61.0），此 Java 运行时仅识别最高版本 55.0 的类文件",
  "regex": "UnsupportedClassVersionError.*hudson/remoting/Launcher.*class file version.*this version of the Java Runtime only recognizes",
  "domain": "cicd",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "Jenkins agent is running an older Java version (e.g., Java 11) than the Jenkins controller (e.g., Java 17), causing remoting jar incompatibility.",
  "root_cause_type": "generic",
  "root_cause_zh": "Jenkins agent 运行较旧版本的 Java（例如 Java 11），而 Jenkins 控制器运行较新版本（例如 Java 17），导致 remoting jar 不兼容。",
  "versions": [
    {
      "version": "Jenkins 2.440",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Jenkins 2.450",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Java 11",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Java 17",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Java 21",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Updating the agent.jar file manually without updating the Java runtime still fails because the agent JVM is too old.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Setting JAVA_HOME on the agent to a Java 8 installation makes the error worse as the version gap increases.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Restarting the Jenkins controller does not affect agent Java versions; the agent must be upgraded independently.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "On the Jenkins agent, install Java 17 or later matching the controller's version. Update JAVA_HOME and restart the agent service. For Linux: sudo apt install openjdk-17-jre && sudo systemctl restart jenkins-agent",
      "success_rate": 0.9,
      "how": "On the Jenkins agent, install Java 17 or later matching the controller's version. Update JAVA_HOME and restart the agent service. For Linux: sudo apt install openjdk-17-jre && sudo systemctl restart jenkins-agent",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use the 'WebSocket' agent connection mode instead of TCP: In Jenkins controller, configure the agent to use WebSocket (under Advanced > WebSocket). This bypasses some class version checks.",
      "success_rate": 0.75,
      "how": "Use the 'WebSocket' agent connection mode instead of TCP: In Jenkins controller, configure the agent to use WebSocket (under Advanced > WebSocket). This bypasses some class version checks.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "On the Jenkins agent, install Java 17 or later matching the controller's version. Update JAVA_HOME and restart the agent service. For Linux: sudo apt install openjdk-17-jre && sudo systemctl restart jenkins-agent",
    "Use the 'WebSocket' agent connection mode instead of TCP: In Jenkins controller, configure the agent to use WebSocket (under Advanced > WebSocket). This bypasses some class version checks."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.jenkins.io/doc/administration/requirements/java/",
  "official_doc_section": null,
  "error_code": "JENKINS_JAVA_VERSION",
  "verification_tier": "ai_generated",
  "confidence": 0.9,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-06-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}