theonedev/onedev · error · MappableException

Exception obtaining parameters

Error message

Exception obtaining parameters

What it means

ParameterValueHelper.getParameterValues wraps any unexpected RuntimeException that is not a WebApplicationException into org.glassfish.jersey.server.internal.process.MappableException with message "Exception obtaining parameters". It is a catch-all indicating the resource method's parameters could not be resolved, and the root cause carries the real problem.

Source

Thrown at server-core/src/main/java/org/glassfish/jersey/server/spi/internal/ParameterValueHelper.java:85

            }

            if (entityProviderIndex != -1) {
                params[entityProviderIndex] = valueProviders.get(entityProviderIndex).apply(request);
            }

            return params;
        } catch (WebApplicationException e) {
            throw e;
        } catch (MessageBodyProviderNotFoundException e) {
            throw new NotSupportedException(e);
        } catch (ProcessingException e) {
            throw e;
        } catch (RuntimeException e) {
            if (e.getCause() instanceof WebApplicationException) {
                throw (WebApplicationException) e.getCause();
            }

            throw new MappableException("Exception obtaining parameters", e);
        } finally {
			EntityDeserializer.popParams();
		}
    }

    /**
     * Create list of parameter value providers for the given {@link Parameterized
     * parameterized} resource model component.
     *
     * @param valueSuppliers all registered value suppliers.
     * @param parameterized  parameterized resource model component.
     * @return list of parameter value providers for the parameterized component.
     */
    public static List<ParamValueFactoryWithSource<?>> createValueProviders(Collection<ValueParamProvider> valueSuppliers,
            Parameterized parameterized) {
        if ((null == parameterized.getParameters()) || (0 == parameterized.getParameters().size())) {
            return Collections.emptyList();
        }

View on GitHub (pinned to d44925c47c)

Solutions

  1. Inspect the MappableException's cause chain to find the real exception
  2. Fix the offending ParamConverter/provider that threw during parameter resolution
  3. Add logging/request filter to capture the full stack trace early

Example fix

// before
catch (MappableException e) { log.error(e.getMessage()); }
// after
catch (MappableException e) { log.error("Param resolution failed", e.getCause() != null ? e.getCause() : e); }
Defensive patterns

Strategy: try-catch

Try / catch

try { params = getParameterValues(...); } catch (MappableException e) { Throwable root = e; while (root.getCause() != null) root = root.getCause(); log.error("Parameter resolution failed: {}", root.getMessage(), root); }

Prevention

When it happens

Trigger: Any unexpected exception thrown while injecting resource method parameters — e.g. a custom ParamConverter, ValueParamProvider, or bean validation hook throwing RuntimeException during parameter resolution; also failures while reading entity bodies that propagate as runtime errors.

Common situations: Buggy custom param converters/providers; container misconfiguration; constructor injection failures inside providers; chained root causes that need unwrapping to diagnose.

Understand the failure class

Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.

Related errors


AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06). Data as JSON: /api/errors/46c8274a49b7637f. Report an issue: GitHub.