inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

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

1116

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

도움이 되었길 바랍니다.

static클래스 개념 정리.

0

29

1

static 변수가 저장 되는 위치

0

28

1

장바구니 질문

0

53

1

Instant 출력 할때.

0

43

1

안녕하세요 늦은 나이 늦깎이 개발자 지망생입니다.

0

46

1

values()메서드

0

49

0

강의 소스코드는 어디서 다운받을 수 있나요?

1

65

2

JpaPagingItemReader는 좋은게 없는거야..??

0

61

1

입문 강의 듣고 바로 들어도 괜찮을까요?

0

38

1

리프레시토큰

0

57

1

DB 연결 후 회원가입 시 생성되는 id 번호 질문

0

64

2

로그인 확인

0

73

3

ttl 산정 기준

0

50

1

정처기 2026-3 실기 문의

0

122

2

정처기 실기 3회 컴싸 사용 여부

0

87

1

자바 킴쌤 클래스 기초part2.pdf파일은 어디서 받을 수 있나요?

0

51

1

오타 제보 드립니다.

0

86

2

모의고사 1 회 2번문제 중

0

95

2

26-2 이론문제 재탕

1

69

1

26-2년도 코드문제

0

46

0

26-2 코드문제

0

58

1

15분 48초 질문

0

80

2

26-1년도 이론문제 재탕

0

81

1

26-1년도 코드문제 재탕

0

60

0