Affects: Spring-boot: 2.4.5
The exception is provided below
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springSecurityFilterChain' defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]:
Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException:
Failed to instantiate [javax.servlet.Filter]: Factory method 'springSecurityFilterChain' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'daoAuthenticationProvider' defined in class path resource [com/****/***/security/config/WebSecurityConfig.class]:
Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException:
Failed to instantiate [org.springframework.security.authentication.dao.DaoAuthenticationProvider]:
Factory method 'daoAuthenticationProvider' threw exception; nested exception is java.lang.RuntimeException:
java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: DRBG, provider: SUN, class: sun.security.provider.DRBG)
Comment From: bclozel
Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use the issue tracker only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.
It looks like the problem here is linked to your Spring Security configuration.
Could you create a StackOverflow question showing your WebSecurityConfig
, explaining what you're trying to achieve and prooding the full stack trace?