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

  1. Register a ParamConverterProvider for the type so the build indexes it into existingConverters
  2. Use the RESTEasy Reactive @ParamConverter annotation on the type to point to a converter class
  3. Verify the converter provider class is part of the Jandex index (add a beans.xml or index the dependency)
  4. 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

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


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/f6af5d1d8c9cb5b8. Report an issue: GitHub.