quarkusio/quarkus · error · IllegalStateException

Unable to determine the name of parameter #" + methodParam.p

Error message

Unable to determine the name of parameter #" + methodParam.position() + " of " + methodParam.method().declaringClass().name() + "." + methodParam.method().name() + "() - compile the class with debug info enabled (-g) or parameter names recorded (-parameters), or specify the appropriate annotation value

What it means

Error "Unable to determine the name of parameter #" + methodParam.position() + " of " + methodParam.method().declaringClass().name() + "." + methodParam.method().name() + "() - compile the class with debug info enabled (-g) or parameter names recorded (-parameters), or specify the appropriate annotation value" thrown in quarkusio/quarkus.

Source

Thrown at extensions/reactive-routes/deployment/src/main/java/io/quarkus/vertx/web/deployment/ReactiveRoutesProcessor.java:1460

        private final MethodDesc valueAccessor;

        public ParamAndHeaderProvider(DotName annotationName, MethodDesc multiMapAccessor,
                MethodDesc valueAccessor) {
            this.annotationName = annotationName;
            this.multiMapAccessor = multiMapAccessor;
            this.valueAccessor = valueAccessor;
        }

        @Override
        public Expr get(MethodParameterInfo methodParam, Set<AnnotationInstance> annotations, Var routingContext,
                BlockCreator b0, BuildProducer<ReflectiveHierarchyBuildItem> reflectiveHierarchy) {
            AnnotationValue paramAnnotationValue = Annotations.find(annotations, annotationName).value();
            String paramName = paramAnnotationValue != null ? paramAnnotationValue.asString() : null;
            if (paramName == null || paramName.equals(Param.ELEMENT_NAME)) {
                paramName = methodParam.name();
            }
            if (paramName == null) {
                throw new IllegalStateException("Unable to determine the name of parameter #" + methodParam.position()
                        + " of " + methodParam.method().declaringClass().name() + "." + methodParam.method().name()
                        + "() - compile the class with debug info enabled (-g) or parameter names recorded (-parameters), or specify the appropriate annotation value");
            }

            Type paramType = methodParam.type();
            LocalVar result = b0.localVar("result", Const.ofDefault(Object.class));
            if (paramType.name().equals(DotNames.LIST)) {
                Type wrappedType = paramType.asParameterizedType().arguments().get(0);
                // List<String> params = routingContext.request().params().getAll(paramName)
                b0.set(result, b0.invokeInterface(Methods.MULTIMAP_GET_ALL,
                        b0.invokeInterface(multiMapAccessor, b0.invokeInterface(Methods.REQUEST, routingContext)),
                        Const.of(paramName)));
                if (!wrappedType.name().equals(DotName.STRING_NAME)) {
                    // Iterate over the list and convert wrapped values
                    LocalVar results = b0.localVar("results",
                            b0.new_(ConstructorDesc.of(ArrayList.class, int.class), b0.withCollection(result).size()));
                    b0.forEach(result, (b1, elem) -> {
                        convertPrimitiveAndSet(elem, wrappedType, b1, methodParam);

View on GitHub (pinned to e1c734241f)

Solutions

  1. Recompile the class containing the route method with parameter names recorded: javac -parameters (or add <parameters>true</parameters> to maven-compiler-plugin configuration)
  2. Recompile with full debug info: javac -g so local variable tables include parameter names
  3. Set the name explicitly in the binding annotation, e.g. @Param("name"), @Header("name") or @CookieParam("name") on the parameter
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at extensions/reactive-routes/deployment/src/main/java/io/quarkus/vertx/web/deployment/ReactiveRoutesProcessor.java:1460 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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