inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

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

1108

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”의 차이는 없습니다. 스펠링이 다른 것 뿐이고 같은 라이브러리를 제공합니다.

도움이 되었길 바랍니다.

movablePageCount와 pageSize 상수

0

12

1

JPA와 네이티브 쿼리

0

14

1

aws 계정 생성 질문

1

25

1

조회 메서드 네이밍 질문

0

36

1

소스파일

0

36

1

강의 판서 자료

0

35

2

모의고사 파일오류

0

60

3

Properties 설정이 추가되었는데

0

27

1

모의고사 다운

0

42

1

업캐스팅 원칙

0

56

2

음성불량

0

42

1

11강 [실습] Docker로 MySQL1 분만에 실행하기

0

65

2

11강 [실습] Docker로 MySQL1 분만에 실행하기

0

52

2

6분46초

0

52

2

공략법

0

54

1

isInterrupted 질문 있다.

0

29

1

선생님 샤딩에 대한 강의도 좀 해주세요

0

43

1

몽고DB CAP 이론 관련

0

51

2

모의고사 파일과 이론파일 업데이트

1

67

3

장애 격리 관련해서 궁금한 부분이 있어요

0

42

1

이론 pdf 다운은 어디서 하나요?

0

61

2

RunIdIncrementer batch 5랑 6랑

1

56

2

질문있습니다.

0

43

1

15분 35초즈음 나오는 500개 단위로 쪼개는 경우 스레드 질문

0

35

1