{"record":{"id":"c8184e8bbc4d4efa","repo":"spring-projects/spring-security","slug":"couldn-t-find-filterchainproxy-in-filters-c8184e","errorCode":null,"errorMessage":"Couldn't find FilterChainProxy in \" + filters","messagePattern":"Couldn't find FilterChainProxy in \" \\+ filters","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"config/src/main/java/org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.java","lineNumber":397,"sourceCode":"\t\t\treturn delegate;\n\t\t}\n\n\t\t/**\n\t\t * Find the FilterChainProxy in a List of Filter.\n\t\t * @param filters\n\t\t * @return non-null FilterChainProxy\n\t\t * @throws IllegalStateException if the FilterChainProxy cannot be found\n\t\t */\n\t\tprivate static FilterChainProxy findFilterChainProxy(List<? extends Filter> filters) {\n\t\t\tfor (Filter filter : filters) {\n\t\t\t\tif (filter instanceof FilterChainProxy fcp) {\n\t\t\t\t\treturn fcp;\n\t\t\t\t}\n\t\t\t\tif (filter instanceof DebugFilter debugFilter) {\n\t\t\t\t\treturn debugFilter.getFilterChainProxy();\n\t\t\t\t}\n\t\t\t}\n\t\t\tthrow new IllegalStateException(\"Couldn't find FilterChainProxy in \" + filters);\n\t\t}\n\n\t}\n\n}\n","sourceCodeStart":379,"sourceCodeEnd":403,"githubUrl":"https://github.com/spring-projects/spring-security/blob/96852e8860138a482cb13d1479573f24ff6443c6/config/src/main/java/org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.java#L379-L403","documentation":"findFilterChainProxy() walks the configured Filter list to locate the FilterChainProxy Spring Security registered (looking inside DebugFilter too). This IllegalStateException fires when no FilterChainProxy exists in that list, meaning the Spring Security filter chain bean (springSecurityFilterChain) was never added or was replaced by custom filter configuration. It is a fail-fast integrity check during security filter-chain construction; without a FilterChainProxy the firewall/delegate behavior cannot be established.","triggerScenarios":"Thrown at config/src/main/java/org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.java:397 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure Spring Security's @EnableWebSecurity configuration is present so the FilterChainProxy (springSecurityFilterChain) bean exists and is in the filter list","Verify custom Filter registrations did not remove or replace the security filter chain","If a DebugFilter is used, confirm it wraps the actual FilterChainProxy"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"96852e8860138a482cb13d1479573f24ff6443c6","analyzedAt":"2026-09-10T23:25:23.477Z","contentChangedAt":"2026-09-10T23:25:23.477Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}