quarkusio/quarkus · error · IOException
We didn't found any CloudEventsFunction to run (or there is
Error message
We didn't found any CloudEventsFunction to run (or there is multiple one and none selected inside your application.properties)
What it means
QuarkusCloudEventsFunction.accept throws this when the Quarkus app started but no CloudEventsFunction delegate bean was wired. The delegate is selected at deployment from the CDI beans implementing CloudEventsFunction; it is null when none exist or when several exist and no explicit selection was made.
Source
Thrown at extensions/google-cloud-functions/runtime/src/main/java/io/quarkus/gcp/functions/QuarkusCloudEventsFunction.java:75
throw new RuntimeException(e);
}
}
}
public static void clearState() {
delegate = null;
delegateClassLoader = null;
}
@Override
public void accept(CloudEvent cloudEvent) throws Exception {
if (!started) {
throw new IOException(deploymentStatus);
}
// TODO maybe we can check this at static init
if (delegate == null) {
throw new IOException("We didn't found any CloudEventsFunction to run " +
"(or there is multiple one and none selected inside your application.properties)");
}
ClassLoader currentCl = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(delegateClassLoader);
delegate.accept(cloudEvent);
} finally {
Thread.currentThread().setContextClassLoader(currentCl);
}
}
}
View on GitHub (pinned to e1c734241f)
Solutions
- Implement exactly one CloudEventsFunction bean in the application, or
- If multiple exist, set the selection property (quarkus.google-cloud-functions.ce-function=<FQCN>) in application.properties
- Ensure the implementing class is a discoverable CDI bean (not abstract, has a bean-defining annotation or is unremovable)
Example fix
# before (multiple impls, no selection) # nothing set # after quarkus.google-cloud-functions.ce-function=com.example.MyCloudEventsFunction
Defensive patterns
Strategy: validation
Validate before calling
// build-time check: exactly one CloudEventsFunction bean, or selection set
boolean hasDelegate = Arc.container().select(CloudEventsFunction.class)
.stream().count() >= 1;
String selected = System.getProperty("quarkus.google-cloud-functions.ce-function", "");
if (!hasDelegate || selected.isBlank()) {
throw new IllegalStateException("No CloudEventsFunction delegate configured");
} Try / catch
try {
function.accept(cloudEvent);
} catch (IOException e) {
if (e.getMessage().contains("didn't found any CloudEventsFunction")) {
throw new IllegalStateException("Set quarkus.google-cloud-functions.ce-function in application.properties");
}
throw e;
} Prevention
- Keep exactly one CloudEventsFunction implementation per function deployment
- When adding a second, immediately set the selection property
- Check the deployment logs at startup — delegate resolution happens before first invocation
- Add a test asserting a CloudEventsFunction bean is resolvable via Arc
When it happens
Trigger: Invoking the deployed function when the application contains zero CloudEventsFunction beans, or multiple implementations without setting the selection property in application.properties.
Common situations: Developer implements HttpFunction and CloudEventsFunction ambiguities across classes, removed the implementing class, or added a second CloudEventsFunction and forgot to disambiguate.
Related errors
- RuntimeException(e)
- We didn't found any HttpFunction to run (or there is multipl
- IOException(deploymentStatus)
- RuntimeException(e)
- Json object ended without }
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/5ff4026c3b83a463.
Report an issue: GitHub.