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

MJkim님의 프로필 이미지
MJkim

작성한 질문수

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

H2 db 쿼리 엔티티는 생성이 되나 저장하려는 값이 보이지 않습니

작성

·

470

0

 

콘솔

"C:\Program Files\Java\jdk-17.0.2\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.1\lib\idea_rt.jar=2615:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.1\bin" -Dfile.encoding=UTF-8 -classpath C:\Users\minju\Desktop\inflearn\ex1-hello-jpa\target\classes;C:\Users\minju\.m2\repository\org\hibernate\hibernate-entitymanager\5.3.10.Final\hibernate-entitymanager-5.3.10.Final.jar;C:\Users\minju\.m2\repository\org\jboss\logging\jboss-logging\3.3.2.Final\jboss-logging-3.3.2.Final.jar;C:\Users\minju\.m2\repository\org\hibernate\hibernate-core\5.3.10.Final\hibernate-core-5.3.10.Final.jar;C:\Users\minju\.m2\repository\org\javassist\javassist\3.23.2-GA\javassist-3.23.2-GA.jar;C:\Users\minju\.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;C:\Users\minju\.m2\repository\org\jboss\jandex\2.0.5.Final\jandex-2.0.5.Final.jar;C:\Users\minju\.m2\repository\com\fasterxml\classmate\1.3.4\classmate-1.3.4.jar;C:\Users\minju\.m2\repository\javax\activation\javax.activation-api\1.2.0\javax.activation-api-1.2.0.jar;C:\Users\minju\.m2\repository\org\dom4j\dom4j\2.1.1\dom4j-2.1.1.jar;C:\Users\minju\.m2\repository\org\hibernate\common\hibernate-commons-annotations\5.0.4.Final\hibernate-commons-annotations-5.0.4.Final.jar;C:\Users\minju\.m2\repository\javax\persistence\javax.persistence-api\2.2\javax.persistence-api-2.2.jar;C:\Users\minju\.m2\repository\net\bytebuddy\byte-buddy\1.9.5\byte-buddy-1.9.5.jar;C:\Users\minju\.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\minju\.m2\repository\com\h2database\h2\1.4.199\h2-1.4.199.jar;C:\Users\minju\.m2\repository\javax\xml\bind\jaxb-api\2.3.0\jaxb-api-2.3.0.jar hellojpa.JpaMain

1월 16, 2023 9:34:11 오전 org.hibernate.jpa.internal.util.LogHelper logPersistenceUnitInformation

INFO: HHH000204: Processing PersistenceUnitInfo [

name: hello

...]

1월 16, 2023 9:34:11 오전 org.hibernate.Version logVersion

INFO: HHH000412: Hibernate Core {5.3.10.Final}

1월 16, 2023 9:34:11 오전 org.hibernate.cfg.Environment <clinit>

INFO: HHH000206: hibernate.properties not found

1월 16, 2023 9:34:12 오전 org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit>

INFO: HCANN000001: Hibernate Commons Annotations {5.0.4.Final}

1월 16, 2023 9:34:13 오전 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure

WARN: HHH10001002: Using Hibernate built-in connection pool (not for production use!)

1월 16, 2023 9:34:13 오전 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator

INFO: HHH10001005: using driver [org.h2.Driver] at URL [jdbc:h2:tcp://localhost/~/test]

1월 16, 2023 9:34:13 오전 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator

INFO: HHH10001001: Connection properties: {user=sa}

1월 16, 2023 9:34:13 오전 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator

INFO: HHH10001003: Autocommit mode: false

1월 16, 2023 9:34:13 오전 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl$PooledConnections <init>

INFO: HHH000115: Hibernate connection pool size: 20 (min=1)

1월 16, 2023 9:34:13 오전 org.hibernate.dialect.Dialect <init>

INFO: HHH000400: Using dialect: org.hibernate.dialect.H2Dialect

Hibernate:

drop table Member if exists

Hibernate:

drop table Team if exists

Hibernate:

drop sequence if exists hibernate_sequence

Hibernate: create sequence hibernate_sequence start with 1 increment by 1

Hibernate:

create table Member (

MEMBER_ID bigint not null,

USERNAME varchar(255),

TEAM_ID bigint,

primary key (MEMBER_ID)

)

1월 16, 2023 9:34:15 오전 org.hibernate.resource.transaction.backend.jdbc.internal.DdlTransactionIsolatorNonJtaImpl getIsolatedConnection

INFO: HHH10001501: Connection obtained from JdbcConnectionAccess [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess@45bb2aa1] 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.

1월 16, 2023 9:34:15 오전 org.hibernate.resource.transaction.backend.jdbc.internal.DdlTransactionIsolatorNonJtaImpl getIsolatedConnection

INFO: HHH10001501: Connection obtained from JdbcConnectionAccess [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess@2e3f79a2] 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.

1월 16, 2023 9:34:15 오전 org.hibernate.tool.schema.internal.SchemaCreatorImpl applyImportSources

INFO: HHH000476: Executing import script 'org.hibernate.tool.schema.internal.exec.ScriptSourceInputNonExistentImpl@2cc04358'

Hibernate:

create table Team (

TEAM_ID bigint not null,

name varchar(255),

primary key (TEAM_ID)

)

Hibernate:

alter table Member

add constraint FKl7wsny760hjy6x19kqnduasbm

foreign key (TEAM_ID)

references Team

Hibernate:

call next value for hibernate_sequence

Hibernate:

call next value for hibernate_sequence

Hibernate:

/* insert hellojpa.Team

*/ insert

into

Team

(name, TEAM_ID)

values

(?, ?)

Hibernate:

/* insert hellojpa.Member

*/ insert

into

Member

(TEAM_ID, USERNAME, MEMBER_ID)

values

(?, ?, ?)

1월 16, 2023 9:34:15 오전 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl stop

INFO: HHH10001008: Cleaning up connection pool [jdbc:h2:tcp://localhost/~/test]

1월 16, 2023 9:34:15 오전 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

Process finished with exit code 0

[h2 콘솔]

답변 1

MJkim님의 프로필 이미지
MJkim

작성한 질문수

질문하기