본문 바로가기

Dot ./에러 모음

[Spring Error] springSecurityFilterChain 에러 해결 방법

springSecurityFilterChain 에러 해결 방법

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 java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException

 

에러 해결 참고 글  

 

Error creating bean with name 'springSecurityFilterChain' · Issue #118 · Baeldung/spring-security-oauth

run resource-server got the following error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springSecurityFilterChain' defined in class path resourc...

github.com

 

 

이 에러는 Java 11에러로 아래의 의존성 추가를 해주니깐 오류 해결이 되었다

<dependency>
  <groupId>com.sun.xml.bind</groupId>
  <artifactId>jaxb-core</artifactId>
  <version>2.3.0.1</version>
</dependency>

<dependency>
  <groupId>javax.xml.bind</groupId>
  <artifactId>jaxb-api</artifactId>
  <version>2.3.1</version>
</dependency>

<dependency>
  <groupId>com.sun.xml.bind</groupId>
  <artifactId>jaxb-impl</artifactId>
  <version>2.3.1</version>
</dependency>