inflearn logo
강의

Course

Instructor

Real-world! Spring Boot and JPA Utilization 1 - Web Application Development

JPA and DB Configuration, Operation Verification

build 배포 따라하는 도중에 오류가 나네요

1333

shfur2918

34 asked

0

아래는 shell에 ./gradlew clean build를 하니 나온 오류입니다. 인텔리제이에서 테스트는 잘 되는데 왜 build가 안되는지 잘모르겠어요..


jpashop ./gradlew clean build

Welcome to Gradle 7.6.1!

Here are the highlights of this release:

- Added support for Java 19.

- Introduced --rerun flag for individual task rerun.

- Improved dependency block for test suites to be strongly typed.

- Added a pluggable system for Java toolchains provisioning.

For more details see https://docs.gradle.org/7.6.1/release-notes.html

> Task :test FAILED

JpashopApplicationTests > initializationError FAILED

org.junit.runners.model.InvalidTestClassError at ParentRunner.java:525

2023-05-06T01:42:49.688+09:00 INFO 9580 --- [ionShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'

2023-05-06T01:42:49.689+09:00 INFO 9580 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...

2023-05-06T01:42:49.694+09:00 INFO 9580 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.

2 tests completed, 1 failed

FAILURE: Build failed with an exception.

* What went wrong:

Execution failed for task ':test'.

> There were failing tests. See the report at: file:///Users/shfur2918/Desktop/spring_study/스프링_실전1편/jpashop/build/reports/tests/test/index.html

* 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 3s

8 actionable tasks: 8 executed

java spring 웹앱 spring-boot jpa

Answer 2

1

shfur2918

jar 빌드해서 동작하면 근데 뭐가 좋은건가요?

0

codetrain999

안녕하세요 김지수 답변이 늦어 죄송합니다.

프로젝트를 다운받아 확인하여 보니 JUnit 테스트 실행 중 실패가 뜨는 것 같습니다.

/test/java/jpabook/jpashop/JpashopApplicationTests 코드 전체와

/test/java/jpabook/jpashop/MemberRepositoryTest 코드 전체를 주석 처리한 후 다시 빌드해보시고, 계속 문제가 발생한다면 build.gradle 의 다음을 최신 버전으로 변경하여 주세요. (jUnit은 5버전을 사용하시기 바랍니다)

implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.5.6'

testImplementation 'junit:junit:4.13.1'//이걸 넣어야지, 탬플릿에서 html 빌드 컴파일 후 바로 바뀜

0

codetrain999

안녕하세요. 김지수 님, 공식 서포터즈 codesweaver 입니다.

-jar 실행방법은, 로컬에서 개발한 애플리케이션을 실제 서버에 배포(업로드)한 후, 서버에서 실행해야 하기 때문에 필요합니다 :) 그리고 정확한 오류를 알 기 위해 소스 코드를 공유해주세요.


전체 프로젝트를 압축해서 구글 드라이브로 공유해서 링크를 남겨주세요.
구글 드라이브 업로드 방법은 다음을 참고해주세요.
구글 드라이브 업로드 방법 링크

주의: 업로드시 권한 문제 꼭 확인해주세요
감사합니다.

0

shfur2918

https://drive.google.com/file/d/1ljDqOzUS_H_F_1Sd-DdQr5WFzSpIytVs/view?usp=sharing

1

shfur2918

image

다시 해봐도 이렇게 오류가 나서 구글 드라이브에 업로드하였습니다.

링크 확인 부탁드립니다

2

shfur2918

답변주시면 감사하겠습니다

sdk 설정 오류

0

49

2

오탈자 - @Transactional

0

55

1

src/test/resources 테스트 경로 문제

0

50

1

상품 등록후 H2 db 출력 순서 바꿀 수 있나요?

0

63

1

MemberRepositoryTest 실행오류

0

81

1

boot 4.x >>> trasasction rolled back log & p6spy(영한님, 수업 자료 업데이트 해주시면 감사하겠습니다!!)

1

183

2

강의 마지막 QueryDSL 사용 부분 질문있습니다

1

137

2

클라이언트에서 isbn과 author 수정 요청을 한 경우에 대해 질문드립니다.

0

51

1

도메인 모델 패턴 vs 트랜잭션 스크립트 패턴

0

71

1

기본 생성자

0

60

1

h2 DB 연결시 jdbc url 변경 이유가 궁금합니다.

0

100

1

멤버서비스테스트 부분에서 막힙니다.

0

164

4

실무에서도 EntityManager를 이용해서 많이 작업하는 편일까요?

0

116

1

초반에 h2 다운로드 과정 꼭 필요한가요?

0

118

2

자신 필드에도 get으로 접근하는 이유가 있을까요?

0

112

1

24분 27초 연관관계 편의 메서드 위치

0

113

1

단건 주문만 가능하게 한건 의도한 부분이신가요?

0

108

2

빌드 툴, Gradle

0

59

1

h2연결은 된 것 같은데 엔티티 테이블까지 작성 후 확인해보아도 테이블이 안보입니다

0

76

2

Repository에서 EntityManager 주입 방식 차이

0

88

1

롬복과 사용자 정의 setter 메서드

0

71

1

주문 목록 조회 fetch join 질문드립니다

0

81

1

dirty checking 질문드립니다.

0

81

1

동시성 관련 질문입니다

0

74

1