{"record":{"id":"8fd266af40310607","repo":"apache/dubbo","slug":"is-unknown-primitive-type","errorCode":null,"errorMessage":"{} is unknown primitive type.","messagePattern":"(.+?) is unknown primitive type\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"dubbo-common/src/main/java/org/apache/dubbo/common/bytecode/Proxy.java","lineNumber":227,"sourceCode":"            if (Character.TYPE == cl) {\n                return name + \"==null?(char)0:((Character)\" + name + \").charValue()\";\n            }\n            if (Double.TYPE == cl) {\n                return name + \"==null?(double)0:((Double)\" + name + \").doubleValue()\";\n            }\n            if (Float.TYPE == cl) {\n                return name + \"==null?(float)0:((Float)\" + name + \").floatValue()\";\n            }\n            if (Integer.TYPE == cl) {\n                return name + \"==null?(int)0:((Integer)\" + name + \").intValue()\";\n            }\n            if (Long.TYPE == cl) {\n                return name + \"==null?(long)0:((Long)\" + name + \").longValue()\";\n            }\n            if (Short.TYPE == cl) {\n                return name + \"==null?(short)0:((Short)\" + name + \").shortValue()\";\n            }\n            throw new RuntimeException(name + \" is unknown primitive type.\");\n        }\n        return \"(\" + ReflectUtils.getName(cl) + \")\" + name;\n    }\n\n    /**\n     * get instance with default handler.\n     *\n     * @return instance.\n     */\n    public Object newInstance() {\n        return newInstance(THROW_UNSUPPORTED_INVOKER);\n    }\n\n    /**\n     * get instance with special handler.\n     *\n     * @return instance.\n     */","sourceCodeStart":209,"sourceCodeEnd":245,"githubUrl":"https://github.com/apache/dubbo/blob/3a3043227f5571d25eb2889de5bca22f2914843b/dubbo-common/src/main/java/org/apache/dubbo/common/bytecode/Proxy.java#L209-L245","documentation":"Thrown by Proxy.asArgument when a parameter/return type reports cl.isPrimitive() true but is none of the eight boxed primitive checks (boolean, byte, char, double, float, int, long, short). This is defensive code: the JVM defines exactly those eight primitive types (plus void, handled elsewhere), so in practice this branch is unreachable on a standard JVM. Encountering it implies a corrupted/abnormal Class object or a JVM/javassist quirk.","triggerScenarios":"Proxy.getProxy(ics) where an interface method's parameter or return type is a primitive that asArgument does not recognize - effectively impossible on a compliant JVM; could surface from a custom/buggy Class object or a non-standard runtime.","commonSituations":"Never seen under normal JVM operation; would require a hand-crafted Class object, an exotic JVM, or a javassist version that misreports a type as primitive. Treat as an internal-error indicator rather than a configuration issue.","solutions":["Verify you are running on a standard JVM and a supported javassist version bundled with your Dubbo release.","Inspect the interface methods' parameter/return types for any unusual primitive-looking Class objects.","If reproducible, report to Dubbo with the interface definition and the full stack trace; this path is not expected to fire.","Upgrade Dubbo/javassist to a known-good combination as a first triage step."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    Proxy.getProxy(ics);\n} catch (RuntimeException e) {\n    if (e.getMessage().endsWith(\"is unknown primitive type.\")) {\n        // unexpected on a standard JVM; collect diagnostics and report\n    } else throw e;\n}","preventionTips":["Run on a standard JVM with the javassist version bundled with your Dubbo release.","If this fires, treat it as an internal error: gather the interface and full stack trace.","Upgrade Dubbo/javassist to a known-good combination before deeper investigation."],"tags":["bytecode","proxy","defensive","internal"],"backgroundTag":null,"analyzedSha":"3a3043227f5571d25eb2889de5bca22f2914843b","analyzedAt":"2026-08-14T00:43:19.853Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}