quarkusio/quarkus · error · RuntimeException
knative-events.function-mapping does not map to a function:
Error message
knative-events.function-mapping does not map to a function: ${functionName} What it means
At startup, the Funqy Knative Events binding recorder validates every entry in quarkus.funqy.knative-events.function-mapping against the registry of @Funq functions built at build time. If a mapping key does not name a registered function, FunctionRecorder.registry.matchInvoker() returns null and a RuntimeException is thrown. This fails the application start so a broken mapping is caught immediately rather than at first request.
Source
Thrown at extensions/funqy/funqy-knative-events/runtime/src/main/java/io/quarkus/funqy/runtime/bindings/knative/events/KnativeEventsBindingRecorder.java:222
// This needs to happen in start at RUNTIME so that
// mappings can be overridden by environment variables
FunctionInvoker defaultInvoker = null;
if (runtimeConfig.getValue().export().isPresent()) {
defaultInvoker = FunctionRecorder.registry.matchInvoker(runtimeConfig.getValue().export().get());
if (defaultInvoker == null) {
throw new RuntimeException(
"quarkus.funqy.export value does not map a function: " + runtimeConfig.getValue().export().get());
}
}
if (eventsRuntimeConfig.getValue().mapping() != null) {
for (Map.Entry<String, FunqyKnativeEventsConfig.FunctionMapping> entry : eventsRuntimeConfig.getValue().mapping()
.entrySet()) {
String functionName = entry.getKey();
FunctionInvoker invoker = FunctionRecorder.registry.matchInvoker(functionName);
if (invoker == null) {
throw new RuntimeException("knative-events.function-mapping does not map to a function: " + functionName);
}
FunqyKnativeEventsConfig.FunctionMapping mapping = entry.getValue();
if (mapping.trigger().isPresent()) {
typeTriggers.compute(mapping.trigger().get(), (k, v) -> {
if (v == null) {
v = new ArrayList<>();
}
v.add(invoker);
return v;
});
}
if (invoker.hasOutput()) {
if (mapping.responseSource().isPresent()) {
invoker.getBindingContext().put(RESPONSE_SOURCE, mapping.responseSource().get());
}
if (mapping.responseType().isPresent()) {
invoker.getBindingContext().put(RESPONSE_TYPE, mapping.responseType().get());
}View on GitHub (pinned to e1c734241f)
Solutions
- Open application.properties and check every key under quarkus.funqy.knative-events.function-mapping; each key must exactly match a registered Funqy function name
- Set the function's name explicitly with @Funq("name") if the method name differs from the mapping key
- Remove or correct stale mapping entries left from deleted or renamed functions
- Enable Funqy logging or inspect the build-time function registry to list valid function names
Example fix
// before (application.properties) quarkus.funqy.knative-events.function-mapping."processOrder".trigger-type=my.trigger // after (function renamed to handleOrder) quarkus.funqy.knative-events.function-mapping."handleOrder".trigger-type=my.trigger
Defensive patterns
Strategy: validation
Validate before calling
// Before startup, verify mapping keys exist in the function registry
Set<String> registered = FunctionRecorder.registry != null
? FunctionRecorder.registry.matchInvokerNames() : Set.of();
eventsRuntimeConfig.getValue().mapping().keySet().stream()
.filter(k -> !registered.contains(k))
.forEach(k -> log.warnf("Unknown knative-events function-mapping key: %s", k)); Try / catch
try {
binder.start();
} catch (RuntimeException e) {
if (e.getMessage().contains("function-mapping does not map to a function")) {
log.error("Fix quarkus.funqy.knative-events.function-mapping keys to match registered @Funq functions");
}
throw e;
} Prevention
- Keep mapping keys in one application.properties section with a comment listing valid function names
- Use @Funq("explicit-name") to decouple function names from Java method names
- Add a startup health check that asserts every mapping key matches a registered function
- Review mapping config in code review whenever @Funq methods are renamed
When it happens
Trigger: A quarkus.funqy.knative-events.function-mapping."<name>".trigger-type (or similar) config property references a function name that has no corresponding @Funq-annotated method or has been renamed/removed.
Common situations: Renaming a @Funq method (or the function's exported name) without updating the mapping property; copy-pasting mapping config from another project; typo in the function name; removing a function but leaving stale config in application.properties or an env var override (quarkus.funqy.knative-events.function-mapping env keys).
Related errors
- quarkus.funqy.export value does not map a function: ${export
- Function '${functionName}' has ${paramType} type 'Byte[]' (b
- The class (${name}) cannot be created during deployment.
- Can not add converter ${converter.name()} that is not parame
- Converter ${converter.name()} must be parameterized with a s
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/ec4b1f52913bafcb.
Report an issue: GitHub.