quarkusio/quarkus · error · IllegalStateException

Unimplemented

Error message

Unimplemented

What it means

While generating bytecode for form/body parameter handling of a client method, the code encountered a parameter category (an enum in the switch) that has no generation logic implemented. This is an internal 'should never happen' guard — a code path for that parameter kind was never written.

Source

Thrown at extensions/resteasy-reactive/rest-client-jaxrs/deployment/src/main/java/io/quarkus/jaxrs/client/reactive/deployment/JaxrsClientReactiveProcessor.java:3125

                            pathParam.getPathParamName(),
                            pathParam.extract(creator, param), pathParam.getParamType(), client,
                            getGenericTypeFromParameter(creator, beanParamDescriptorField, item.fieldName()),
                            getAnnotationsFromParameter(creator, beanParamDescriptorField, item.fieldName()));
                    break;
                case FORM_PARAM:
                    FormParamItem formParam = (FormParamItem) item;
                    addFormParam(jandexMethod, creator, formParam.getFormParamName(), formParam.extract(creator, param),
                            formParam.getParamType(), formParam.getParamSignature(),
                            index,
                            restClientInterfaceClassName, client,
                            formParams,
                            getGenericTypeFromParameter(creator, beanParamDescriptorField, item.fieldName()),
                            getAnnotationsFromParameter(creator, beanParamDescriptorField, item.fieldName()),
                            multipart, formParam.getMimeType(), formParam.getFileName(),
                            beanParamClass + "." + formParam.getSourceName());
                    break;
                default:
                    throw new IllegalStateException("Unimplemented");
            }
        }
    }

    private ResultHandle getGenericTypeFromParameter(BytecodeCreator creator, Supplier<FieldDescriptor> supplier,
            String name) {
        // Will return Map<String, ParameterDescriptorFromClassSupplier.ParameterDescriptor>
        ResultHandle map = creator.invokeInterfaceMethod(ofMethod(Supplier.class, "get", Object.class),
                creator.readStaticField(supplier.get()));
        // Will return ParameterDescriptorFromClassSupplier.ParameterDescriptor;
        ResultHandle value = creator.invokeInterfaceMethod(ofMethod(Map.class, "get", Object.class, Object.class),
                map, creator.load(name));
        // if (value != null) return value.genericType;
        AssignableResultHandle genericType = creator.createVariable(java.lang.reflect.Type.class);
        BranchResult ifBranch = creator.ifNotNull(value);
        BytecodeCreator ifNotNull = ifBranch.trueBranch();
        ifNotNull.assign(genericType, ifNotNull.readInstanceField(
                FieldDescriptor.of(ParameterDescriptorFromClassSupplier.ParameterDescriptor.class, "genericType",

View on GitHub (pinned to e1c734241f)

Solutions

  1. Simplify the method signature — remove the exotic parameter combination (e.g. move multipart fields out of a BeanParam)
  2. Report a Quarkus bug with a reproducer (this default branch indicates a missing implementation)
  3. Upgrade Quarkus — the missing case may be implemented in a newer version

Example fix

// before
void upload(@MultipartForm MyBeanParam params);
// after: flatten
void upload(@RestForm File file, @RestForm String name);
Defensive patterns

Strategy: try-catch

Validate before calling

// Avoid exotic parameter combinations: don't put @RestForm/@FormParam multipart
// fields inside a BeanParam; keep signatures to plain annotated params.
static void warnOnBeanParamWithForm(Class<?> client) {
    for (var m : client.getDeclaredMethods()) {
        for (var p : m.getParameters()) {
            if (p.getType().isAnnotationPresent(jakarta.ws.rs.BeanParam.class)) {
                System.out.println("Review: " + m + " uses BeanParam — flatten multipart/form fields");
            }
        }
    }
}

Try / catch

try {
    MyClient client = QuarkusRestClientBuilder.newBuilder().build(MyClient.class);
} catch (IllegalStateException e) {
    if ("Unimplemented".equals(e.getMessage())) {
        throw new UnsupportedOperationException(
            "Unsupported client parameter shape; simplify the method signature", e);
    }
    throw e;
}

Prevention

When it happens

Trigger: Hitting a parameter handling enum value (a form/body parameter classification) that the processor's switch over categories does not cover — typically via an exotic combination of annotations (@FormParam inside BeanParam with multipart, unusual parameter kinds) that reaches an unimplemented default branch.

Common situations: New or rare annotation combinations on client method parameters; Quarkus bugs where a new parameter category was added without extending this switch; unusual BeanParam + multipart mixes.

Related errors


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