pinpoint-apm/pinpoint · error · IllegalArgumentException
null parameterType not supported
Error message
null parameterType not supported
What it means
TransformTemplate.transform rejects a parameterTypes array that contains null entries. A null element is not a real Class token, so before deeper validation the method throws IllegalArgumentException with this message.
Source
Thrown at agent-module/bootstraps/bootstrap-core/src/main/java/com/navercorp/pinpoint/bootstrap/instrument/transformer/TransformTemplate.java:90
//// if (ParameterUtils.hasNull(parameters)) {
//// throw new IllegalArgumentException("null parameter not supported");
//// }
//
// final Class<?>[] parameterType = ParameterUtils.toClass(parameters);
// // commons-lang
// // ConstructorUtils.getMatchingAccessibleConstructor()
//
// transform(className, transformCallbackClass, parameters, parameterType);
// }
@Override
public void transform(String className, Class<? extends TransformCallback> transformCallbackClass, Object[] parameters, Class<?>[] parameterTypes) {
Objects.requireNonNull(className, "className");
Objects.requireNonNull(transformCallbackClass, "transformCallbackClass");
TransformCallbackChecker.validate(transformCallbackClass, parameterTypes);
if (ParameterUtils.hasNull(parameterTypes)) {
throw new IllegalArgumentException("null parameterType not supported");
}
ParameterUtils.checkParameterType(parameterTypes);
final Matcher matcher = Matchers.newClassNameMatcher(className);
// release class reference
final String transformCallbackName = transformCallbackClass.getName();
this.instrumentContext.addClassFileTransformer(matcher, transformCallbackName, parameters, parameterTypes);
}
@Override
public void transform(String className, Class<? extends TransformCallback> transformCallbackClass, TransformCallbackParameters params) {
Object[] parameters = params.values();
Class<?>[] parameterTypes = params.types();
this.transform(className, transformCallbackClass, parameters, parameterTypes);
}
}View on GitHub (pinned to 744c3d3075)
Solutions
- Ensure every element of parameterTypes is a non-null Class before calling transform
- Size the array to the actual number of parameters to avoid trailing null slots
- Use a helper (ParameterUtils.hasNull) in your own code to pre-validate
Example fix
// before
Class<?>[] types = new Class<?>[2];
types[0] = String.class; // types[1] is null
transformer.transform("Foo", Cb.class, new Object[]{"a"}, types); // throws
// after
Class<?>[] types = new Class<?>[]{String.class};
transformer.transform("Foo", Cb.class, new Object[]{"a"}, types); Defensive patterns
Strategy: validation
Validate before calling
boolean hasNullType = parameterTypes == null || Arrays.asList(parameterTypes).contains(null);
if (hasNullType) throw new IllegalArgumentException("parameterTypes must not contain null"); Try / catch
try {
transformer.transform(name, cb, params, types);
} catch (IllegalArgumentException e) {
if ("null parameterType not supported".equals(e.getMessage())) {
logger.error("parameterTypes array contains null; rebuild it with concrete Class tokens", e);
} else { throw e; }
} Prevention
- Build Class[] arrays with exact sizing — no placeholder null slots
- Validate arrays with ParameterUtils.hasNull in test utilities
- Prefer varargs collection conversion that fails fast on null elements
When it happens
Trigger: Calling transform(className, callbackClass, parameters, parameterTypes) where the parameterTypes array itself contains a null element (e.g. built by conditional code that forgot to assign a Class).
Common situations: Constructing the Class[] array dynamically with unassigned slots; passing a mix of typed and untyped constructor arguments; converting a varargs list that included nulls.
Related errors
- transformCallbackClass must be static inner class. class:
- Invalid time unit provided.
- unsupported type:
- constructor not found
- handler
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/748fcb22bae1cd98.
Report an issue: GitHub.