inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

Could not find javax.xml.bind:jsxb-api:.

1072

seoyun jang

작성한 질문수 2

0

java11, springboot2.7.1로 프로젝트 진행했던 프로젝트를 열어 실행하니 에러가 발생합니다.

해결하지 못하여 질문드립니다!

11:46:16 AM: Executing ':RandomApplication.main()'...

> Task :compileJava FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.4.1/userguide/command_line_interface.html#sec:command_line_warnings
1 actionable task: 1 executed

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not find javax.xml.bind:jsxb-api:.
     Required by:
         project :

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 652ms
11:46:16 AM: Execution finished ':RandomApplication.main()'.
Execution failed for task ':compileJava'.
  > Could not resolve all files for configuration ':compileClasspath'.
    > Could not find javax.xml.bind:jsxb-api:.

Required by:
  project :
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

java springboot jpa gradle jsxb jaxb

답변 1

0

인프런 AI 인턴

안녕하세요, 인프런 AI 인턴이에요.

결과적으로는 해당 라이브러리가 누락된 것으로 보입니다.
이에 대한 해결책으로는 Maven이나 Gradle의 의존성 설정에서 javax.xml.bind:jaxb-api 대신 javax.xml.bind:jaxb-runtime을 사용하는 것입니다. jsxb-api 와 jaxb-runtime 모두 JAXB (Java Architecture for XML Binding) API 구현을 제공하지만 최신 버전에서는 jaxb-runtime 을 사용하는 것이 권장됩니다.

또한, Java11에서는 javax.xml.bind API가 모듈화되어 별도로 사용자가 모듈을 추가해야합니다. 모듈 추가는 다음과 같은 방법으로 수행할 수 있습니다.
module-info.java 파일을 만들고 해당 모듈의 종속성 설정을 추가한 다음 Gradle 또는 Maven의 의존성 설정에서 해당 모듈 이름을 추가합니다.

참고로 JAXB 2.x는 자바 9부터 포함되지 않으므로 Java 9 이상 사용자는 별도로 종속성을 추가해야합니다.

혹시나 Gradle이나 Maven 의존성 등록을 확인했는데도 해결되지 않는다면, Gradle 캐시를 삭제하고 다시 실행해보세요. Gradle 캐시는 프로젝트 디렉토리에서 ./gradle/caches 경로에 있습니다.

마지막으로, “jaxb-api”와 “jsxb-api”의 차이는 없습니다. 스펠링이 다른 것 뿐이고 같은 라이브러리를 제공합니다.

도움이 되었길 바랍니다.

인텔리제이 설정 최신화 관련 확인 부탁 드립니다!

0

8

1

띄어쓰기

0

15

1

공부 순서

0

16

1

코딩 문제 사이트 접속 오류

0

15

1

재귀함수 연산법

0

27

2

동일성 동등성

0

20

1

안녕하세요 치킨 디도스 이벤트 보고 흉내내보려 들어왔습니다..

0

25

2

47번 리턴 관련 질문

0

26

1

실무 내용 문의드려요

0

27

2

IO활용-회원관리예제1 샘플코드 문의

0

20

1

join에대해 질문드립니다.

0

22

1

pg사가 있다고 가정하면

0

26

1

코드 질문

0

27

1

중급 1편 학습 방향에 대해 조언 부탁드립니다

0

37

1

To-Do App

0

27

1

twitterdb 연결이 안돼요

1

30

2

강의노트 접속 불가

0

29

2

Kafka Cluster 구성도 질문

0

23

1

26년 1회차 기출 강의

0

60

2

기출문제

0

59

1

정보처리기사 실기 zip

0

45

2

답을언제쯤받아볼수있나요

0

54

2

데이터베이스 노션

0

39

2

형 책 어떻게 받아?

1

60

1