theonedev/onedev · error · ExplicitException

Param not found: %s

Error message

Param not found: %s

What it means

PassthroughValue.getValue looks up the named parameter in the current param combination's inputs; if the parameter name is absent it throws an ExplicitException 'Param not found: <name>'. This value provider can only resolve params that exist in the job dependency's param combination being passed through.

Source

Thrown at server-core/src/main/java/io/onedev/server/buildspec/param/instance/PassthroughValue.java:56

	@SuppressWarnings("unused")
	private static List<String> getParamChoices() {
		List<ParamSpec> paramSpecs = ParamSpec.list();
		if (paramSpecs != null) 
			return paramSpecs.stream().map(it->it.getName()).collect(Collectors.toList());
		else
			return new ArrayList<>();
	}
	
	@Override
	public List<String> getValue(Build build, ParamCombination paramCombination) {
		if (paramCombination != null) {
			Input param = paramCombination.getParamInputs().get(paramName);
			if (param != null) {
				return param.getValues();
			} else {
				String message = String.format("Param not found: %s", paramName);
				throw new ExplicitException(message);
			}
		} else {
			return new ArrayList<>();
		}
	}

	@Override
	public boolean equals(Object other) {
		if (!(other instanceof PassthroughValue)) 
			return false;
		if (this == other)
			return true;
		PassthroughValue otherPassthroughValues = (PassthroughValue) other;
		return new EqualsBuilder()
			.append(paramName, otherPassthroughValues.paramName)
			.isEquals();
	}

View on GitHub (pinned to d44925c47c)

Solutions

  1. Ensure the referenced param name matches an input defined in the parent job's param combination
  2. Update the dependent job's PassthroughValue after renaming params upstream
  3. Guard with a null/contains check on paramCombination.getParamInputs() when names are dynamic

Example fix

// before
new PassthroughValue("buildVersion") // parent job has 'version'
// after
new PassthroughValue("version")
Defensive patterns

Strategy: try-catch

Validate before calling

if (paramCombination != null && !paramCombination.getParamInputs().containsKey(paramName))
    throw new IllegalStateException("param not present in parent combination: " + paramName);

Type guard

if (paramCombination != null && paramCombination.getParamInputs().get(paramName) != null) {
    // safe to read values
}

Try / catch

try { return passthroughValue.getValue(paramCombination, paramName); } catch (ExplicitException e) { /* fall back to default value or fail with clear message */ }

Prevention

When it happens

Trigger: Calling getValue when paramCombination is non-null but paramCombination.getParamInputs().get(paramName) returns null — i.e. the referenced param does not exist in the upstream job's inputs.

Common situations: A dependent job's param uses passthrough value for a param name that was renamed or removed in the parent job; typo in the param name; parent job no longer defines that input.

Understand the failure class

Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.

Related errors


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