pinpoint-apm/pinpoint · warning · IllegalArgumentException
invalid signature :
Error message
invalid signature :
What it means
JavaAssistUtils.byteCodeSignatureToObjectType maps a JVM type signature character (L for objects, [ for arrays, plus primitives) to its Java type. If the leading character at the given index is none of the known signature codes, the signature string is malformed and IllegalArgumentException is thrown.
Source
Thrown at agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/util/JavaAssistUtils.java:326
case 'F':
return "float";
case 'I':
return "int";
case 'J':
return "long";
case 'S':
return "short";
case 'V':
return "void";
case 'Z':
return "boolean";
case 'L':
return toObjectType(signature, startIndex + 1);
case '[': {
return toArrayType(signature);
}
}
throw new IllegalArgumentException("invalid signature :" + signature);
}
private static String toArrayType(String description) {
final int arraySize = getArraySize(description);
final String objectType = byteCodeSignatureToObjectType(description, arraySize);
return arrayType(objectType, arraySize);
}
private static String arrayType(String objectType, int arraySize) {
final int arrayStringLength = ARRAY.length() * arraySize;
StringBuilder sb = new StringBuilder(objectType.length() + arrayStringLength);
sb.append(objectType);
for (int i = 0; i < arraySize; i++) {
sb.append(ARRAY);
}
return sb.toString();
}
View on GitHub (pinned to 744c3d3075)
Solutions
- Validate the descriptor format before calling (must start with '(', contain valid JVM type codes)
- Convert Java names to JVM descriptors first (e.g. javaNameToJvmName/toDescriptor) rather than passing raw Java names
- Check for truncation/corruption where the signature string is produced
- Log the full signature and position to locate the offending character
Example fix
// before
JavaAssistUtils.objectType("java.lang.String"); // not a descriptor -> throws
// after
JavaAssistUtils.objectType("Ljava/lang/String;"); // valid JVM signature Defensive patterns
Strategy: validation
Validate before calling
String ok = "BCDFIJSZL["; if (signature == null || signature.isEmpty() || ok.indexOf(signature.charAt(0)) < 0) { throw new IllegalArgumentException("bad signature: " + signature); } Try / catch
try { type = JavaAssistUtils.objectType(sig); } catch (IllegalArgumentException e) { logger.warn("Bad signature {}", sig); type = sig; } Prevention
- Always pass JVM descriptors, never Java source names
- Validate signature character set before parsing
- Log full signature + offset when parsing fails
When it happens
Trigger: Passing a method/field descriptor whose component type starts with an unrecognized character (not B/C/D/F/I/J/S/Z/L/[/V) at the current parse position; callers include parseParameterSignature and objectType.
Common situations: Hand-crafted or truncated descriptors; passing a Java class name instead of a JVM descriptor; descriptors corrupted by string manipulation or wrong substring offsets.
Understand the failure class
Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.
Related errors
- invalid signature. objectName not found :
- '(' not found. signature:
- ')' not found. signature:
- agentIndex not found:${transactionId}
- invalid transactionId:${transactionId}
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/72ac9f4e7ae82f94.
Report an issue: GitHub.