🤔문제
OAuth2 로그인 구현 중 아래와 같은 에러 발생
❗원인
위와 같은 에러메세지가 있었다. 해당 코드는 아래와 같이 생겼다.
즉, 'io.jsonwebtoken.impl.Base64Codec' 클래스에서 'DatatypeConverter' 클래스를 사용해야하는데 해당 클래스룰 찾지 못해 에러가 발생하였다.
💡해결방법
위 링크를 들어가보면 Java 11 이상에서 JAXB가 JDK에서 제거되었다고 한디. 그러면서 해결방법으로 간단하게 의존성을 추가하라고 되어있어 아래 코드를 추가하였고 OAuth2 로그인이 잘 되는 것도 확인하였다.
// jaxb
implementation 'javax.xml.bind:jaxb-api:2.3.1'
+ java 17, 'io.jsonwebtoken:jjwt:0.9.1' 버전을 사용하였습니다.
'TIL' 카테고리의 다른 글
[TIL][SQL] @Modifying 어노테이션 (0) | 2023.11.08 |
---|---|
[TIL][SQL] 연관 데이터 없을 때 조회하기 (Join vs Left Join) (0) | 2023.11.08 |
JPA 에서 복합키 사용하기 (0) | 2023.08.06 |
[TIL][ContentProject] h2-console 403 error (0) | 2023.07.27 |
[TIL][ContentProject] H2 DB 에서 User Table 사용하기 (0) | 2023.07.19 |