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

ycc93028님의 프로필 이미지
ycc93028

작성한 질문수

자바 ORM 표준 JPA 프로그래밍 - 기본편

Hello JPA - 애플리케이션 개발

hibernate:drop table member if exists 오류

작성

·

437

0

  • - 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요!
  • - 먼저 유사한 질문이 있었는지 검색해보세요.
  • - 서로 예의를 지키며 존중하는 문화를 만들어가요.
  • - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.
  • 이렇게 오류가 발생합니다!
  • "C:\Program Files\Java\jdk-11.0.14\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.3.3\lib\idea_rt.jar=59490:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.3.3\bin" -Dfile.encoding=UTF-8 -classpath "C:\Users\하늬하루\OneDrive - SangMyung University\바탕 화면\이 찬\스프링\JPA\ex1hellojpa\target\classes;C:\Users\하늬하루\.m2\repository\org\hibernate\hibernate-entitymanager\5.3.10.Final\hibernate-entitymanager-5.3.10.Final.jar;C:\Users\하늬하루\.m2\repository\org\jboss\logging\jboss-logging\3.3.2.Final\jboss-logging-3.3.2.Final.jar;C:\Users\하늬하루\.m2\repository\org\hibernate\hibernate-core\5.3.10.Final\hibernate-core-5.3.10.Final.jar;C:\Users\하늬하루\.m2\repository\org\javassist\javassist\3.23.2-GA\javassist-3.23.2-GA.jar;C:\Users\하늬하루\.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;C:\Users\하늬하루\.m2\repository\org\jboss\jandex\2.0.5.Final\jandex-2.0.5.Final.jar;C:\Users\하늬하루\.m2\repository\com\fasterxml\classmate\1.3.4\classmate-1.3.4.jar;C:\Users\하늬하루\.m2\repository\javax\activation\javax.activation-api\1.2.0\javax.activation-api-1.2.0.jar;C:\Users\하늬하루\.m2\repository\org\dom4j\dom4j\2.1.1\dom4j-2.1.1.jar;C:\Users\하늬하루\.m2\repository\org\hibernate\common\hibernate-commons-annotations\5.0.4.Final\hibernate-commons-annotations-5.0.4.Final.jar;C:\Users\하늬하루\.m2\repository\javax\persistence\javax.persistence-api\2.2\javax.persistence-api-2.2.jar;C:\Users\하늬하루\.m2\repository\net\bytebuddy\byte-buddy\1.9.5\byte-buddy-1.9.5.jar;C:\Users\하늬하루\.m2\repository\org\jboss\spec\javax\transaction\jboss-transaction-api_1.2_spec\1.1.1.Final\jboss-transaction-api_1.2_spec-1.1.1.Final.jar;C:\Users\하늬하루\.m2\repository\com\h2database\h2\2.1.212\h2-2.1.212.jar;C:\Users\하늬하루\.m2\repository\javax\xml\bind\jaxb-api\2.3.0\jaxb-api-2.3.0.jar" hellojpa.JpaMain
    7월 14, 2022 12:51:28 오후 org.hibernate.jpa.internal.util.LogHelper logPersistenceUnitInformation
    INFO: HHH000204: Processing PersistenceUnitInfo [
        name: hello
        ...]
    7월 14, 2022 12:51:28 오후 org.hibernate.Version logVersion
    INFO: HHH000412: Hibernate Core {5.3.10.Final}
    7월 14, 2022 12:51:28 오후 org.hibernate.cfg.Environment <clinit>
    INFO: HHH000206: hibernate.properties not found
    7월 14, 2022 12:51:28 오후 org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit>
    INFO: HCANN000001: Hibernate Commons Annotations {5.0.4.Final}
    7월 14, 2022 12:51:29 오후 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
    WARN: HHH10001002: Using Hibernate built-in connection pool (not for production use!)
    7월 14, 2022 12:51:29 오후 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
    INFO: HHH10001005: using driver [org.h2.Driver] at URL [jdbc:h2:tcp://localhost/~/test]
    7월 14, 2022 12:51:29 오후 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
    INFO: HHH10001001: Connection properties: {user=sa}
    7월 14, 2022 12:51:29 오후 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
    INFO: HHH10001003: Autocommit mode: false
    7월 14, 2022 12:51:29 오후 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl$PooledConnections <init>
    INFO: HHH000115: Hibernate connection pool size: 20 (min=1)
    7월 14, 2022 12:51:29 오후 org.hibernate.dialect.Dialect <init>
    INFO: HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
    Hibernate: 
        
        drop table Member if exists
    Hibernate: 
        
        create table Member (
           id bigint not null,
            name varchar(255),
            primary key (id)
        )
    7월 14, 2022 12:51:29 오후 org.hibernate.resource.transaction.backend.jdbc.internal.DdlTransactionIsolatorNonJtaImpl getIsolatedConnection
    INFO: HHH10001501: Connection obtained from JdbcConnectionAccess [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess@523d6bdb] for (non-JTA) DDL execution was not in auto-commit mode; the Connection 'local transaction' will be committed and the Connection will be set into auto-commit mode.
    7월 14, 2022 12:51:29 오후 org.hibernate.resource.transaction.backend.jdbc.internal.DdlTransactionIsolatorNonJtaImpl getIsolatedConnection
    INFO: HHH10001501: Connection obtained from JdbcConnectionAccess [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess@74294c1a] for (non-JTA) DDL execution was not in auto-commit mode; the Connection 'local transaction' will be committed and the Connection will be set into auto-commit mode.
    7월 14, 2022 12:51:29 오후 org.hibernate.tool.schema.internal.SchemaCreatorImpl applyImportSources
    INFO: HHH000476: Executing import script 'org.hibernate.tool.schema.internal.exec.ScriptSourceInputNonExistentImpl@7479b626'
    7월 14, 2022 12:51:30 오후 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl stop
    INFO: HHH10001008: Cleaning up connection pool [jdbc:h2:tcp://localhost/~/test]
    7월 14, 2022 12:51:30 오후 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl$PooledConnections close
    ERROR: Connection leak detected: there are 1 unclosed connections upon shutting down pool jdbc:h2:tcp://localhost/~/test

답변 1

0

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

안녕하세요. ycc93028님

H2 데이터베이스를 먼저 실행해주세요.

만약 실행되어 있고 강의를 진행하는데, 문제가 없다면 진행하셔도 될 것 같아요.

혹시 진행 자체에 문제가 있다면 남겨주세요.

감사합니다.

ycc93028님의 프로필 이미지
ycc93028

작성한 질문수

질문하기