오류 내용
io.jsonwebtoken.lang.UnknownClassException: Unable to load class named [io.jsonwebtoken.impl.DefaultJwtBuilder] from the thread context, current, or system/application ClassLoaders. All heuristics have been exhausted. Class could not be found. Have you remembered to include the jjwt-impl.jar in your runtime classpath?
문제코드
implementation 'io.jsonwebtoken:jjwt-api:0.12.3'
참고 사이트
GitHub - jwtk/jjwt: Java JWT: JSON Web Token for Java and Android
Java JWT: JSON Web Token for Java and Android. Contribute to jwtk/jjwt development by creating an account on GitHub.
github.com
dependencies {
implementation 'io.jsonwebtoken:jjwt-api:0.12.3'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.3'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.3' // or 'io.jsonwebtoken:jjwt-gson:0.12.3' for gson
/*
Uncomment this next dependency if you are using:
- JDK 10 or earlier, and you want to use RSASSA-PSS (PS256, PS384, PS512) signature algorithms.
- JDK 10 or earlier, and you want to use EdECDH (X25519 or X448) Elliptic Curve Diffie-Hellman encryption.
- JDK 14 or earlier, and you want to use EdDSA (Ed25519 or Ed448) Elliptic Curve signature algorithms.
It is unnecessary for these algorithms on JDK 15 or later.
*/
// runtimeOnly 'org.bouncycastle:bcprov-jdk18on:1.76' // or bcprov-jdk15to18 on JDK 7
}
누락된 의존성 추가 후 해결
implementation 'io.jsonwebtoken:jjwt-api:0.12.3'
// 추가한 코드
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.3'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.3'
'공부 > 에러노트' 카테고리의 다른 글
[PowerShell] powershell script SecurityError UnauthorizedAccess (0) | 2024.01.17 |
---|---|
[Node.js] nvm설치후 버전변경 (0) | 2024.01.17 |
[Spring] WebSecurityConfigurerAdapter Deprecated (0) | 2024.01.16 |
JPA Entity Column을 카멜케이스로 변경하기 (0) | 2023.04.20 |
[IntelliJ] attempt to recreate a file for type qclass 에러 (0) | 2023.01.13 |