{
  "id": "java/malformed-parameterized-type",
  "signature": "java.lang.reflect.MalformedParameterizedTypeException",
  "signature_zh": "java.lang.reflect.MalformedParameterizedTypeException",
  "regex": "java\\.lang\\.reflect\\.MalformedParameterizedTypeException",
  "domain": "java",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "The JVM's reflection system encountered a malformed parameterized type signature, typically caused by bytecode manipulation libraries (like ASM, CGLIB, or ByteBuddy) generating incorrect generic type information, or by incompatibilities between library versions.",
  "root_cause_type": "generic",
  "root_cause_zh": "JVM的反射系统遇到格式错误的参数化类型签名，通常是由字节码操作库（如ASM、CGLIB或ByteBuddy）生成不正确的泛型类型信息，或库版本不兼容引起的。",
  "versions": [
    {
      "version": "Java 8",
      "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": "Spring Boot 2.7.18",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Spring Boot 3.2.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Hibernate 5.6.15",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Hibernate 6.4.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Upgrade all dependencies to the latest versions indiscriminately",
      "why_fails": "Blindly upgrading can introduce new incompatibilities. The issue is often a specific version mismatch between a bytecode library and the JVM or framework. Targeted upgrades with compatibility testing are needed.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "Add @SuppressWarnings(\"unchecked\") or ignore the exception",
      "why_fails": "The exception is thrown at runtime and cannot be suppressed by annotations. Ignoring it will cause the application to crash or behave incorrectly when reflection is used.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Identify the conflicting library using the stack trace. For example, if the trace shows `net.sf.cglib.proxy.MethodProxy`, ensure CGLIB version is compatible with the ASM version. Use Maven's dependency tree: `mvn dependency:tree -Dincludes=*cglib*` and align versions. Example: use CGLIB 3.3.0 with ASM 9.5.",
      "success_rate": 0.8,
      "how": "Identify the conflicting library using the stack trace. For example, if the trace shows `net.sf.cglib.proxy.MethodProxy`, ensure CGLIB version is compatible with the ASM version. Use Maven's dependency tree: `mvn dependency:tree -Dincludes=*cglib*` and align versions. Example: use CGLIB 3.3.0 with ASM 9.5.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If using Spring Boot with AOP proxies, switch from CGLIB proxies to JDK dynamic proxies by setting `spring.aop.proxy-target-class=false` in application.properties. This avoids the bytecode manipulation that triggers the error.",
      "success_rate": 0.75,
      "how": "If using Spring Boot with AOP proxies, switch from CGLIB proxies to JDK dynamic proxies by setting `spring.aop.proxy-target-class=false` in application.properties. This avoids the bytecode manipulation that triggers the error.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Rebuild the project with a clean cache: `mvn clean install -U` (Maven) or `gradle clean build --refresh-dependencies` (Gradle). This ensures all bytecode artifacts are regenerated from source, eliminating stale or corrupted class files.",
      "success_rate": 0.7,
      "how": "Rebuild the project with a clean cache: `mvn clean install -U` (Maven) or `gradle clean build --refresh-dependencies` (Gradle). This ensures all bytecode artifacts are regenerated from source, eliminating stale or corrupted class files.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Identify the conflicting library using the stack trace. For example, if the trace shows `net.sf.cglib.proxy.MethodProxy`, ensure CGLIB version is compatible with the ASM version. Use Maven's dependency tree: `mvn dependency:tree -Dincludes=*cglib*` and align versions. Example: use CGLIB 3.3.0 with ASM 9.5.",
    "If using Spring Boot with AOP proxies, switch from CGLIB proxies to JDK dynamic proxies by setting `spring.aop.proxy-target-class=false` in application.properties. This avoids the bytecode manipulation that triggers the error.",
    "Rebuild the project with a clean cache: `mvn clean install -U` (Maven) or `gradle clean build --refresh-dependencies` (Gradle). This ensures all bytecode artifacts are regenerated from source, eliminating stale or corrupted class files."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/reflect/MalformedParameterizedTypeException.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.83,
  "fix_success_rate": 0.78,
  "resolvable": "true",
  "first_seen": "2024-06-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}