inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발

JPA와 DB 설정, 동작확인

디비에 값이 입력이 안됩니다

해결된 질문

494

고무오리디버깅

작성한 질문수 6

0

안녕하세요 ~ 

계속 디비에 값이 입력이 안됩니다..

테이블 생성까지는 잘되는데 오류도안나오구 뭐가 문제인지 감이 안잡힙니다

그리고 확인해보니깐 저는 transactional rollback 로그가 계속 안찍힙니다..

gradle 빌드가 너무 오래걸려서  인텔리j로 빌드로 되게 옵션을 설정을 한 상태입니다

The Class-Path manifest attribute in C:\Users\User\.gradle\caches\modules-2\files-2.1\org.glassfish.jaxb\jaxb-runtime\2.3.1\dd6dda9da676a54c5b36ca2806ff95ee017d8738\jaxb-runtime-2.3.1.jar referenced one or more files that do not exist: file:/C:/Users/User/.gradle/caches/modules-2/files-2.1/org.glassfish.jaxb/jaxb-runtime/2.3.1/dd6dda9da676a54c5b36ca2806ff95ee017d8738/jaxb-api-2.3.1.jar,file:/C:/Users/User/.gradle/caches/modules-2/files-2.1/org.glassfish.jaxb/jaxb-runtime/2.3.1/dd6dda9da676a54c5b36ca2806ff95ee017d8738/txw2-2.3.1.jar,file:/C:/Users/User/.gradle/caches/modules-2/files-2.1/org.glassfish.jaxb/jaxb-runtime/2.3.1/dd6dda9da676a54c5b36ca2806ff95ee017d8738/istack-commons-runtime-3.0.7.jar,file:/C:/Users/User/.gradle/caches/modules-2/files-2.1/org.glassfish.jaxb/jaxb-runtime/2.3.1/dd6dda9da676a54c5b36ca2806ff95ee017d8738/stax-ex-1.8.jar,file:/C:/Users/User/.gradle/caches/modules-2/files-2.1/org.glassfish.jaxb/jaxb-runtime/2.3.1/dd6dda9da676a54c5b36ca2806ff95ee017d8738/FastInfoset-1.2.15.jar,file:/C:/Users/User/.gradle/caches/modules-2/files-2.1/org.glassfish.jaxb/jaxb-runtime/2.3.1/dd6dda9da676a54c5b36ca2806ff95ee017d8738/javax.activation-api-1.2.0.jar

  .   ____          _            __ _ _

 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \

( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \

 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )

  '  |____| .__|_| |_|_| |_\__, | / / / /

 =========|_|==============|___/=/_/_/_/

 :: Spring Boot ::  (v2.1.17.BUILD-SNAPSHOT)

2020-07-31 20:13:32.572  INFO 1008 --- [  restartedMain] jpashop.jpabook.JpabookApplication       : Starting JpabookApplication on DESKTOP-H66EP9G with PID 1008 (C:\Users\User\Spring\jpabook\out\production\classes started by User in C:\Users\User\Spring\jpabook)

2020-07-31 20:13:32.576  INFO 1008 --- [  restartedMain] jpashop.jpabook.JpabookApplication       : No active profile set, falling back to default profiles: default

2020-07-31 20:13:32.679  INFO 1008 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable

2020-07-31 20:13:32.680  INFO 1008 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'

2020-07-31 20:13:34.406  INFO 1008 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.

2020-07-31 20:13:34.456  INFO 1008 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 35ms. Found 0 JPA repository interfaces.

2020-07-31 20:13:35.837  INFO 1008 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)

2020-07-31 20:13:36.026  INFO 1008 --- [  restartedMain] o.apache.catalina.core.StandardService   : Starting service [Tomcat]

2020-07-31 20:13:36.027  INFO 1008 --- [  restartedMain] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.37]

