{"record":{"id":"b73f9b66e2646d53","repo":"quarkusio/quarkus","slug":"no-blocking-executor-specified","errorCode":null,"errorMessage":"no blocking executor specified","messagePattern":"no blocking executor specified","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/security/runtime/src/main/java/io/quarkus/security/runtime/QuarkusIdentityProviderManagerImpl.java","lineNumber":254,"sourceCode":"        /**\n         * @return a new {@link QuarkusIdentityProviderManagerImpl}\n         */\n        public QuarkusIdentityProviderManagerImpl build() {\n            built = true;\n            if (!providers.containsKey(AnonymousAuthenticationRequest.class)) {\n                throw new IllegalStateException(\n                        \"No AnonymousIdentityProvider registered. An instance of AnonymousIdentityProvider must be provided to allow the Anonymous identity to be created.\");\n            }\n            for (List<IdentityProvider<?>> providers : providers.values()) {\n                providers.sort(new Comparator<IdentityProvider<? extends AuthenticationRequest>>() {\n                    @Override\n                    public int compare(IdentityProvider o1, IdentityProvider o2) {\n                        return Integer.compare(o2.priority(), o1.priority());\n                    }\n                });\n            }\n            if (blockingExecutor == null) {\n                throw new IllegalStateException(\"no blocking executor specified\");\n            }\n            augmentors.sort(new Comparator<SecurityIdentityAugmentor>() {\n                @Override\n                public int compare(SecurityIdentityAugmentor o1, SecurityIdentityAugmentor o2) {\n                    return Integer.compare(o2.priority(), o1.priority());\n                }\n            });\n            if (quarkusPermissionAugmentor != null) {\n                // @PermissionChecker methods must always run with the final SecurityIdentity\n                augmentors.add(quarkusPermissionAugmentor);\n            }\n            return new QuarkusIdentityProviderManagerImpl(this);\n        }\n    }\n\n}\n","sourceCodeStart":236,"sourceCodeEnd":271,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/security/runtime/src/main/java/io/quarkus/security/runtime/QuarkusIdentityProviderManagerImpl.java#L236-L271","documentation":"The manager executes blocking identity providers on the supplied Executor (blockingExecutor). If build() runs before an executor was set, blocking authentication would deadlock or run on the caller thread, so the builder throws IllegalStateException.","triggerScenarios":"Calling build() without invoking builder.blockingExecutor(executor) — common in manually constructed managers in tests or custom extensions.","commonSituations":"Tests creating the builder directly; custom runtime wiring where the default executor supplier build step was bypassed.","solutions":["Call builder.blockingExecutor(executor) with a suitable executor (e.g. Quarkus's managed executor or Executors.newFixedThreadPool) before build().","Prefer obtaining the manager via CDI injection rather than building it manually.","In extensions, use the standard SecurityIdentityProxy/recorder wiring that supplies the executor automatically."],"exampleFix":"// before\nvar m = b.addProvider(p).build(); // no executor\n// after\nvar m = b.addProvider(p)\n    .blockingExecutor(Executors.newFixedThreadPool(4))\n    .build();","handlingStrategy":"validation","validationCode":"Objects.requireNonNull(executor, \"blocking executor required before build()\");\nbuilder.blockingExecutor(executor);\nvar m = builder.build();","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set blockingExecutor before build()","Inject the manager via CDI instead of manual builds","Centralize builder configuration in one utility"],"tags":["quarkus","security","configuration","executor"],"backgroundTag":"missing-required-config","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}