pinpoint-apm/pinpoint · warning · IllegalArgumentException
')' not found. signature:
Error message
')' not found. signature:
What it means
After finding '(' in the method descriptor, getParameterSignature looks for the matching ')'. If the signature has an opening parenthesis but no closing one, the descriptor is truncated/malformed and IllegalArgumentException is thrown.
Source
Thrown at agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/util/JavaAssistUtils.java:384
return Collections.emptyList();
}
final Matcher matcher = PARAMETER_SIGNATURE_PATTERN.matcher(parameterSignature);
final List<String> parameterTypeList = new ArrayList<>();
while (matcher.find()) {
parameterTypeList.add(matcher.group());
}
return parameterTypeList;
}
private static String getParameterSignature(String signature) {
int start = signature.indexOf('(');
if (start == -1) {
throw new IllegalArgumentException("'(' not found. signature:" + signature);
}
final int end = signature.indexOf(')', start + 1);
if (end == -1) {
throw new IllegalArgumentException("')' not found. signature:" + signature);
}
start = start + 1;
if (start == end) {
return "";
}
return signature.substring(start, end);
}
public static String[] getParameterType(Class<?>[] paramsClass) {
if (paramsClass == null) {
return null;
}
String[] paramsString = new String[paramsClass.length];
for (int i = 0; i < paramsClass.length; i++) {
paramsString[i] = paramsClass[i].getName();
}
return paramsString;
}View on GitHub (pinned to 744c3d3075)
Solutions
- Ensure the complete descriptor including ')' (and return type) is passed
- Fix string truncation where the descriptor is produced or stored
- Validate with signature.indexOf(')') > signature.indexOf('(') before calling
Example fix
// before String sig = "(ILjava/lang/String;"; // truncated -> throws // after String sig = "(ILjava/lang/String;)V"; // complete descriptor
Defensive patterns
Strategy: validation
Validate before calling
int open = signature.indexOf('('); if (open < 0 || signature.indexOf(')', open + 1) < 0) { throw new IllegalArgumentException("truncated method descriptor: " + signature); } Type guard
boolean isCompleteMethodDescriptor(String s) { int o = s == null ? -1 : s.indexOf('('); return o >= 0 && s.indexOf(')', o + 1) >= 0; } Try / catch
try { params = JavaAssistUtils.parseParameterSignature(sig); } catch (IllegalArgumentException e) { logger.warn("Truncated descriptor {}", sig); params = Collections.emptyList(); } Prevention
- Avoid fixed-length/truncating storage of descriptors
- Validate descriptor completeness before caching
- Build descriptors atomically and pass them only when complete
When it happens
Trigger: Calling parameterSignature/getParameterSignature with a truncated method descriptor such as '(ILjava/lang/String; — cut off before the parameter list terminator.
Common situations: Descriptor strings truncated by fixed-length storage or bad string slicing; signature built incrementally and passed before completion; corrupted API metadata caches.
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 :
- invalid signature. objectName not found :
- '(' 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/ec0260ce5c8d9aed.
Report an issue: GitHub.