2020-07-31 20:13:36.289  INFO 1008 --- [  restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext

2020-07-31 20:13:36.290  INFO 1008 --- [  restartedMain] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 3610 ms

2020-07-31 20:13:36.563  INFO 1008 --- [  restartedMain] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...

2020-07-31 20:13:36.674  INFO 1008 --- [  restartedMain] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.

2020-07-31 20:13:36.774  INFO 1008 --- [  restartedMain] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [

name: default

...]

2020-07-31 20:13:36.877  INFO 1008 --- [  restartedMain] org.hibernate.Version                    : HHH000412: Hibernate Core {5.3.17.Final}

2020-07-31 20:13:36.879  INFO 1008 --- [  restartedMain] org.hibernate.cfg.Environment            : HHH000206: hibernate.properties not found

2020-07-31 20:13:37.087  INFO 1008 --- [  restartedMain] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.0.4.Final}

2020-07-31 20:13:37.291  INFO 1008 --- [  restartedMain] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect

2020-07-31 20:13:38.041 DEBUG 1008 --- [  restartedMain] org.hibernate.SQL                        : 

    

    drop table member if exists

2020-07-31 20:13:38.045 DEBUG 1008 --- [  restartedMain] org.hibernate.SQL                        : 

    

    drop sequence if exists hibernate_sequence

2020-07-31 20:13:38.048 DEBUG 1008 --- [  restartedMain] org.hibernate.SQL                        : create sequence hibernate_sequence start with 1 increment by 1

2020-07-31 20:13:38.048 DEBUG 1008 --- [  restartedMain] org.hibernate.SQL                        : 

    

    create table member (

       id bigint not null,

        username varchar(255),

        primary key (id)

    )

2020-07-31 20:13:38.050  INFO 1008 --- [  restartedMain] o.h.t.schema.internal.SchemaCreatorImpl  : HHH000476: Executing import script 'org.hibernate.tool.schema.internal.exec.ScriptSourceInputNonExistentImpl@70dc37ec'

2020-07-31 20:13:38.053  INFO 1008 --- [  restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'

2020-07-31 20:13:38.075  INFO 1008 --- [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729

2020-07-31 20:13:38.544  INFO 1008 --- [  restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'

2020-07-31 20:13:38.624  WARN 1008 --- [  restartedMain] aWebConfiguration$JpaWebMvcConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning

2020-07-31 20:13:38.683  INFO 1008 --- [  restartedMain] o.s.b.a.w.s.WelcomePageHandlerMapping    : Adding welcome page: class path resource [static/index.html]

2020-07-31 20:13:39.089  INFO 1008 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''

2020-07-31 20:13:39.095  INFO 1008 --- [  restartedMain] jpashop.jpabook.JpabookApplication       : Started JpabookApplication in 7.38 seconds (JVM running for 8.413)

JPA spring 웹앱 java spring-boot

답변 4

1

고무오리디버깅

에고,, 감사합니당!

1

김영한

위에 로그를 확인을 해보니 테스트를 실행해야 하는데, JpabookApplication.main을 실행하셨네요^^

다음 이미지를 참고해서 MemberRepositoryTest를 실행해주세요^^

0

고무오리디버깅

 다시보내겠습니다 확장자 안지우고 보냈습니다..

0

김영한

안녕하세요. 실력늘리자님

혹시 test/java/resources에 별도의 application.yml이 있는지 확인부탁드려요. 이곳에 있으면 이 파일이 우선권을 가집니다.

전체 프로젝트를 압축해서 올려주세요.

sdk 설정 오류

0

49

2

오탈자 - @Transactional

0

55

1

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

0

50

1

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

0

63

1

MemberRepositoryTest 실행오류

0

79

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

58

1

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

0

75

2

Repository에서 EntityManager 주입 방식 차이

0

88

1

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

0

71

1

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

0

81

1

dirty checking 질문드립니다.

0

81

1

동시성 관련 질문입니다

0

73

1