quarkusio/quarkus · error · RuntimeException

Failed to process method '%s#%s'. Reason: %s

Error message

Failed to process method '%s#%s'. Reason: %s

What it means

This is the generic wrapper RESTEasy Reactive's EndpointIndexer.createResourceMethod throws when any unexpected RuntimeException occurs while introspecting a resource method. The original message is preserved as the 'Reason:' suffix and the cause is attached. It signals a failure in the endpoint indexing phase of the Quarkus deployment, not a runtime request problem.

Source

Thrown at independent-projects/resteasy-reactive/common/processor/src/main/java/org/jboss/resteasy/reactive/common/processor/EndpointIndexer.java:828

                            determineReturnType(methodContextReturnTypeOrReturnType, typeArgMapper, currentClassInfo,
                                    actualEndpointInfo, index));

            if (httpMethod == null) {
                handleClientSubResource(method, currentMethodInfo, index);
            }

            handleAdditionalMethodProcessing((METHOD) method, currentClassInfo, currentMethodInfo, getAnnotationStore());
            if (resourceMethodCallback != null) {
                resourceMethodCallback.accept(
                        new ResourceMethodCallbackEntry(this, index, basicResourceClassInfo, actualEndpointInfo,
                                currentMethodInfo,
                                method));
            }
            return method;
        } catch (DeploymentException e) {
            throw e;
        } catch (RuntimeException e) {
            throw new RuntimeException(String.format("Failed to process method '%s#%s'. Reason: %s",
                    currentMethodInfo.declaringClass().name(), currentMethodInfo, e.getMessage()), e);
        }
    }

    protected void warnAboutMissUsedBodyParameter(DotName httpMethod, MethodInfo methodInfo) {
        log.warnf("Using a body parameter with %s is strongly discouraged. Offending method is "
                + "'%s#%s'", httpMethod, methodInfo.declaringClass().name(), methodInfo);
    }

    private Function<Map<DotName, AnnotationInstance>, Boolean> skipNotRestParameters(boolean skipAllNotMethodParameter) {
        return new Function<Map<DotName, AnnotationInstance>, Boolean>() {
            @Override
            public Boolean apply(Map<DotName, AnnotationInstance> anns) {
                if (skipAllNotMethodParameter) {
                    return anns.size() > 0
                            && JAX_RS_ANNOTATIONS_FOR_FIELDS.stream().noneMatch(dotName -> anns.containsKey(dotName));
                }
                return false;

View on GitHub (pinned to e1c734241f)

Solutions

  1. Read the 'Reason:' text and the nested cause in the stack trace to identify the original exception
  2. Fix the resource method signature or types referenced by it according to the underlying cause
  3. Check that all types used in the endpoint are on the deployment classpath and indexed; if the cause looks like a framework bug, search/raise a Quarkus issue with a reproducer

Example fix

// before (unindexed custom type throws during processing)
public String get(CustomUnindexedType param) { ... }
// after (use a supported, indexed parameter type)
public String get(@QueryParam("id") String id) { ... }
Defensive patterns

Strategy: try-catch

Try / catch

try {
    quarkusBuild(); // or start the app
} catch (RuntimeException e) {
    if (e.getMessage() != null && e.getMessage().startsWith("Failed to process method")) {
        log.error("Endpoint indexing failed: {} — inspect cause", e.getMessage(), e.getCause());
    } else {
        throw e;
    }
}

Prevention

When it happens

Trigger: Any exception thrown inside createResourceMethod while processing a resource method — e.g. failures resolving generic types, unsupported parameter/return types, reflective lookup errors on types referenced by the endpoint, or bugs in custom parameter handlers.

Common situations: Endpoints using exotic generic declarations that the type resolver cannot handle; custom @Context-like injections or custom param converters that throw; classpath issues where a type referenced by the endpoint is missing from the Jandex index.

Related errors


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