Hi all,
I am new to Hibernate (3.1.2). I can't seem to persist object to MySQL 5.0.18 NT db . However, Hibernate is able to load objects from the db, but does not seem to inserting anything. Any help would be appreciated.
Thanks
sundarvc
Here are the details:
Hibernate version: 3.1.2
Mapping documents:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="home.ch02">
<class name="Test" table="my_test_table">
<id name="id" column="id" type="long" >
<generator class="increment"/>
</id>
<property name="name" column="name" type="string" length="20" />
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
Session session = factory.openSession();
Test test = (Test) session.load(Test.class,new Long(1));
System.out.println(test.getName());
Test test2 = new Test();
test2.setName("Chakravarthy");
session.saveOrUpdate(test2);
session.flush();
session.close();
Full stack trace of any exception that occurs:
Name and version of the database you are using:
MySql 5.0.18 NT
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
[main] INFO org.hibernate.cfg.Environment - Hibernate 3.1.2
15 [main] INFO org.hibernate.cfg.Environment - hibernate.properties not found
15 [main] INFO org.hibernate.cfg.Environment - using CGLIB reflection optimizer
15 [main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
125 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource: home/ch02/Test.hbm.xml
453 [main] DEBUG org.hibernate.util.DTDEntityResolver - trying to locate
http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath under org/hibernate/
453 [main] DEBUG org.hibernate.util.DTDEntityResolver - found
http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath
640 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: home.ch02.Test -> my_test_table
656 [main] DEBUG org.hibernate.cfg.HbmBinder - Mapped property: id -> id
671 [main] DEBUG org.hibernate.cfg.HbmBinder - Mapped property: name -> name
671 [main] INFO org.hibernate.cfg.Configuration - configuring from resource: /hibernate.cfg.xml
671 [main] INFO org.hibernate.cfg.Configuration - Configuration resource: /hibernate.cfg.xml
671 [main] DEBUG org.hibernate.util.DTDEntityResolver - trying to locate
http://hibernate.sourceforge.net/hibern ... on-3.0.dtd in classpath under org/hibernate/
671 [main] DEBUG org.hibernate.util.DTDEntityResolver - found
http://hibernate.sourceforge.net/hibern ... on-3.0.dtd in classpath
687 [main] DEBUG org.hibernate.cfg.Configuration - hibernate.connection.driver_class=org.gjt.mm.mysql.Driver
687 [main] DEBUG org.hibernate.cfg.Configuration - hibernate.connection.password=password
687 [main] DEBUG org.hibernate.cfg.Configuration - hibernate.connection.url=jdbc:mysql:///events_calendar
687 [main] DEBUG org.hibernate.cfg.Configuration - hibernate.connection.username=root
687 [main] DEBUG org.hibernate.cfg.Configuration - hibernate.dialect=org.hibernate.dialect.MySQLDialect
687 [main] INFO org.hibernate.cfg.Configuration - Configured SessionFactory: null
703 [main] DEBUG org.hibernate.cfg.Configuration - properties: {hibernate.connection.password=password, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, sun.boot.library.path=C:\Program Files\Java\j2re1.4.2_04\bin, java.vm.version=1.4.2_04-b05, hibernate.connection.username=root, java.vm.vendor=Sun Microsystems Inc., java.vendor.url=http://java.sun.com/, path.separator=;, java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io, user.country=US, sun.os.patch.level=Service Pack 2, java.vm.specification.name=Java Virtual Machine Specification, user.dir=C:\works\eclipse\workspace\build3.xml, java.runtime.version=1.4.2_04-b05, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.endorsed.dirs=C:\Program Files\Java\j2re1.4.2_04\lib\endorsed, os.arch=x86, java.io.tmpdir=C:\DOCUME~1\sundarvc\LOCALS~1\Temp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, os.name=Windows XP, sun.java2d.fontpath=, java.library.path=C:\Program Files\Java\j2re1.4.2_04\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\j2sdk1.4.2\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Sonic Shared;c:\works\scripts;C:\apache-ant-1.6.5\bin;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\xmlbeans-2.0.0\bin, java.specification.name=Java Platform API Specification, java.class.version=48.0, java.util.prefs.PreferencesFactory=java.util.prefs.WindowsPreferencesFactory, os.version=5.1, user.home=C:\Documents and Settings\sundarvc, user.timezone=, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=Cp1252, java.specification.version=1.4, hibernate.connection.driver_class=org.gjt.mm.mysql.Driver, user.name=sundarvc, java.class.path=C:\works\calendar\build\classes;C:\works\eclipse\workspace\build3.xml\bin;C:\hibernate-3.1\lib\ant-1.6.5.jar;C:\hibernate-3.1\lib\ant-antlr-1.6.5.jar;C:\hibernate-3.1\lib\ant-junit-1.6.5.jar;C:\hibernate-3.1\lib\ant-launcher-1.6.5.jar;C:\hibernate-3.1\lib\ant-swing-1.6.5.jar;C:\hibernate-3.1\lib\antlr-2.7.6rc1.jar;C:\hibernate-3.1\lib\asm-attrs.jar;C:\hibernate-3.1\lib\asm.jar;C:\hibernate-3.1\lib\c3p0-0.9.0.jar;C:\hibernate-3.1\lib\cglib-2.1.3.jar;C:\hibernate-3.1\lib\cleanimports.jar;C:\hibernate-3.1\lib\commons-collections-2.1.1.jar;C:\hibernate-3.1\lib\commons-logging-1.0.4.jar;C:\hibernate-3.1\lib\concurrent-1.3.2.jar;C:\hibernate-3.1\lib\connector.jar;C:\hibernate-3.1\lib\dom4j-1.6.1.jar;C:\hibernate-3.1\lib\ehcache-1.1.jar;C:\hibernate-3.1\lib\jaas.jar;C:\hibernate-3.1\lib\jacc-1_0-fr.jar;C:\hibernate-3.1\lib\jaxen-1.1-beta-7.jar;C:\hibernate-3.1\lib\jboss-cache.jar;C:\hibernate-3.1\lib\jboss-common.jar;C:\hibernate-3.1\lib\jboss-jmx.jar;C:\hibernate-3.1\lib\jboss-system.jar;C:\hibernate-3.1\lib\jdbc2_0-stdext.jar;C:\hibernate-3.1\lib\jgroups-2.2.8.jar;C:\hibernate-3.1\lib\jta.jar;C:\hibernate-3.1\lib\junit-3.8.1.jar;C:\hibernate-3.1\lib\log4j-1.2.11.jar;C:\hibernate-3.1\lib\mysql-connector-java-3.1.12-bin.jar;C:\hibernate-3.1\lib\oscache-2.1.jar;C:\hibernate-3.1\lib\proxool-0.8.3.jar;C:\hibernate-3.1\lib\swarmcache-1.0rc2.jar;C:\hibernate-3.1\lib\syndiag2.jar;C:\hibernate-3.1\lib\versioncheck.jar;C:\hibernate-3.1\lib\xerces-2.6.2.jar;C:\hibernate-3.1\lib\xml-apis.jar;C:\hibernate-3.1\hibernate3.jar, java.vm.specification.version=1.0, java.home=C:\Program Files\Java\j2re1.4.2_04, sun.arch.data.model=32, hibernate.dialect=org.hibernate.dialect.MySQLDialect, hibernate.connection.url=jdbc:mysql:///events_calendar, user.language=en, java.specification.vendor=Sun Microsystems Inc., awt.toolkit=sun.awt.windows.WToolkit, hibernate.cglib.use_reflection_optimizer=true, java.vm.info=mixed mode, java.version=1.4.2_04, java.ext.dirs=C:\Program Files\Java\j2re1.4.2_04\lib\ext, sun.boot.class.path=C:\Program Files\Java\j2re1.4.2_04\lib\rt.jar;C:\Program Files\Java\j2re1.4.2_04\lib\i18n.jar;C:\Program Files\Java\j2re1.4.2_04\lib\sunrsasign.jar;C:\Program Files\Java\j2re1.4.2_04\lib\jsse.jar;C:\Program Files\Java\j2re1.4.2_04\lib\jce.jar;C:\Program Files\Java\j2re1.4.2_04\lib\charsets.jar;C:\Program Files\Java\j2re1.4.2_04\classes, java.vendor=Sun Microsystems Inc., file.separator=\, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, sun.cpu.isalist=pentium i486 i386}
703 [main] DEBUG org.hibernate.cfg.Configuration - Preparing to build session factory with filters : {}
703 [main] DEBUG org.hibernate.cfg.Configuration - processing extends queue
703 [main] DEBUG org.hibernate.cfg.Configuration - processing collection mappings
703 [main] DEBUG org.hibernate.cfg.Configuration - processing native query and ResultSetMapping mappings
703 [main] DEBUG org.hibernate.cfg.Configuration - processing association property references
703 [main] DEBUG org.hibernate.cfg.Configuration - processing foreign key constraints
796 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!)
796 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Hibernate connection pool size: 20
796 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - autocommit mode: false
796 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - using driver: org.gjt.mm.mysql.Driver at URL: jdbc:mysql:///events_calendar
796 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - connection properties: {user=root, password=password}
796 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider - total checked-out connections: 0
796 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider - opening new JDBC connection
1093 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider - created connection to: jdbc:mysql:///events_calendar, Isolation Level: 4
1093 [main] INFO org.hibernate.cfg.SettingsFactory - RDBMS: MySQL, version: 5.0.18-nt
1093 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-3.1.12 ( $Date: 2005-11-17 15:53:48 +0100 (Thu, 17 Nov 2005) $, $Revision$ )
1093 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider - returning connection to pool, pool size: 1
1125 [main] INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.MySQLDialect
1140 [main] INFO org.hibernate.transaction.TransactionFactoryFactory - Using default transaction strategy (direct JDBC transactions)
1140 [main] INFO org.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
1156 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled
1156 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic session close at end of transaction: disabled
1156 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC batch size: 15
1156 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC batch updates for versioned data: disabled
1156 [main] INFO org.hibernate.cfg.SettingsFactory - Scrollable result sets: enabled
1156 [main] DEBUG org.hibernate.cfg.SettingsFactory - Wrap result sets: disabled
1156 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): enabled
1156 [main] INFO org.hibernate.cfg.SettingsFactory - Connection release mode: auto
1156 [main] INFO org.hibernate.cfg.SettingsFactory - Maximum outer join fetch depth: 2
1156 [main] INFO org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1
1156 [main] INFO org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled
1171 [main] INFO org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key: disabled
1171 [main] INFO org.hibernate.cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
1171 [main] INFO org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
1171 [main] INFO org.hibernate.cfg.SettingsFactory - Query language substitutions: {}
1171 [main] INFO org.hibernate.cfg.SettingsFactory - Second-level cache: enabled
1171 [main] INFO org.hibernate.cfg.SettingsFactory - Query cache: disabled
1171 [main] INFO org.hibernate.cfg.SettingsFactory - Cache provider: org.hibernate.cache.EhCacheProvider
1171 [main] INFO org.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: disabled
1171 [main] INFO org.hibernate.cfg.SettingsFactory - Structured second-level cache entries: disabled
1171 [main] DEBUG org.hibernate.exception.SQLExceptionConverterFactory - Using dialect defined converter
1187 [main] INFO org.hibernate.cfg.SettingsFactory - Statistics: disabled
1187 [main] INFO org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled
1187 [main] INFO org.hibernate.cfg.SettingsFactory - Default entity-mode: pojo
1250 [main] INFO org.hibernate.impl.SessionFactoryImpl - building session factory
1250 [main] DEBUG org.hibernate.impl.SessionFactoryImpl - Session factory constructed with filter configurations : {}
1250 [main] DEBUG org.hibernate.impl.SessionFactoryImpl - instantiating session factory with properties: {java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, hibernate.connection.password=password, sun.boot.library.path=C:\Program Files\Java\j2re1.4.2_04\bin, java.vm.version=1.4.2_04-b05, hibernate.connection.username=root, java.vm.vendor=Sun Microsystems Inc., java.vendor.url=http://java.sun.com/, path.separator=;, java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io, user.country=US, sun.os.patch.level=Service Pack 2, java.vm.specification.name=Java Virtual Machine Specification, user.dir=C:\works\eclipse\workspace\build3.xml, java.runtime.version=1.4.2_04-b05, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.endorsed.dirs=C:\Program Files\Java\j2re1.4.2_04\lib\endorsed, os.arch=x86, java.io.tmpdir=C:\DOCUME~1\sundarvc\LOCALS~1\Temp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, os.name=Windows XP, sun.java2d.fontpath=, java.library.path=C:\Program Files\Java\j2re1.4.2_04\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\j2sdk1.4.2\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Sonic Shared;c:\works\scripts;C:\apache-ant-1.6.5\bin;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\xmlbeans-2.0.0\bin, java.specification.name=Java Platform API Specification, java.class.version=48.0, java.util.prefs.PreferencesFactory=java.util.prefs.WindowsPreferencesFactory, os.version=5.1, user.home=C:\Documents and Settings\sundarvc, user.timezone=, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=Cp1252, java.specification.version=1.4, hibernate.connection.driver_class=org.gjt.mm.mysql.Driver, java.class.path=C:\works\calendar\build\classes;C:\works\eclipse\workspace\build3.xml\bin;C:\hibernate-3.1\lib\ant-1.6.5.jar;C:\hibernate-3.1\lib\ant-antlr-1.6.5.jar;C:\hibernate-3.1\lib\ant-junit-1.6.5.jar;C:\hibernate-3.1\lib\ant-launcher-1.6.5.jar;C:\hibernate-3.1\lib\ant-swing-1.6.5.jar;C:\hibernate-3.1\lib\antlr-2.7.6rc1.jar;C:\hibernate-3.1\lib\asm-attrs.jar;C:\hibernate-3.1\lib\asm.jar;C:\hibernate-3.1\lib\c3p0-0.9.0.jar;C:\hibernate-3.1\lib\cglib-2.1.3.jar;C:\hibernate-3.1\lib\cleanimports.jar;C:\hibernate-3.1\lib\commons-collections-2.1.1.jar;C:\hibernate-3.1\lib\commons-logging-1.0.4.jar;C:\hibernate-3.1\lib\concurrent-1.3.2.jar;C:\hibernate-3.1\lib\connector.jar;C:\hibernate-3.1\lib\dom4j-1.6.1.jar;C:\hibernate-3.1\lib\ehcache-1.1.jar;C:\hibernate-3.1\lib\jaas.jar;C:\hibernate-3.1\lib\jacc-1_0-fr.jar;C:\hibernate-3.1\lib\jaxen-1.1-beta-7.jar;C:\hibernate-3.1\lib\jboss-cache.jar;C:\hibernate-3.1\lib\jboss-common.jar;C:\hibernate-3.1\lib\jboss-jmx.jar;C:\hibernate-3.1\lib\jboss-system.jar;C:\hibernate-3.1\lib\jdbc2_0-stdext.jar;C:\hibernate-3.1\lib\jgroups-2.2.8.jar;C:\hibernate-3.1\lib\jta.jar;C:\hibernate-3.1\lib\junit-3.8.1.jar;C:\hibernate-3.1\lib\log4j-1.2.11.jar;C:\hibernate-3.1\lib\mysql-connector-java-3.1.12-bin.jar;C:\hibernate-3.1\lib\oscache-2.1.jar;C:\hibernate-3.1\lib\proxool-0.8.3.jar;C:\hibernate-3.1\lib\swarmcache-1.0rc2.jar;C:\hibernate-3.1\lib\syndiag2.jar;C:\hibernate-3.1\lib\versioncheck.jar;C:\hibernate-3.1\lib\xerces-2.6.2.jar;C:\hibernate-3.1\lib\xml-apis.jar;C:\hibernate-3.1\hibernate3.jar, user.name=sundarvc, java.vm.specification.version=1.0, sun.arch.data.model=32, java.home=C:\Program Files\Java\j2re1.4.2_04, hibernate.connection.url=jdbc:mysql:///events_calendar, hibernate.dialect=org.hibernate.dialect.MySQLDialect, java.specification.vendor=Sun Microsystems Inc., user.language=en, awt.toolkit=sun.awt.windows.WToolkit, java.vm.info=mixed mode, hibernate.cglib.use_reflection_optimizer=true, java.version=1.4.2_04, java.ext.dirs=C:\Program Files\Java\j2re1.4.2_04\lib\ext, sun.boot.class.path=C:\Program Files\Java\j2re1.4.2_04\lib\rt.jar;C:\Program Files\Java\j2re1.4.2_04\lib\i18n.jar;C:\Program Files\Java\j2re1.4.2_04\lib\sunrsasign.jar;C:\Program Files\Java\j2re1.4.2_04\lib\jsse.jar;C:\Program Files\Java\j2re1.4.2_04\lib\jce.jar;C:\Program Files\Java\j2re1.4.2_04\lib\charsets.jar;C:\Program Files\Java\j2re1.4.2_04\classes, java.vendor=Sun Microsystems Inc., file.separator=\, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, sun.cpu.endian=little, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.isalist=pentium i486 i386}
1250 [main] DEBUG net.sf.ehcache.CacheManager - Creating new CacheManager with default config
1265 [main] DEBUG net.sf.ehcache.CacheManager - Configuring ehcache from classpath.
1265 [main] WARN net.sf.ehcache.config.Configurator - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/hibernate-3.1/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
1281 [main] DEBUG net.sf.ehcache.config.Configuration$DiskStore - Disk Store Path: C:\DOCUME~1\sundarvc\LOCALS~1\Temp\
1671 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Static SQL for entity: home.ch02.Test
1671 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Version select: select id from my_test_table where id =?
1671 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Snapshot select: select test_.id, test_.name as name0_ from my_test_table test_ where test_.id=?
1671 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Insert 0: insert into my_test_table (name, id) values (?, ?)
1671 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Update 0: update my_test_table set name=? where id=?
1671 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Delete 0: delete from my_test_table where id=?
1703 [main] DEBUG org.hibernate.loader.entity.EntityLoader - Static select for entity home.ch02.Test: select test0_.id as id0_0_, test0_.name as name0_0_ from my_test_table test0_ where test0_.id=?
1703 [main] DEBUG org.hibernate.loader.entity.EntityLoader - Static select for entity home.ch02.Test: select test0_.id as id0_0_, test0_.name as name0_0_ from my_test_table test0_ where test0_.id=?
1937 [main] DEBUG org.hibernate.loader.entity.EntityLoader - Static select for entity home.ch02.Test: select test0_.id as id0_0_, test0_.name as name0_0_ from my_test_table test0_ where test0_.id=? for update
1953 [main] DEBUG org.hibernate.loader.entity.EntityLoader - Static select for entity home.ch02.Test: select test0_.id as id0_0_, test0_.name as name0_0_ from my_test_table test0_ where test0_.id=? for update
1968 [main] DEBUG org.hibernate.loader.entity.EntityLoader - Static select for action ACTION_MERGE on entity home.ch02.Test: select test0_.id as id0_0_, test0_.name as name0_0_ from my_test_table test0_ where test0_.id=?
1968 [main] DEBUG org.hibernate.loader.entity.EntityLoader - Static select for action ACTION_REFRESH on entity home.ch02.Test: select test0_.id as id0_0_, test0_.name as name0_0_ from my_test_table test0_ where test0_.id=?
1968 [main] DEBUG org.hibernate.impl.SessionFactoryObjectFactory - initializing class SessionFactoryObjectFactory
1968 [main] DEBUG org.hibernate.impl.SessionFactoryObjectFactory - registered: c45b021009bce0430109bce0463d0000 (unnamed)
1968 [main] INFO org.hibernate.impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured
1968 [main] DEBUG org.hibernate.impl.SessionFactoryImpl - instantiated session factory
1968 [main] DEBUG org.hibernate.impl.SessionFactoryImpl - Checking 0 named HQL queries
1968 [main] DEBUG org.hibernate.impl.SessionFactoryImpl - Checking 0 named SQL queries
2046 [main] DEBUG org.hibernate.impl.SessionImpl - opened session at timestamp: 4674908766588928
2046 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener - loading entity: [home.ch02.Test#1]
2046 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener - creating new proxy for entity
2078 [main] DEBUG org.hibernate.jdbc.JDBCContext - after autocommit
2078 [main] DEBUG org.hibernate.jdbc.ConnectionManager - aggressively releasing JDBC connection
2078 [main] DEBUG org.hibernate.impl.SessionImpl - after transaction completion
2078 [main] DEBUG org.hibernate.impl.SessionImpl - initializing proxy: [home.ch02.Test#1]
2078 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener - attempting to resolve: [home.ch02.Test#1]
2078 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener - object not resolved in any cache: [home.ch02.Test#1]
2078 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Fetching entity: [home.ch02.Test#1]
2078 [main] DEBUG org.hibernate.loader.Loader - loading entity: [home.ch02.Test#1]
2078 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2078 [main] DEBUG org.hibernate.jdbc.ConnectionManager - opening JDBC connection
2078 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider - total checked-out connections: 0
2078 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider - using pooled JDBC connection, pool size: 0
2078 [main] DEBUG org.hibernate.SQL - select test0_.id as id0_0_, test0_.name as name0_0_ from my_test_table test0_ where test0_.id=?
2078 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - preparing statement
2093 [main] DEBUG org.hibernate.type.LongType - binding '1' to parameter: 1
2093 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to open ResultSet (open ResultSets: 0, globally: 0)
2093 [main] DEBUG org.hibernate.loader.Loader - processing result set
2093 [main] DEBUG org.hibernate.loader.Loader - result set row: 0
2093 [main] DEBUG org.hibernate.loader.Loader - result row: EntityKey[home.ch02.Test#1]
2093 [main] DEBUG org.hibernate.loader.Loader - Initializing object from ResultSet: [home.ch02.Test#1]
2109 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Hydrating entity: [home.ch02.Test#1]
2109 [main] DEBUG org.hibernate.type.StringType - returning 'Sundar' as column: name0_0_
2109 [main] DEBUG org.hibernate.loader.Loader - done processing result set (1 rows)
2109 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to close ResultSet (open ResultSets: 1, globally: 1)
2109 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2109 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - closing statement
2109 [main] DEBUG org.hibernate.loader.Loader - total objects hydrated: 1
2109 [main] DEBUG org.hibernate.engine.TwoPhaseLoad - resolving associations for [home.ch02.Test#1]
2109 [main] DEBUG org.hibernate.engine.TwoPhaseLoad - done materializing entity [home.ch02.Test#1]
2109 [main] DEBUG org.hibernate.engine.StatefulPersistenceContext - initializing non-lazy collections
2109 [main] DEBUG org.hibernate.loader.Loader - done entity load
Sundar
2125 [main] DEBUG org.hibernate.event.def.AbstractSaveEventListener - transient instance of: home.ch02.Test
2125 [main] DEBUG org.hibernate.event.def.DefaultSaveOrUpdateEventListener - saving transient instance
2125 [main] DEBUG org.hibernate.id.IncrementGenerator - fetching initial value: select max(id) from my_test_table
2125 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2125 [main] DEBUG org.hibernate.SQL - select max(id) from my_test_table
2125 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - preparing statement
2125 [main] DEBUG org.hibernate.id.IncrementGenerator - first free id: 2
2125 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2125 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - closing statement
2125 [main] DEBUG org.hibernate.event.def.AbstractSaveEventListener - generated identifier: 2, using strategy: org.hibernate.id.IncrementGenerator
2125 [main] DEBUG org.hibernate.event.def.AbstractSaveEventListener - saving [home.ch02.Test#2]
2140 [main] DEBUG org.hibernate.event.def.AbstractFlushingEventListener - flushing session
2140 [main] DEBUG org.hibernate.event.def.AbstractFlushingEventListener - processing flush-time cascades
2140 [main] DEBUG org.hibernate.event.def.AbstractFlushingEventListener - dirty checking collections
2140 [main] DEBUG org.hibernate.event.def.AbstractFlushingEventListener - Flushing entities and processing referenced collections
2140 [main] DEBUG org.hibernate.event.def.AbstractFlushingEventListener - Processing unreferenced collections
2140 [main] DEBUG org.hibernate.event.def.AbstractFlushingEventListener - Scheduling collection removes/(re)creates/updates
2140 [main] DEBUG org.hibernate.event.def.AbstractFlushingEventListener - Flushed: 1 insertions, 0 updates, 0 deletions to 2 objects
2140 [main] DEBUG org.hibernate.event.def.AbstractFlushingEventListener - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
2140 [main] DEBUG org.hibernate.pretty.Printer - listing entities:
2140 [main] DEBUG org.hibernate.pretty.Printer - home.ch02.Test{name=Sundar, id=1}
2140 [main] DEBUG org.hibernate.pretty.Printer - home.ch02.Test{name=Chakravarthy, id=2}
2140 [main] DEBUG org.hibernate.event.def.AbstractFlushingEventListener - executing flush
2140 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Inserting entity: [home.ch02.Test#2]
2140 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2140 [main] DEBUG org.hibernate.SQL - insert into my_test_table (name, id) values (?, ?)
2140 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - preparing statement
2140 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Dehydrating entity: [home.ch02.Test#2]
2140 [main] DEBUG org.hibernate.type.StringType - binding 'Chakravarthy' to parameter: 1
2140 [main] DEBUG org.hibernate.type.LongType - binding '2' to parameter: 2
2140 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - Adding to batch
2156 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - Executing batch size: 1
2156 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2156 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - closing statement
2156 [main] DEBUG org.hibernate.event.def.AbstractFlushingEventListener - post flush
2156 [main] DEBUG org.hibernate.impl.SessionImpl - closing session
2156 [main] DEBUG org.hibernate.jdbc.ConnectionManager - performing cleanup
2156 [main] DEBUG org.hibernate.jdbc.ConnectionManager - releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
2156 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider - returning connection to pool, pool size: 1
2156 [main] DEBUG org.hibernate.jdbc.JDBCContext - after transaction completion
2156 [main] DEBUG org.hibernate.jdbc.ConnectionManager - aggressively releasing JDBC connection
2156 [main] DEBUG org.hibernate.impl.SessionImpl - after transaction completion