apache/flink · error · IllegalArgumentException
Object is no primitive Java type.
Error message
Object is no primitive Java type.
What it means
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.
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.
Example fix
Correct the condition described ("Object is no primitive Java type.") and rerun the job or command. Defensive patterns
Strategy: type-guard
When it happens
Trigger: Triggered at runtime when the operation fails because: Object is no primitive Java type.
Common situations: Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Object is no primitive Java type.
AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14).
Data as JSON: /api/errors/d5a49f39c31ab230.
Report an issue: GitHub.
Appendix: source
Thrown at flink-core/src/main/java/org/apache/flink/types/JavaToValueConverter.java:52
return new StringValue((String) boxed);
} else if (clazz == Integer.class) {
return new IntValue((Integer) boxed);
} else if (clazz == Long.class) {
return new LongValue((Long) boxed);
} else if (clazz == Double.class) {
return new DoubleValue((Double) boxed);
} else if (clazz == Float.class) {
return new FloatValue((Float) boxed);
} else if (clazz == Boolean.class) {
return new BooleanValue((Boolean) boxed);
} else if (clazz == Byte.class) {
return new ByteValue((Byte) boxed);
} else if (clazz == Short.class) {
return new ShortValue((Short) boxed);
} else if (clazz == Character.class) {
return new CharValue((Character) boxed);
} else {
throw new IllegalArgumentException("Object is no primitive Java type.");
}
}
public static Object convertValueType(Value value) {
if (value == null) {
return null;
}
if (value instanceof StringValue) {
return ((StringValue) value).getValue();
} else if (value instanceof IntValue) {
return ((IntValue) value).getValue();
} else if (value instanceof LongValue) {
return ((LongValue) value).getValue();
} else if (value instanceof DoubleValue) {
return ((DoubleValue) value).getValue();
} else if (value instanceof FloatValue) {
return ((FloatValue) value).getValue();View on GitHub (pinned to 2f3c205e92)