{"record":{"id":"5ff4026c3b83a463","repo":"quarkusio/quarkus","slug":"we-didn-t-found-any-cloudeventsfunction-to-run-or","errorCode":null,"errorMessage":"We didn't found any CloudEventsFunction to run (or there is multiple one and none selected inside your application.properties)","messagePattern":"We didn't found any CloudEventsFunction to run \\(or there is multiple one and none selected inside your application\\.properties\\)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"extensions/google-cloud-functions/runtime/src/main/java/io/quarkus/gcp/functions/QuarkusCloudEventsFunction.java","lineNumber":75,"sourceCode":"                throw new RuntimeException(e);\n            }\n        }\n    }\n\n    public static void clearState() {\n        delegate = null;\n        delegateClassLoader = null;\n    }\n\n    @Override\n    public void accept(CloudEvent cloudEvent) throws Exception {\n        if (!started) {\n            throw new IOException(deploymentStatus);\n        }\n\n        // TODO maybe we can check this at static init\n        if (delegate == null) {\n            throw new IOException(\"We didn't found any CloudEventsFunction to run \" +\n                    \"(or there is multiple one and none selected inside your application.properties)\");\n        }\n\n        ClassLoader currentCl = Thread.currentThread().getContextClassLoader();\n        try {\n            Thread.currentThread().setContextClassLoader(delegateClassLoader);\n            delegate.accept(cloudEvent);\n        } finally {\n            Thread.currentThread().setContextClassLoader(currentCl);\n        }\n    }\n}\n","sourceCodeStart":57,"sourceCodeEnd":88,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/google-cloud-functions/runtime/src/main/java/io/quarkus/gcp/functions/QuarkusCloudEventsFunction.java#L57-L88","documentation":"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.","triggerScenarios":"Invoking the deployed function when the application contains zero CloudEventsFunction beans, or multiple implementations without setting the selection property in application.properties.","commonSituations":"Developer implements HttpFunction and CloudEventsFunction ambiguities across classes, removed the implementing class, or added a second CloudEventsFunction and forgot to disambiguate.","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)"],"exampleFix":"# before (multiple impls, no selection)\n# nothing set\n# after\nquarkus.google-cloud-functions.ce-function=com.example.MyCloudEventsFunction","handlingStrategy":"validation","validationCode":"// build-time check: exactly one CloudEventsFunction bean, or selection set\nboolean hasDelegate = Arc.container().select(CloudEventsFunction.class)\n        .stream().count() >= 1;\nString selected = System.getProperty(\"quarkus.google-cloud-functions.ce-function\", \"\");\nif (!hasDelegate || selected.isBlank()) {\n    throw new IllegalStateException(\"No CloudEventsFunction delegate configured\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    function.accept(cloudEvent);\n} catch (IOException e) {\n    if (e.getMessage().contains(\"didn't found any CloudEventsFunction\")) {\n        throw new IllegalStateException(\"Set quarkus.google-cloud-functions.ce-function in application.properties\");\n    }\n    throw e;\n}","preventionTips":["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"],"tags":["gcp","configuration","cloudevents","missing-bean"],"backgroundTag":"missing-function-delegate","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}