conductor-oss/conductor · error · IllegalArgumentException
missing wrapper class:
Error message
missing wrapper class:
What it means
Thrown as IllegalArgumentException by WrappedType.wrap after computing the expected wrapper class name (value simple name + suffix) and not finding a MessageType registered under that simple name in TypeMapper. protogen expects a generated wrapper message (e.g. StringMap) to exist for the collection/map value; if discovery did not declare it, wrapping cannot proceed.
Source
Thrown at annotations-processor/src/main/java/com/netflix/conductor/annotationsprocessor/protogen/types/WrappedType.java:35
import javax.lang.model.element.Modifier;
import com.squareup.javapoet.MethodSpec;
import com.squareup.javapoet.TypeName;
public class WrappedType extends AbstractType {
private AbstractType realType;
private MessageType wrappedType;
public static WrappedType wrap(GenericType realType) {
Type valueType = realType.getValueType().getJavaType();
if (!(valueType instanceof Class))
throw new IllegalArgumentException("cannot wrap primitive type: " + valueType);
String className = ((Class) valueType).getSimpleName() + realType.getWrapperSuffix();
MessageType wrappedType = TypeMapper.INSTANCE.get(className);
if (wrappedType == null)
throw new IllegalArgumentException("missing wrapper class: " + className);
return new WrappedType(realType, wrappedType);
}
public WrappedType(AbstractType realType, MessageType wrappedType) {
super(realType.getJavaType(), wrappedType.getJavaProtoType());
this.realType = realType;
this.wrappedType = wrappedType;
}
@Override
public String getProtoType() {
return wrappedType.getProtoType();
}
@Override
public TypeName getRawJavaType() {
return realType.getRawJavaType();
}View on GitHub (pinned to cf7c3e4a8a)
Solutions
- Confirm the wrapper message for the value type is generated and registered before WrappedType.wrap runs.
- Ensure value type simple names follow the naming protogen derives (Simple + suffix like 'Map').
- Use scalar value types where possible so no wrapper is needed (List<String>, Map<String,Integer>).
- If a custom wrapper is intended, declare it via TypeMapper.declare so get(className) resolves it.
Example fix
// before — value type has no registered wrapper Map<String, Custom> map; // 'CustomMap' not declared // after — use scalar value, or ensure CustomMap wrapper is generated Map<String, String> map; // scalar needs no wrapper
Defensive patterns
Strategy: validation
Validate before calling
String wrapperName = ((Class) valueType).getSimpleName() + realType.getWrapperSuffix();
if (TypeMapper.INSTANCE.get(wrapperName) == null) {
throw new IllegalStateException(
"No protogen wrapper registered for " + wrapperName + "; generate/register it first or use a scalar value type.");
} Prevention
- Ensure wrapper messages are generated and registered before WrappedType.wrap runs.
- Prefer scalar collection values to avoid wrappers entirely.
- Declare any custom wrapper via TypeMapper.declare so get(className) resolves it.
When it happens
Trigger: A collection/map field whose value requires a wrapper (non-scalar value) but the corresponding wrapper message class was never declared — e.g. the wrapper source was not generated/registered, or the value type's simple name does not match the expected wrapper naming convention.
Common situations: Custom value types whose names do not follow the suffix convention expected by protogen; running protogen without first generating the wrapper messages; a partial codegen where wrapper messages were excluded.
Related errors
- cannot map non-scalar map key:
- Cannot map type:
- duplicate type declaration:
- cannot wrap primitive type:
- missing Jar file
AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14).
Data as JSON: /api/errors/5c2baf4965d917ef.
Report an issue: GitHub.