quarkusio/quarkus · error · RuntimeException
Failed to find converter for ${elementType}
Error message
Failed to find converter for ${elementType} What it means
GeneratedConverterIndexerExtension.extractConverterImpl is the extension hook that ServerEndpointIndexer.extractConverter falls back to when no built-in converter exists for a parameter element type. If the type is not found among existing/registered generated converters and runtime converters are disabled, it throws 'Failed to find converter' at deployment.
Source
Thrown at independent-projects/resteasy-reactive/server/processor/src/main/java/org/jboss/resteasy/reactive/server/processor/generation/converters/GeneratedConverterIndexerExtension.java:106
} else if (valueOf != null) {
ResultHandle ret = mc.invokeStaticMethod(valueOf, mc.getMethodParam(0));
mc.returnValue(ret);
} else if (fromString != null) {
ResultHandle ret = mc.invokeStaticMethod(fromString, mc.getMethodParam(0));
mc.returnValue(ret);
}
}
delegate = new LoadedParameterConverter().setClassName(baseName);
} else {
// let's not try this again
baseName = null;
delegate = null;
}
existingConverters.put(elementType, baseName);
if (hasRuntimeConverters)
return new RuntimeResolvedConverter.Supplier().setDelegate(delegate);
if (delegate == null)
throw new RuntimeException("Failed to find converter for " + elementType);
return delegate;
}
}
View on GitHub (pinned to e1c734241f)
Solutions
- Register a ParamConverterProvider for the type so the build indexes it into existingConverters
- Use the RESTEasy Reactive @ParamConverter annotation on the type to point to a converter class
- Verify the converter provider class is part of the Jandex index (add a beans.xml or index the dependency)
- Fall back to a String parameter with manual parsing
Example fix
// before
class Filter { ... } // used as @QueryParam("f") Filter f
// after
@ParamConverter(FilterParamConverter.class)
class Filter { ... } Defensive patterns
Strategy: validation
Validate before calling
// Verify converter availability via the indexer extension before deployment
String base = existingConverters.get(elementType);
if (base == null && !hasRuntimeConverters && !isBuiltInType(elementType)) {
throw new IllegalStateException("Register a converter for " + elementType + " before building");
} Prevention
- Annotate custom param types with @ParamConverter so converters are discovered at build time
- Ensure converter libraries are included in the Jandex index
- Avoid runtime-only converter registration when building native images
- Keep a test application that maps every custom param type
When it happens
Trigger: Same as 3581 but resolved through the indexer-extension path: a JAX-RS parameter type with no registered converter in existingConverters, no built-in support, and hasRuntimeConverters==false, so the extension's delegate lookup returns null.
Common situations: Custom value types in @QueryParam/@PathParam without a build-time indexed ParamConverter; converters registered only at runtime while the build expects indexed ones; packaging converters in a library that isn't bean-indexed.
Related errors
- Failed to find converter for ${elementType}
- Could not create converter for ${elementType} for ${builder.
- Unable to handle temporal type '${paramType}'
- Method '%s' of class '%s' is annotated with @%s annotation w
- Cannot call getValue() at deployment time
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/f6af5d1d8c9cb5b8.
Report an issue: GitHub.