인프런 커뮤니티 질문&답변

고무오리디버깅님의 프로필 이미지

작성한 질문수

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

JPA와 DB 설정, 동작확인

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

해결된 질문

20.07.31 20:18 작성

·

357

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)

답변 4

1

고무오리디버깅님의 프로필 이미지

2020. 07. 31. 21:36

에고,, 감사합니당!

1

김영한님의 프로필 이미지
김영한
지식공유자

2020. 07. 31. 21:34

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

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

0

고무오리디버깅님의 프로필 이미지

2020. 07. 31. 21:22

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

0

김영한님의 프로필 이미지
김영한
지식공유자

2020. 07. 31. 21:07

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

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

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