{"record":{"id":"d5a49f39c31ab230","repo":"apache/flink","slug":"object-is-no-primitive-java-type","errorCode":null,"errorMessage":"Object is no primitive Java type.","messagePattern":"Object is no primitive Java type\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"flink-core/src/main/java/org/apache/flink/types/JavaToValueConverter.java","lineNumber":52,"sourceCode":"            return new StringValue((String) boxed);\n        } else if (clazz == Integer.class) {\n            return new IntValue((Integer) boxed);\n        } else if (clazz == Long.class) {\n            return new LongValue((Long) boxed);\n        } else if (clazz == Double.class) {\n            return new DoubleValue((Double) boxed);\n        } else if (clazz == Float.class) {\n            return new FloatValue((Float) boxed);\n        } else if (clazz == Boolean.class) {\n            return new BooleanValue((Boolean) boxed);\n        } else if (clazz == Byte.class) {\n            return new ByteValue((Byte) boxed);\n        } else if (clazz == Short.class) {\n            return new ShortValue((Short) boxed);\n        } else if (clazz == Character.class) {\n            return new CharValue((Character) boxed);\n        } else {\n            throw new IllegalArgumentException(\"Object is no primitive Java type.\");\n        }\n    }\n\n    public static Object convertValueType(Value value) {\n        if (value == null) {\n            return null;\n        }\n\n        if (value instanceof StringValue) {\n            return ((StringValue) value).getValue();\n        } else if (value instanceof IntValue) {\n            return ((IntValue) value).getValue();\n        } else if (value instanceof LongValue) {\n            return ((LongValue) value).getValue();\n        } else if (value instanceof DoubleValue) {\n            return ((DoubleValue) value).getValue();\n        } else if (value instanceof FloatValue) {\n            return ((FloatValue) value).getValue();","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-core/src/main/java/org/apache/flink/types/JavaToValueConverter.java#L34-L70","documentation":"Thrown by JavaToValueConverter.convertBoxedJavaType when the boxed object's class is none of the supported primitive wrapper types (String, Integer, Long, Double, Float, Boolean, Byte, ...), i.e. no corresponding Value type exists for it.","triggerScenarios":"Triggered at runtime when the operation fails because: Object is no primitive Java type.","commonSituations":"Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Object is no primitive Java type.","solutions":["Address the cause reported by the error message: Object is no primitive Java type.","Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry."],"exampleFix":"Correct the condition described (\"Object is no primitive Java type.\") and rerun the job or command.","handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","contentChangedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}