quarkusio/quarkus · error · RuntimeException
Unrecognized primitive " + c
Error message
Unrecognized primitive " + c
What it means
getMethodDescriptor() builds a JVM-style descriptor string and getDescriptorForClass() maps primitives to their JVM letters. Reaching the final throw means an unrecognized Class object was passed as a primitive — an internal invariant violation rather than user error.
Source
Thrown at extensions/funqy/funqy-server-common/runtime/src/main/java/io/quarkus/funqy/runtime/FunctionRegistry.java:66
if (c == byte.class)
return "B";
if (c == char.class)
return "C";
if (c == double.class)
return "D";
if (c == float.class)
return "F";
if (c == int.class)
return "I";
if (c == long.class)
return "J";
if (c == short.class)
return "S";
if (c == boolean.class)
return "Z";
if (c == void.class)
return "V";
throw new RuntimeException("Unrecognized primitive " + c);
}
if (c.isArray())
return c.getName().replace('.', '/');
return ('L' + c.getName() + ';').replace('.', '/');
}
private static String getMethodDescriptor(Method m) {
String s = "(";
for (final Class c : m.getParameterTypes())
s += getDescriptorForClass(c);
s += ')';
return s + getDescriptorForClass(m.getReturnType());
}
}
View on GitHub (pinned to e1c734241f)
Solutions
- Clean rebuild and restart with a standard JDK to rule out stale/corrupted classes
- Disable custom agents/instrumentation and retry
- Report to Quarkus Funqy maintainers with the class name in the message if reproducible
Defensive patterns
Strategy: try-catch
Validate before calling
// Validate the class is a supported kind before descriptor computation
if (!(c.isPrimitive() || c.isArray() || !c.isInterface() || c.isInterface()))
throw new IllegalArgumentException("Unsupported class for descriptor: " + c); Try / catch
try {
String desc = FunctionRegistry.getMethodDescriptor(m);
} catch (RuntimeException e) {
if (e.getMessage().startsWith("Unrecognized primitive")) {
log.errorf(e, "Descriptor computation hit an unexpected class; check JDK/agent setup");
}
throw e;
} Prevention
- Use standard JDK builds without exotic agents when building Funqy apps
- Keep quarkus-funqy dependencies at matching versions
- Reproduce with a clean environment before filing a bug
When it happens
Trigger: Only reachable if a Class representing neither a known primitive, an array, nor a normal class reaches descriptor computation — typically with exotic classloader artifacts or a corrupted class reference.
Common situations: Very rare; may surface with broken instrumentation agents, mismatched JDK versions, or custom classloader tricks during Funqy registry building.
Related errors
- Method "" + methodDescription + "" not found.
- RuntimeException(e)
- RuntimeException(e)
- Couldn't extract all parameters information for constructor
- Failed to set dev services config
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/633f0f9caa653f16.
Report an issue: GitHub.