pinpoint-apm/pinpoint · error · IllegalArgumentException
invalid operator - not found right operand. operator=
Error message
invalid operator - not found right operand. operator=${operator} What it means
When traversing a matcher operand expression tree, a NotMatcherOperator (logical NOT) must have a right operand. A NotMatcherOperator with a null right operand is structurally invalid, so traversal throws IllegalArgumentException before evaluating.
Solutions
- Construct the NOT operator with a valid right operand (e.g. new NotMatcherOperator(someOperand) or chaining someOperand.not())
- Add a null check before using the operator in your matcher construction code
- Log/inspect how the MatcherOperand tree was built to find where the operand was lost
Example fix
// before
MatcherOperand op = new NotMatcherOperator(null);
// after
MatcherOperand op = new NotMatcherOperator(new ClassInternalNameMatcherOperand("java/lang/String")); Defensive patterns
Strategy: validation
Validate before calling
if (operand instanceof NotMatcherOperator && ((NotMatcherOperator) operand).getRightOperand() == null) throw new IllegalStateException("NOT operator missing operand"); Try / catch
try { boolean r = matcher.match(classLoader, operand, meta); } catch (IllegalArgumentException e) { log.error("malformed matcher tree: {}", e.getMessage()); } Prevention
- Use fluent chaining (operand.not()) instead of raw constructors
- Validate operand trees after building
- Avoid passing null into operator constructors
When it happens
Trigger: Calling traversal()/match() with a NotMatcherOperator constructed without an operand, e.g. new NotMatcherOperator(null) or an operator whose right operand was never chained.
Common situations: Programmatic matcher expression building where a NOT operator is created but the operand to negate is never attached; deserialization or refactoring dropping the operand.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- invalid operator - not found left operand. operator=
- annotationKey name must not be empty
- Either tagGroupList or fieldNameList must have a size of…
- eventIdentifier cannot be less than 0
- invalid pinpoint.agentName=
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/3c1928dff91941ce.
Report an issue: GitHub.
Appendix: source
Thrown at agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/transformer/DefaultTransformerMatcher.java:253
}
try {
return InternalClassMetadataReader.readInternalClassMetadata(classLoader, classInternalName);
} catch (Exception e) {
if (logger.isInfoEnabled()) {
logger.info("Failed to read metadata of class. classLoader={}, internalName={}", classLoader, classInternalName, e);
}
}
// not found.
return null;
}
boolean traversal(ClassLoader classLoader, MatcherOperand operand, InternalClassMetadata classMetadata) {
if (operand instanceof NotMatcherOperator) {
NotMatcherOperator operator = (NotMatcherOperator) operand;
if (operator.getRightOperand() == null) {
throw new IllegalArgumentException("invalid operator - not found right operand. operator=" + operator);
}
final MatcherOperand rightOperand = operator.getRightOperand();
// NOT
return match(classLoader, rightOperand, classMetadata) == false;
}
MatcherOperator operator = (MatcherOperator) operand;
// for binary operator.
if (operator.getLeftOperand() == null) {
throw new IllegalArgumentException("invalid operator - not found left operand. operator=" + operator);
}
final MatcherOperand leftOperand = operator.getLeftOperand();
if (operator.getRightOperand() == null) {
throw new IllegalArgumentException("invalid operator - not found right operand. operator=" + operator);
}
final MatcherOperand rightOperand = operator.getRightOperand();View on GitHub (pinned to 744c3d3075)