Hello,
I have following tables.
CSEmployee with columns id, name, email
MSComputer with columns computerId, id, computerType, computerMake
CSEmployee has 1-1 relation with MSComputer and MSComputer.id is FK to CSEmployee.id.
I try running code shown in section named:
Code between sessionFactory.openSession() and session.close():
below and find that MSComputer.id is null.
Please guide what am I dont wrong.
Thanks.
Miten.
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.2.6 ga
Mapping documents:
CSEmployee.hbm.xml
==============
<?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="training">
<import class="Computer"/>
<class name="CSEmployee" table="CSEmployee">
<id name="id" type="java.lang.Long">
<generator class="increment"></generator>
</id>
<!-- table per hierarchy -->
<property name="name"></property>
<property name="email"></property>
<one-to-one name="computer" class="Computer"
property-ref="id"
cascade="save-update">
<!-- <formula>id</formula> -->
</one-to-one>
<!--
<one-to-one name="computer" class="Computer"
cascade="save-update"></one-to-one>
-->
</class>
</hibernate-mapping>
Computer.hbm.xml
=============
<?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="training">
<class name="Computer" table="MSComputer">
<id name="computerId" >
<generator class="increment" />
</id>
<!-- <properties name="computer_ref">
<property name="id"></property>
</properties> -->
<property name="id"></property>
<property name="computerMake"></property>
<property name="computerType"></property>
</class>
<database-object>
<create>
create or replace procedure SELECT_ALL_EMP ( OUT_RESULT out
SYS_REFCURSOR, ) as begin open OUT_RESULT for select
id,name,email from Employee e
</create>
<drop>drop procedure SELECT_ALL_EMP</drop>
</database-object>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
private static void testAssociation(String[] args) {
// TODO Auto-generated method stub
CSEmployee cseMiten = new CSEmployee();
cseMiten.setEmail("imiten@yahoo.com");
cseMiten.setName("Miten Mehta");
Computer compMiten = new Computer();
compMiten.setComputerMake("Circle");
compMiten.setComputerType("P4 3.2 GHz");
cseMiten.setComputer(compMiten);
CSEmployee csePinky = new CSEmployee();
csePinky.setEmail("indiapinky@yahoo.com");
csePinky.setName("Pinky Mehta");
Computer compPinky = new Computer();
compPinky.setComputerMake("HP");
compPinky.setComputerType("P4 3.2 GHz");
csePinky.setComputer(compPinky);
Configuration config = new Configuration().configure();
SessionFactory factory = config.buildSessionFactory();
Session session = factory.openSession();
Transaction tx = session.beginTransaction();
session.save(csePinky);
session.save(cseMiten);
tx.commit();
session.close();
factory.close();
}
Full stack trace of any exception that occurs:
Name and version of the database you are using:
Derby 10.4.1.3
The generated SQL (show_sql=true):
18:27:33,000 DEBUG Printer:90 - training.CSEmployee{computer=training.Computer#1, id=1, email=indiapinky@yahoo.com, name=Pinky Mehta}
18:27:33,000 DEBUG Printer:90 - training.CSEmployee{computer=training.Computer#2, id=2, email=imiten@yahoo.com, name=Miten Mehta}
18:27:33,000 DEBUG Printer:90 - training.Computer{id=null, computerId=1, computerMake=HP, computerType=P4 3.2 GHz}
18:27:33,000 DEBUG Printer:90 - training.Computer{id=null, computerId=2, computerMake=Circle, computerType=P4 3.2 GHz}
Debug level Hibernate log excerpt:
18:27:25,609 INFO Environment:514 - Hibernate 3.2.6
18:27:25,609 INFO Environment:547 - hibernate.properties not found
18:27:25,609 INFO Environment:681 - Bytecode provider name : cglib
18:27:25,609 INFO Environment:598 - using JDK 1.4 java.sql.Timestamp handling
18:27:25,671 INFO Configuration:1432 - configuring from resource: /hibernate.cfg.xml
18:27:25,671 INFO Configuration:1409 - Configuration resource: /hibernate.cfg.xml
18:27:25,718 DEBUG DTDEntityResolver:38 - trying to resolve system-id [http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd]
18:27:25,718 DEBUG DTDEntityResolver:40 - recognized hibernate namespace; attempting to resolve on classpath under org/hibernate/
18:27:25,718 DEBUG DTDEntityResolver:50 - located [http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd] in classpath
18:27:25,750 DEBUG Configuration:1393 - hibernate.connection.driver_class=org.apache.derby.jdbc.EmbeddedDriver
18:27:25,750 DEBUG Configuration:1393 - hibernate.connection.url=jdbc:derby:D:\DerbyDatabases\MyDB;create=true
18:27:25,750 DEBUG Configuration:1393 - hibernate.dialect=org.hibernate.dialect.DerbyDialect
18:27:25,750 DEBUG Configuration:1393 - hibernate.hbm2ddl.auto=create
18:27:25,750 DEBUG Configuration:1592 - null<-org.dom4j.tree.DefaultAttribute@b66cc [Attribute: name resource value "Account.hbm.xml"]
18:27:25,750 INFO Configuration:559 - Reading mappings from resource : Account.hbm.xml
18:27:25,765 DEBUG DTDEntityResolver:38 - trying to resolve system-id [http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd]
18:27:25,765 DEBUG DTDEntityResolver:40 - recognized hibernate namespace; attempting to resolve on classpath under org/hibernate/
18:27:25,765 DEBUG DTDEntityResolver:50 - located [http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd] in classpath
18:27:25,843 INFO HbmBinder:300 - Mapping class: training.Account -> Account
18:27:25,843 DEBUG HbmBinder:1267 - Mapped property: accId -> acc_id
18:27:25,859 DEBUG HbmBinder:1267 - Mapped property: accType -> acc_type
18:27:25,859 DEBUG HbmBinder:1267 - Mapped property: balance -> acc_bal
18:27:25,875 INFO HbmBinder:1419 - Mapping collection: training.Account.addresses -> ACCOUNT_ADDRESS
18:27:25,875 DEBUG HbmBinder:1267 - Mapped property: addresses
18:27:25,875 INFO HbmBinder:1419 - Mapping collection: training.Account.transactions -> ACCOUNT_TRANSACTION
18:27:25,875 DEBUG HbmBinder:1267 - Mapped property: transactions
18:27:25,875 INFO HbmBinder:1419 - Mapping collection: training.Account.pins -> ACCOUNT_PIN
18:27:25,875 DEBUG HbmBinder:1267 - Mapped property: pins
18:27:25,875 DEBUG Configuration:1592 - null<-org.dom4j.tree.DefaultAttribute@b82368 [Attribute: name resource value "Employee.hbm.xml"]
18:27:25,875 INFO Configuration:559 - Reading mappings from resource : Employee.hbm.xml
18:27:25,875 DEBUG DTDEntityResolver:38 - trying to resolve system-id [http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd]
18:27:25,875 DEBUG DTDEntityResolver:40 - recognized hibernate namespace; attempting to resolve on classpath under org/hibernate/
18:27:25,875 DEBUG DTDEntityResolver:50 - located [http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd] in classpath
18:27:25,906 INFO HbmBinder:300 - Mapping class: training.Employee -> employee
18:27:25,906 DEBUG HbmBinder:1267 - Mapped property: eid -> eid
18:27:25,906 DEBUG HbmBinder:1267 - Mapped property: name -> name
18:27:25,906 DEBUG HbmBinder:1267 - Mapped property: email -> email
18:27:25,937 INFO HbmBinder:814 - Mapping subclass: training.Manager -> employee
18:27:25,937 DEBUG HbmBinder:1267 - Mapped property: cabin -> cabin
18:27:25,937 DEBUG Configuration:1592 - null<-org.dom4j.tree.DefaultAttribute@1dfafd1 [Attribute: name resource value "Computer.hbm.xml"]
18:27:25,937 INFO Configuration:559 - Reading mappings from resource : Computer.hbm.xml
18:27:25,937 DEBUG DTDEntityResolver:38 - trying to resolve system-id [http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd]
18:27:25,937 DEBUG DTDEntityResolver:40 - recognized hibernate namespace; attempting to resolve on classpath under org/hibernate/
18:27:25,937 DEBUG DTDEntityResolver:50 - located [http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd] in classpath
18:27:25,953 INFO HbmBinder:300 - Mapping class: training.Computer -> MSComputer
18:27:25,953 DEBUG HbmBinder:1267 - Mapped property: computerId -> computerId
18:27:25,953 DEBUG HbmBinder:1267 - Mapped property: id -> id
18:27:25,953 DEBUG HbmBinder:1267 - Mapped property: computerMake -> computerMake
18:27:25,953 DEBUG HbmBinder:1267 - Mapped property: computerType -> computerType
18:27:25,968 DEBUG Configuration:1592 - null<-org.dom4j.tree.DefaultAttribute@3bb2b8 [Attribute: name resource value "CSEmployee.hbm.xml"]
18:27:25,968 INFO Configuration:559 - Reading mappings from resource : CSEmployee.hbm.xml
18:27:25,968 DEBUG DTDEntityResolver:38 - trying to resolve system-id [http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd]
18:27:25,968 DEBUG DTDEntityResolver:40 - recognized hibernate namespace; attempting to resolve on classpath under org/hibernate/
18:27:25,968 DEBUG DTDEntityResolver:50 - located [http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd] in classpath
18:27:25,984 DEBUG HbmBinder:183 - Import: Computer -> training.Computer
18:27:25,984 INFO Mappings:138 - duplicate import: training.Computer->Computer
18:27:25,984 INFO HbmBinder:300 - Mapping class: training.CSEmployee -> CSEmployee
18:27:25,984 DEBUG HbmBinder:1267 - Mapped property: id -> id
18:27:25,984 DEBUG HbmBinder:1267 - Mapped property: name -> name
18:27:25,984 DEBUG HbmBinder:1267 - Mapped property: email -> email
18:27:25,984 DEBUG HbmBinder:1267 - Mapped property: computer
18:27:25,984 INFO Configuration:1547 - Configured SessionFactory: null
18:27:25,984 DEBUG Configuration:1548 - properties: {java.runtime.name=Java(TM) SE Runtime Environment, sun.boot.library.path=C:\Program Files\Java\jre1.6.0_02\bin, java.vm.version=1.6.0_02-b05, 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.java.launcher=SUN_STANDARD, sun.os.patch.level=Service Pack 2, java.vm.specification.name=Java Virtual Machine Specification, user.dir=D:\learn\eclipseide\workspace\nilesh\MyHibernateExample1, java.runtime.version=1.6.0_02-b05, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.endorsed.dirs=C:\Program Files\Java\jre1.6.0_02\lib\endorsed, os.arch=x86, java.io.tmpdir=C:\DOCUME~1\MITENM~1\LOCALS~1\Temp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, os.name=Windows XP, sun.jnu.encoding=Cp1252, java.library.path=C:\Program Files\Java\jre1.6.0_02\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jre1.6.0_02\bin\client;C:\Program Files\Java\jre1.6.0_02\bin;D:\software\IBM\WebSphere MQ\Java\lib;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Intel\DMIX;C:\Program Files\Diskeeper Corporation\Diskeeper\;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\80\Tools\BINN\;D:\software\Java\jdk1.6.0_02\bin;D:\software\Sun\SDK\lib\ant\bin;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;D:\software\groovy-1.0\groovy-1.0\bin;D:\software\Perforce;d:\software\putty;D:\software\IBM\WebSphere MQ\bin;D:\software\IBM\WebSphere MQ\tools\c\samples\bin;D:\software\IBM\SQLLIB\BIN;D:\software\IBM\SQLLIB\FUNCTION;D:\software\IBM\SQLLIB\SAMPLES\REPL;D:\software\Sun\jwsdp-2.0\jwsdp-shared\bin;d:\software\openldap, java.specification.name=Java Platform API Specification, java.class.version=50.0, sun.management.compiler=HotSpot Client Compiler, os.version=5.1, user.home=C:\Documents and Settings\Miten Mehta, user.timezone=Asia/Calcutta, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=Cp1252, java.specification.version=1.6, hibernate.connection.driver_class=org.apache.derby.jdbc.EmbeddedDriver, user.name=Miten Mehta, java.class.path=D:\learn\eclipseide\workspace\nilesh\MyHibernateExample1\ide-bin;D:\software\hibernate\hibernate-3.2.6.ga\hibernate-3.2\lib\log4j-1.2.11.jar;D:\software\hibernate\hibernate-3.2.6.ga\hibernate-3.2\lib\ant-1.6.5.jar;D:\software\hibernate\hibernate-3.2.6.ga\hibernate-3.2\lib\asm.jar;D:\software\hibernate\hibernate-3.2.6.ga\hibernate-3.2\lib\cglib-2.1.3.jar;D:\software\hibernate\hibernate-3.2.6.ga\hibernate-3.2\lib\commons-collections-2.1.1.jar;D:\software\hibernate\hibernate-3.2.6.ga\hibernate-3.2\lib\commons-logging-1.0.4.jar;D:\software\hibernate\hibernate-3.2.6.ga\hibernate-3.2\lib\dom4j-1.6.1.jar;D:\software\hibernate\hibernate-3.2.6.ga\hibernate-3.2\lib\ehcache-1.2.3.jar;D:\software\hibernate\hibernate-3.2.6.ga\hibernate-3.2\lib\jta.jar;D:\software\hibernate\hibernate-3.2.6.ga\hibernate-3.2\hibernate3.jar;D:\software\hibernate\hibernate-3.2.6.ga\hibernate-3.2\lib\ant-antlr-1.6.5.jar;D:\software\apache\db-derby-10.4.1.3-bin\lib\derby.jar, hibernate.bytecode.use_reflection_optimizer=false, java.vm.specification.version=1.0, java.home=C:\Program Files\Java\jre1.6.0_02, sun.arch.data.model=32, hibernate.dialect=org.hibernate.dialect.DerbyDialect, hibernate.connection.url=jdbc:derby:D:\DerbyDatabases\MyDB;create=true, user.language=en, java.specification.vendor=Sun Microsystems Inc., awt.toolkit=sun.awt.windows.WToolkit, java.vm.info=mixed mode, sharing, java.version=1.6.0_02, java.ext.dirs=C:\Program Files\Java\jre1.6.0_02\lib\ext;C:\WINDOWS\Sun\Java\lib\ext, sun.boot.class.path=C:\Program Files\Java\jre1.6.0_02\lib\resources.jar;C:\Program Files\Java\jre1.6.0_02\lib\rt.jar;C:\Program Files\Java\jre1.6.0_02\lib\sunrsasign.jar;C:\Program Files\Java\jre1.6.0_02\lib\jsse.jar;C:\Program Files\Java\jre1.6.0_02\lib\jce.jar;C:\Program Files\Java\jre1.6.0_02\lib\charsets.jar;C:\Program Files\Java\jre1.6.0_02\classes, java.vendor=Sun Microsystems Inc., file.separator=\, hibernate.hbm2ddl.auto=create, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, sun.desktop=windows, sun.cpu.isalist=pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86}
18:27:25,984 DEBUG Configuration:1291 - Preparing to build session factory with filters : {}
18:27:25,984 DEBUG Configuration:1126 - processing extends queue
18:27:25,984 DEBUG Configuration:1130 - processing collection mappings
18:27:25,984 DEBUG CollectionSecondPass:41 - Second pass for collection: training.Account.addresses
18:27:25,984 DEBUG HbmBinder:1267 - Mapped property: apt -> apt
18:27:25,984 DEBUG HbmBinder:1267 - Mapped property: city -> city
18:27:25,984 DEBUG HbmBinder:1267 - Mapped property: lane -> lane
18:27:25,984 DEBUG HbmBinder:1267 - Mapped property: state -> state
18:27:25,984 DEBUG HbmBinder:1267 - Mapped property: zip -> zip
18:27:25,984 DEBUG CollectionSecondPass:57 - Mapped collection key: acc_id, element: apt, city, lane, state, zip
18:27:25,984 DEBUG CollectionSecondPass:41 - Second pass for collection: training.Account.transactions
18:27:25,984 DEBUG CollectionSecondPass:57 - Mapped collection key: acc_id, index: acc_index, element: acc_transaction
18:27:25,984 DEBUG CollectionSecondPass:41 - Second pass for collection: training.Account.pins
18:27:25,984 DEBUG CollectionSecondPass:57 - Mapped collection key: acc_id, index: pin_desc, element: pin
18:27:25,984 DEBUG Configuration:1141 - processing native query and ResultSetMapping mappings
18:27:25,984 DEBUG Configuration:1149 - processing association property references
18:27:25,984 DEBUG Configuration:1171 - processing foreign key constraints
18:27:25,984 DEBUG Configuration:1254 - resolving reference to class: training.Account
18:27:26,000 DEBUG Configuration:1254 - resolving reference to class: training.Account
18:27:26,000 DEBUG Configuration:1254 - resolving reference to class: training.Account
18:27:26,078 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
18:27:26,078 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 20
18:27:26,078 INFO DriverManagerConnectionProvider:45 - autocommit mode: false
18:27:26,375 INFO DriverManagerConnectionProvider:80 - using driver: org.apache.derby.jdbc.EmbeddedDriver at URL: jdbc:derby:D:\DerbyDatabases\MyDB;create=true
18:27:26,375 INFO DriverManagerConnectionProvider:83 - connection properties: {}
18:27:26,375 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0
18:27:26,375 DEBUG DriverManagerConnectionProvider:109 - opening new JDBC connection
18:27:31,125 DEBUG DriverManagerConnectionProvider:115 - created connection to: jdbc:derby:D:\DerbyDatabases\MyDB;create=true, Isolation Level: 2
18:27:31,125 INFO SettingsFactory:89 - RDBMS: Apache Derby, version: 10.4.1.3 - (648739)
18:27:31,125 INFO SettingsFactory:90 - JDBC driver: Apache Derby Embedded JDBC Driver, version: 10.4.1.3 - (648739)
18:27:31,125 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 1
18:27:31,140 INFO Dialect:152 - Using dialect: org.hibernate.dialect.DerbyDialect
18:27:31,140 INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
18:27:31,156 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
18:27:31,156 INFO SettingsFactory:143 - Automatic flush during beforeCompletion(): disabled
18:27:31,156 INFO SettingsFactory:147 - Automatic session close at end of transaction: disabled
18:27:31,156 INFO SettingsFactory:162 - Scrollable result sets: enabled
18:27:31,156 DEBUG SettingsFactory:166 - Wrap result sets: disabled
18:27:31,156 INFO SettingsFactory:170 - JDBC3 getGeneratedKeys(): disabled
18:27:31,156 INFO SettingsFactory:178 - Connection release mode: auto
18:27:31,156 INFO SettingsFactory:205 - Default batch fetch size: 1
18:27:31,156 INFO SettingsFactory:209 - Generate SQL with comments: disabled
18:27:31,156 INFO SettingsFactory:213 - Order SQL updates by primary key: disabled
18:27:31,156 INFO SettingsFactory:217 - Order SQL inserts for batching: disabled
18:27:31,156 INFO SettingsFactory:386 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
18:27:31,156 INFO SettingsFactory:225 - Query language substitutions: {}
18:27:31,156 INFO SettingsFactory:230 - JPA-QL strict compliance: disabled
18:27:31,156 INFO SettingsFactory:235 - Second-level cache: enabled
18:27:31,156 INFO SettingsFactory:239 - Query cache: disabled
18:27:31,156 INFO SettingsFactory:373 - Cache provider: org.hibernate.cache.NoCacheProvider
18:27:31,156 INFO SettingsFactory:254 - Optimize cache for minimal puts: disabled
18:27:31,156 INFO SettingsFactory:263 - Structured second-level cache entries: disabled
18:27:31,156 DEBUG SQLExceptionConverterFactory:52 - Using dialect defined converter
18:27:31,156 INFO SettingsFactory:290 - Statistics: disabled
18:27:31,156 INFO SettingsFactory:294 - Deleted entity synthetic identifier rollback: disabled
18:27:31,156 INFO SettingsFactory:309 - Default entity-mode: pojo
18:27:31,156 INFO SettingsFactory:313 - Named query checking : enabled
18:27:31,187 INFO SessionFactoryImpl:161 - building session factory
18:27:31,187 DEBUG SessionFactoryImpl:173 - Session factory constructed with filter configurations : {}
18:27:31,187 DEBUG SessionFactoryImpl:177 - instantiating session factory with properties: {java.runtime.name=Java(TM) SE Runtime Environment, sun.boot.library.path=C:\Program Files\Java\jre1.6.0_02\bin, java.vm.version=1.6.0_02-b05, 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.java.launcher=SUN_STANDARD, sun.os.patch.level=Service Pack 2, java.vm.specification.name=Java Virtual Machine Specification, user.dir=D:\learn\eclipseide\workspace\nilesh\MyHibernateExample1, java.runtime.version=1.6.0_02-b05, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.endorsed.dirs=C:\Program Files\Java\jre1.6.0_02\lib\endorsed, os.arch=x86, java.io.tmpdir=C:\DOCUME~1\MITENM~1\LOCALS~1\Temp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, os.name=Windows XP, sun.jnu.encoding=Cp1252, java.library.path=C:\Program Files\Java\jre1.6.0_02\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jre1.6.0_02\bin\client;C:\Program Files\Java\jre1.6.0_02\bin;D:\software\IBM\WebSphere MQ\Java\lib;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Intel\DMIX;C:\Program Files\Diskeeper Corporation\Diskeeper\;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\80\Tools\BINN\;D:\software\Java\jdk1.6.0_02\bin;D:\software\Sun\SDK\lib\ant\bin;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;D:\software\groovy-1.0\groovy-1.0\bin;D:\software\Perforce;d:\software\putty;D:\software\IBM\WebSphere MQ\bin;D:\software\IBM\WebSphere MQ\tools\c\samples\bin;D:\software\IBM\SQLLIB\BIN;D:\software\IBM\SQLLIB\FUNCTION;D:\software\IBM\SQLLIB\SAMPLES\REPL;D:\software\Sun\jwsdp-2.0\jwsdp-shared\bin;d:\software\openldap, java.specification.name=Java Platform API Specification, java.class.version=50.0, sun.management.compiler=HotSpot Client Compiler, os.version=5.1, user.home=C:\Documents and Settings\Miten Mehta, user.timezone=Asia/Calcutta, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=Cp1252, java.specification.version=1.6, hibernate.connection.driver_class=org.apache.derby.jdbc.EmbeddedDriver, java.class.path=D:\learn\eclipseide\workspace\nilesh\MyHibernateExample1\ide-bin;D:\software\hibernate\hibernate-3.2.6.ga\hibernate-3.2\lib\log4j-1.2.11.jar;D:\software\hibernate\hibernate-3.2.6.ga\hibernate-3.2\lib\ant-1.6.5.jar;D:\software\hibernate\hibernate-3.2.6.ga\hibernate-3.2\lib\asm.jar;D:\software\hibernate\hibernate-3.2.6.ga\hibernate-3.2\lib\cglib-2.1.3.jar;D:\software\hibernate\hibernate-3.2.6.ga\hibernate-3.2\lib\commons-collections-2.1.1.jar;D:\software\hibernate\hibernate-3.2.6.ga\hibernate-3.2\lib\commons-logging-1.0.4.jar;D:\software\hibernate\hibernate-3.2.6.ga\hibernate-3.2\lib\dom4j-1.6.1.jar;D:\software\hibernate\hibernate-3.2.6.ga\hibernate-3.2\lib\ehcache-1.2.3.jar;D:\software\hibernate\hibernate-3.2.6.ga\hibernate-3.2\lib\jta.jar;D:\software\hibernate\hibernate-3.2.6.ga\hibernate-3.2\hibernate3.jar;D:\software\hibernate\hibernate-3.2.6.ga\hibernate-3.2\lib\ant-antlr-1.6.5.jar;D:\software\apache\db-derby-10.4.1.3-bin\lib\derby.jar, user.name=Miten Mehta, hibernate.bytecode.use_reflection_optimizer=false, java.vm.specification.version=1.0, sun.arch.data.model=32, java.home=C:\Program Files\Java\jre1.6.0_02, hibernate.connection.url=jdbc:derby:D:\DerbyDatabases\MyDB;create=true, hibernate.dialect=org.hibernate.dialect.DerbyDialect, java.specification.vendor=Sun Microsystems Inc., user.language=en, awt.toolkit=sun.awt.windows.WToolkit, java.vm.info=mixed mode, sharing, java.version=1.6.0_02, java.ext.dirs=C:\Program Files\Java\jre1.6.0_02\lib\ext;C:\WINDOWS\Sun\Java\lib\ext, sun.boot.class.path=C:\Program Files\Java\jre1.6.0_02\lib\resources.jar;C:\Program Files\Java\jre1.6.0_02\lib\rt.jar;C:\Program Files\Java\jre1.6.0_02\lib\sunrsasign.jar;C:\Program Files\Java\jre1.6.0_02\lib\jsse.jar;C:\Program Files\Java\jre1.6.0_02\lib\jce.jar;C:\Program Files\Java\jre1.6.0_02\lib\charsets.jar;C:\Program Files\Java\jre1.6.0_02\classes, java.vendor=Sun Microsystems Inc., file.separator=\, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, hibernate.hbm2ddl.auto=create, sun.cpu.endian=little, sun.io.unicode.encoding=UnicodeLittle, sun.desktop=windows, sun.cpu.isalist=pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86}
18:27:31,359 DEBUG AbstractEntityPersister:2743 - Static SQL for entity: training.Account
18:27:31,359 DEBUG AbstractEntityPersister:2748 - Version select: select acc_id from Account where acc_id =?
18:27:31,359 DEBUG AbstractEntityPersister:2751 - Snapshot select: select account_.acc_id, account_.acc_type as acc2_0_, account_.acc_bal as acc3_0_ from Account account_ where account_.acc_id=?
18:27:31,359 DEBUG AbstractEntityPersister:2754 - Insert 0: insert into Account (acc_type, acc_bal, acc_id) values (?, ?, ?)
18:27:31,359 DEBUG AbstractEntityPersister:2755 - Update 0: update Account set acc_type=?, acc_bal=? where acc_id=?
18:27:31,359 DEBUG AbstractEntityPersister:2756 - Delete 0: delete from Account where acc_id=?
18:27:31,375 DEBUG AbstractEntityPersister:2743 - Static SQL for entity: training.Manager
18:27:31,375 DEBUG AbstractEntityPersister:2748 - Version select: select eid from employee where eid =?
18:27:31,375 DEBUG AbstractEntityPersister:2751 - Snapshot select: select manager_.eid, manager_.name as name4_, manager_.email as email4_, manager_.cabin as cabin4_ from employee manager_ where manager_.eid=?
18:27:31,375 DEBUG AbstractEntityPersister:2754 - Insert 0: insert into employee (name, email, cabin, designation, eid) values (?, ?, ?, 'MGR', ?)
18:27:31,375 DEBUG AbstractEntityPersister:2755 - Update 0: update employee set name=?, email=?, cabin=? where eid=?
18:27:31,375 DEBUG AbstractEntityPersister:2756 - Delete 0: delete from employee where eid=?
18:27:31,375 DEBUG AbstractEntityPersister:2743 - Static SQL for entity: training.CSEmployee
18:27:31,375 DEBUG AbstractEntityPersister:2748 - Version select: select id from CSEmployee where id =?
18:27:31,375 DEBUG AbstractEntityPersister:2751 - Snapshot select: select csemployee_.id, csemployee_.name as name6_, csemployee_.email as email6_ from CSEmployee csemployee_ where csemployee_.id=?
18:27:31,375 DEBUG AbstractEntityPersister:2754 - Insert 0: insert into CSEmployee (name, email, id) values (?, ?, ?)
18:27:31,375 DEBUG AbstractEntityPersister:2755 - Update 0: update CSEmployee set name=?, email=? where id=?
18:27:31,375 DEBUG AbstractEntityPersister:2756 - Delete 0: delete from CSEmployee where id=?
18:27:31,375 DEBUG AbstractEntityPersister:2743 - Static SQL for entity: training.Computer
18:27:31,390 DEBUG AbstractEntityPersister:2748 - Version select: select computerId from MSComputer where computerId =?
18:27:31,390 DEBUG AbstractEntityPersister:2751 - Snapshot select: select computer_.computerId, computer_.id as id5_, computer_.computerMake as computer3_5_, computer_.computerType as computer4_5_ from MSComputer computer_ where computer_.computerId=?
18:27:31,390 DEBUG AbstractEntityPersister:2754 - Insert 0: insert into MSComputer (id, computerMake, computerType, computerId) values (?, ?, ?, ?)
18:27:31,390 DEBUG AbstractEntityPersister:2755 - Update 0: update MSComputer set id=?, computerMake=?, computerType=? where computerId=?
18:27:31,390 DEBUG AbstractEntityPersister:2756 - Delete 0: delete from MSComputer where computerId=?
18:27:31,390 DEBUG AbstractEntityPersister:2743 - Static SQL for entity: training.Employee
18:27:31,390 DEBUG AbstractEntityPersister:2748 - Version select: select eid from employee where eid =?
18:27:31,390 DEBUG AbstractEntityPersister:2751 - Snapshot select: select employee_.eid, employee_.name as name4_, employee_.email as email4_ from employee employee_ where employee_.eid=?
18:27:31,390 DEBUG AbstractEntityPersister:2754 - Insert 0: insert into employee (name, email, designation, eid) values (?, ?, 'EMP', ?)
18:27:31,390 DEBUG AbstractEntityPersister:2755 - Update 0: update employee set name=?, email=? where eid=?
18:27:31,390 DEBUG AbstractEntityPersister:2756 - Delete 0: delete from employee where eid=?
18:27:31,390 DEBUG AbstractCollectionPersister:548 - Static SQL for collection: training.Account.transactions
18:27:31,390 DEBUG AbstractCollectionPersister:550 - Row insert: insert into ACCOUNT_TRANSACTION (acc_id, acc_index, acc_transaction) values (?, ?, ?)
18:27:31,390 DEBUG AbstractCollectionPersister:553 - Row update: update ACCOUNT_TRANSACTION set acc_transaction=? where acc_id=? and acc_index=?
18:27:31,390 DEBUG AbstractCollectionPersister:556 - Row delete: delete from ACCOUNT_TRANSACTION where acc_id=? and acc_index=?
18:27:31,390 DEBUG AbstractCollectionPersister:559 - One-shot delete: delete from ACCOUNT_TRANSACTION where acc_id=?
18:27:31,406 DEBUG AbstractCollectionPersister:548 - Static SQL for collection: training.Account.addresses
18:27:31,406 DEBUG AbstractCollectionPersister:550 - Row insert: insert into ACCOUNT_ADDRESS (acc_id, apt, city, lane, state, zip) values (?, ?, ?, ?, ?, ?)
18:27:31,406 DEBUG AbstractCollectionPersister:553 - Row update: update ACCOUNT_ADDRESS set apt=?, city=?, lane=?, state=?, zip=? where acc_id=? and apt=? and city=? and lane=? and state=? and zip=?
18:27:31,406 DEBUG AbstractCollectionPersister:556 - Row delete: delete from ACCOUNT_ADDRESS where acc_id=? and apt=? and city=? and lane=? and state=? and zip=?
18:27:31,406 DEBUG AbstractCollectionPersister:559 - One-shot delete: delete from ACCOUNT_ADDRESS where acc_id=?
18:27:31,406 DEBUG AbstractCollectionPersister:548 - Static SQL for collection: training.Account.pins
18:27:31,406 DEBUG AbstractCollectionPersister:550 - Row insert: insert into ACCOUNT_PIN (acc_id, pin_desc, pin) values (?, ?, ?)
18:27:31,406 DEBUG AbstractCollectionPersister:553 - Row update: update ACCOUNT_PIN set pin=? where acc_id=? and pin_desc=?
18:27:31,406 DEBUG AbstractCollectionPersister:556 - Row delete: delete from ACCOUNT_PIN where acc_id=? and pin_desc=?
18:27:31,406 DEBUG AbstractCollectionPersister:559 - One-shot delete: delete from ACCOUNT_PIN where acc_id=?
18:27:31,421 DEBUG EntityLoader:79 - Static select for entity training.Account: select account0_.acc_id as acc1_0_0_, account0_.acc_type as acc2_0_0_, account0_.acc_bal as acc3_0_0_ from Account account0_ where account0_.acc_id=?
18:27:31,421 DEBUG EntityLoader:79 - Static select for entity training.Account: select account0_.acc_id as acc1_0_0_, account0_.acc_type as acc2_0_0_, account0_.acc_bal as acc3_0_0_ from Account account0_ where account0_.acc_id=?
18:27:31,421 DEBUG EntityLoader:79 - Static select for entity training.Account: select account0_.acc_id as acc1_0_0_, account0_.acc_type as acc2_0_0_, account0_.acc_bal as acc3_0_0_ from Account account0_ where account0_.acc_id=? for read only with rs
18:27:31,421 DEBUG EntityLoader:79 - Static select for entity training.Account: select account0_.acc_id as acc1_0_0_, account0_.acc_type as acc2_0_0_, account0_.acc_bal as acc3_0_0_ from Account account0_ where account0_.acc_id=? for read only with rs
18:27:31,421 DEBUG EntityLoader:79 - Static select for entity training.Account: select account0_.acc_id as acc1_0_0_, account0_.acc_type as acc2_0_0_, account0_.acc_bal as acc3_0_0_ from Account account0_ where account0_.acc_id=? for read only with rs
18:27:31,437 DEBUG EntityLoader:34 - Static select for action ACTION_MERGE on entity training.Account: select account0_.acc_id as acc1_0_0_, account0_.acc_type as acc2_0_0_, account0_.acc_bal as acc3_0_0_ from Account account0_ where account0_.acc_id=?
18:27:31,437 DEBUG EntityLoader:34 - Static select for action ACTION_REFRESH on entity training.Account: select account0_.acc_id as acc1_0_0_, account0_.acc_type as acc2_0_0_, account0_.acc_bal as acc3_0_0_ from Account account0_ where account0_.acc_id=?
18:27:31,437 DEBUG EntityLoader:79 - Static select for entity training.Manager: select manager0_.eid as eid4_0_, manager0_.name as name4_0_, manager0_.email as email4_0_, manager0_.cabin as cabin4_0_ from employee manager0_ where manager0_.eid=? and manager0_.designation='MGR'
18:27:31,437 DEBUG EntityLoader:79 - Static select for entity training.Manager: select manager0_.eid as eid4_0_, manager0_.name as name4_0_, manager0_.email as email4_0_, manager0_.cabin as cabin4_0_ from employee manager0_ where manager0_.eid=? and manager0_.designation='MGR'
18:27:31,437 DEBUG EntityLoader:79 - Static select for entity training.Manager: select manager0_.eid as eid4_0_, manager0_.name as name4_0_, manager0_.email as email4_0_, manager0_.cabin as cabin4_0_ from employee manager0_ where manager0_.eid=? and manager0_.designation='MGR' for read only with rs
18:27:31,437 DEBUG EntityLoader:79 - Static select for entity training.Manager: select manager0_.eid as eid4_0_, manager0_.name as name4_0_, manager0_.email as email4_0_, manager0_.cabin as cabin4_0_ from employee manager0_ where manager0_.eid=? and manager0_.designation='MGR' for read only with rs
18:27:31,437 DEBUG EntityLoader:79 - Static select for entity training.Manager: select manager0_.eid as eid4_0_, manager0_.name as name4_0_, manager0_.email as email4_0_, manager0_.cabin as cabin4_0_ from employee manager0_ where manager0_.eid=? and manager0_.designation='MGR' for read only with rs
18:27:31,437 DEBUG EntityLoader:34 - Static select for action ACTION_MERGE on entity training.Manager: select manager0_.eid as eid4_0_, manager0_.name as name4_0_, manager0_.email as email4_0_, manager0_.cabin as cabin4_0_ from employee manager0_ where manager0_.eid=? and manager0_.designation='MGR'
18:27:31,437 DEBUG EntityLoader:34 - Static select for action ACTION_REFRESH on entity training.Manager: select manager0_.eid as eid4_0_, manager0_.name as name4_0_, manager0_.email as email4_0_, manager0_.cabin as cabin4_0_ from employee manager0_ where manager0_.eid=? and manager0_.designation='MGR'
18:27:31,437 DEBUG EntityLoader:79 - Static select for entity training.CSEmployee: select csemployee0_.id as id6_1_, csemployee0_.name as name6_1_, csemployee0_.email as email6_1_, computer1_.computerId as computerId5_0_, computer1_.id as id5_0_, computer1_.computerMake as computer3_5_0_, computer1_.computerType as computer4_5_0_ from CSEmployee csemployee0_ left outer join MSComputer computer1_ on csemployee0_.id=computer1_.id where csemployee0_.id=?
18:27:31,437 DEBUG EntityLoader:79 - Static select for entity training.CSEmployee: select csemployee0_.id as id6_1_, csemployee0_.name as name6_1_, csemployee0_.email as email6_1_, computer1_.computerId as computerId5_0_, computer1_.id as id5_0_, computer1_.computerMake as computer3_5_0_, computer1_.computerType as computer4_5_0_ from CSEmployee csemployee0_ left outer join MSComputer computer1_ on csemployee0_.id=computer1_.id where csemployee0_.id=?
18:27:31,437 DEBUG EntityLoader:79 - Static select for entity training.CSEmployee: select csemployee0_.id as id6_0_, csemployee0_.name as name6_0_, csemployee0_.email as email6_0_ from CSEmployee csemployee0_ where csemployee0_.id=? for read only with rs
18:27:31,437 DEBUG EntityLoader:79 - Static select for entity training.CSEmployee: select csemployee0_.id as id6_0_, csemployee0_.name as name6_0_, csemployee0_.email as email6_0_ from CSEmployee csemployee0_ where csemployee0_.id=? for read only with rs
18:27:31,437 DEBUG EntityLoader:79 - Static select for entity training.CSEmployee: select csemployee0_.id as id6_0_, csemployee0_.name as name6_0_, csemployee0_.email as email6_0_ from CSEmployee csemployee0_ where csemployee0_.id=? for read only with rs
18:27:31,437 DEBUG EntityLoader:34 - Static select for action ACTION_MERGE on entity training.CSEmployee: select csemployee0_.id as id6_0_, csemployee0_.name as name6_0_, csemployee0_.email as email6_0_ from CSEmployee csemployee0_ where csemployee0_.id=?
18:27:31,437 DEBUG EntityLoader:34 - Static select for action ACTION_REFRESH on entity training.CSEmployee: select csemployee0_.id as id6_0_, csemployee0_.name as name6_0_, csemployee0_.email as email6_0_ from CSEmployee csemployee0_ where csemployee0_.id=?
18:27:31,437 DEBUG EntityLoader:79 - Static select for entity training.Computer: select computer0_.computerId as computerId5_0_, computer0_.id as id5_0_, computer0_.computerMake as computer3_5_0_, computer0_.computerType as computer4_5_0_ from MSComputer computer0_ where computer0_.computerId=?
18:27:31,437 DEBUG EntityLoader:79 - Static select for entity training.Computer: select computer0_.computerId as computerId5_0_, computer0_.id as id5_0_, computer0_.computerMake as computer3_5_0_, computer0_.computerType as computer4_5_0_ from MSComputer computer0_ where computer0_.computerId=?
18:27:31,437 DEBUG EntityLoader:79 - Static select for entity training.Computer: select computer0_.computerId as computerId5_0_, computer0_.id as id5_0_, computer0_.computerMake as computer3_5_0_, computer0_.computerType as computer4_5_0_ from MSComputer computer0_ where computer0_.computerId=? for read only with rs
18:27:31,437 DEBUG EntityLoader:79 - Static select for entity training.Computer: select computer0_.computerId as computerId5_0_, computer0_.id as id5_0_, computer0_.computerMake as computer3_5_0_, computer0_.computerType as computer4_5_0_ from MSComputer computer0_ where computer0_.computerId=? for read only with rs
18:27:31,437 DEBUG EntityLoader:79 - Static select for entity training.Computer: select computer0_.computerId as computerId5_0_, computer0_.id as id5_0_, computer0_.computerMake as computer3_5_0_, computer0_.computerType as computer4_5_0_ from MSComputer computer0_ where computer0_.computerId=? for read only with rs
18:27:31,437 DEBUG EntityLoader:34 - Static select for action ACTION_MERGE on entity training.Computer: select computer0_.computerId as computerId5_0_, computer0_.id as id5_0_, computer0_.computerMake as computer3_5_0_, computer0_.computerType as computer4_5_0_ from MSComputer computer0_ where computer0_.computerId=?
18:27:31,437 DEBUG EntityLoader:34 - Static select for action ACTION_REFRESH on entity training.Computer: select computer0_.computerId as computerId5_0_, computer0_.id as id5_0_, computer0_.computerMake as computer3_5_0_, computer0_.computerType as computer4_5_0_ from MSComputer computer0_ where computer0_.computerId=?
18:27:31,437 DEBUG EntityLoader:79 - Static select for entity training.Computer: select computer0_.computerId as computerId5_0_, computer0_.id as id5_0_, computer0_.computerMake as computer3_5_0_, computer0_.computerType as computer4_5_0_ from MSComputer computer0_ where computer0_.id=?
18:27:31,437 DEBUG EntityLoader:79 - Static select for entity training.Employee: select employee0_.eid as eid4_0_, employee0_.name as name4_0_, employee0_.email as email4_0_, employee0_.cabin as cabin4_0_, employee0_.designation as designat2_4_0_ from employee employee0_ where employee0_.eid=?
18:27:31,437 DEBUG EntityLoader:79 - Static select for entity training.Employee: select employee0_.eid as eid4_0_, employee0_.name as name4_0_, employee0_.email as email4_0_, employee0_.cabin as cabin4_0_, employee0_.designation as designat2_4_0_ from employee employee0_ where employee0_.eid=?
18:27:31,437 DEBUG EntityLoader:79 - Static select for entity training.Employee: select employee0_.eid as eid4_0_, employee0_.name as name4_0_, employee0_.email as email4_0_, employee0_.cabin as cabin4_0_, employee0_.designation as designat2_4_0_ from employee employee0_ where employee0_.eid=? for read only with rs
18:27:31,437 DEBUG EntityLoader:79 - Static select for entity training.Employee: select employee0_.eid as eid4_0_, employee0_.name as name4_0_, employee0_.email as email4_0_, employee0_.cabin as cabin4_0_, employee0_.designation as designat2_4_0_ from employee employee0_ where employee0_.eid=? for read only with rs
18:27:31,437 DEBUG EntityLoader:79 - Static select for entity training.Employee: select employee0_.eid as eid4_0_, employee0_.name as name4_0_, employee0_.email as email4_0_, employee0_.cabin as cabin4_0_, employee0_.designation as designat2_4_0_ from employee employee0_ where employee0_.eid=? for read only with rs
18:27:31,437 DEBUG EntityLoader:34 - Static select for action ACTION_MERGE on entity training.Employee: select employee0_.eid as eid4_0_, employee0_.name as name4_0_, employee0_.email as email4_0_, employee0_.cabin as cabin4_0_, employee0_.designation as designat2_4_0_ from employee employee0_ where employee0_.eid=?
18:27:31,437 DEBUG EntityLoader:34 - Static select for action ACTION_REFRESH on entity training.Employee: select employee0_.eid as eid4_0_, employee0_.name as name4_0_, employee0_.email as email4_0_, employee0_.cabin as cabin4_0_, employee0_.designation as designat2_4_0_ from employee employee0_ where employee0_.eid=?
18:27:31,453 DEBUG BasicCollectionLoader:64 - Static select for collection training.Account.transactions: select transactio0_.acc_id as acc1_0_, transactio0_.acc_transaction as acc2_0_, transactio0_.acc_index as acc3_0_ from ACCOUNT_TRANSACTION transactio0_ where transactio0_.acc_id=?
18:27:31,453 DEBUG BasicCollectionLoader:64 - Static select for collection training.Account.addresses: select addresses0_.acc_id as acc1_0_, addresses0_.apt as apt0_, addresses0_.city as city0_, addresses0_.lane as lane0_, addresses0_.state as state0_, addresses0_.zip as zip0_ from ACCOUNT_ADDRESS addresses0_ where addresses0_.acc_id=?
18:27:31,453 DEBUG BasicCollectionLoader:64 - Static select for collection training.Account.pins: select pins0_.acc_id as acc1_0_, pins0_.pin as pin0_, pins0_.pin_desc as pin3_0_ from ACCOUNT_PIN pins0_ where pins0_.acc_id=?
18:27:31,453 DEBUG SessionFactoryObjectFactory:39 - initializing class SessionFactoryObjectFactory
18:27:31,453 DEBUG SessionFactoryObjectFactory:76 - registered: 402881821bacb163011bacb1643d0000 (unnamed)
18:27:31,453 INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured
18:27:31,453 DEBUG SessionFactoryImpl:308 - instantiated session factory
18:27:31,453 DEBUG Configuration:1126 - processing extends queue
18:27:31,453 DEBUG Configuration:1130 - processing collection mappings
18:27:31,453 DEBUG Configuration:1141 - processing native query and ResultSetMapping mappings
18:27:31,453 DEBUG Configuration:1149 - processing association property references
18:27:31,453 DEBUG Configuration:1171 - processing foreign key constraints
18:27:31,453 DEBUG Configuration:1254 - resolving reference to class: training.Account
18:27:31,453 DEBUG Configuration:1254 - resolving reference to class: training.Account
18:27:31,453 DEBUG Configuration:1254 - resolving reference to class: training.Account
18:27:31,453 DEBUG Configuration:1126 - processing extends queue
18:27:31,453 DEBUG Configuration:1130 - processing collection mappings
18:27:31,453 DEBUG Configuration:1141 - processing native query and ResultSetMapping mappings
18:27:31,453 DEBUG Configuration:1149 - processing association property references
18:27:31,453 DEBUG Configuration:1171 - processing foreign key constraints
18:27:31,453 DEBUG Configuration:1254 - resolving reference to class: training.Account
18:27:31,468 DEBUG Configuration:1254 - resolving reference to class: training.Account
18:27:31,468 DEBUG Configuration:1254 - resolving reference to class: training.Account
18:27:31,468 INFO SchemaExport:154 - Running hbm2ddl schema export
18:27:31,468 DEBUG SchemaExport:170 - import file not found: /import.sql
18:27:31,468 INFO SchemaExport:179 - exporting generated schema to database
18:27:31,468 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0
18:27:31,468 DEBUG DriverManagerConnectionProvider:99 - using pooled JDBC connection, pool size: 0
18:27:31,468 DEBUG SchemaExport:303 - drop procedure SELECT_ALL_EMP
18:27:31,593 DEBUG SchemaExport:288 - Unsuccessful: drop procedure SELECT_ALL_EMP
18:27:31,593 DEBUG SchemaExport:289 - 'DROP PROCEDURE' cannot be performed on 'SELECT_ALL_EMP' because it does not exist.
18:27:31,593 DEBUG SchemaExport:303 - alter table ACCOUNT_ADDRESS drop constraint FKB19587A214785E92
18:27:31,609 DEBUG SchemaExport:288 - Unsuccessful: alter table ACCOUNT_ADDRESS drop constraint FKB19587A214785E92
18:27:31,609 DEBUG SchemaExport:289 - 'ALTER TABLE' cannot be performed on 'ACCOUNT_ADDRESS' because it does not exist.
18:27:31,609 DEBUG SchemaExport:303 - alter table ACCOUNT_PIN drop constraint FKB407AC4314785E92
18:27:31,609 DEBUG SchemaExport:288 - Unsuccessful: alter table ACCOUNT_PIN drop constraint FKB407AC4314785E92
18:27:31,609 DEBUG SchemaExport:289 - 'ALTER TABLE' cannot be performed on 'ACCOUNT_PIN' because it does not exist.
18:27:31,609 DEBUG SchemaExport:303 - alter table ACCOUNT_TRANSACTION drop constraint FK28362F8C14785E92
18:27:31,609 DEBUG SchemaExport:288 - Unsuccessful: alter table ACCOUNT_TRANSACTION drop constraint FK28362F8C14785E92
18:27:31,609 DEBUG SchemaExport:289 - 'ALTER TABLE' cannot be performed on 'ACCOUNT_TRANSACTION' because it does not exist.
18:27:31,609 DEBUG SchemaExport:303 - drop table ACCOUNT_ADDRESS
18:27:31,609 DEBUG SchemaExport:288 - Unsuccessful: drop table ACCOUNT_ADDRESS
18:27:31,609 DEBUG SchemaExport:289 - 'DROP TABLE' cannot be performed on 'ACCOUNT_ADDRESS' because it does not exist.
18:27:31,609 DEBUG SchemaExport:303 - drop table ACCOUNT_PIN
18:27:31,609 DEBUG SchemaExport:288 - Unsuccessful: drop table ACCOUNT_PIN
18:27:31,609 DEBUG SchemaExport:289 - 'DROP TABLE' cannot be performed on 'ACCOUNT_PIN' because it does not exist.
18:27:31,609 DEBUG SchemaExport:303 - drop table ACCOUNT_TRANSACTION
18:27:31,609 DEBUG SchemaExport:288 - Unsuccessful: drop table ACCOUNT_TRANSACTION
18:27:31,609 DEBUG SchemaExport:289 - 'DROP TABLE' cannot be performed on 'ACCOUNT_TRANSACTION' because it does not exist.
18:27:31,609 DEBUG SchemaExport:303 - drop table Account
18:27:31,609 DEBUG SchemaExport:288 - Unsuccessful: drop table Account
18:27:31,609 DEBUG SchemaExport:289 - 'DROP TABLE' cannot be performed on 'ACCOUNT' because it does not exist.
18:27:31,609 DEBUG SchemaExport:303 - drop table CSEmployee
18:27:31,609 DEBUG SchemaExport:288 - Unsuccessful: drop table CSEmployee
18:27:31,609 DEBUG SchemaExport:289 - 'DROP TABLE' cannot be performed on 'CSEMPLOYEE' because it does not exist.
18:27:31,609 DEBUG SchemaExport:303 - drop table MSComputer
18:27:31,609 DEBUG SchemaExport:288 - Unsuccessful: drop table MSComputer
18:27:31,609 DEBUG SchemaExport:289 - 'DROP TABLE' cannot be performed on 'MSCOMPUTER' because it does not exist.
18:27:31,609 DEBUG SchemaExport:303 - drop table employee
18:27:31,625 DEBUG SchemaExport:288 - Unsuccessful: drop table employee
18:27:31,625 DEBUG SchemaExport:289 - 'DROP TABLE' cannot be performed on 'EMPLOYEE' because it does not exist.
18:27:31,625 DEBUG SchemaExport:303 - create table ACCOUNT_ADDRESS (acc_id integer not null, apt varchar(255), city varchar(255), lane varchar(255), state varchar(255), zip varchar(255))
18:27:31,703 DEBUG SchemaExport:303 - create table ACCOUNT_PIN (acc_id integer not null, pin varchar(255), pin_desc varchar(255) not null, primary key (acc_id, pin_desc))
18:27:31,843 DEBUG SchemaExport:303 - create table ACCOUNT_TRANSACTION (acc_id integer not null, acc_transaction varchar(255), acc_index integer not null, primary key (acc_id, acc_index))
18:27:31,968 DEBUG SchemaExport:303 - create table Account (acc_id integer not null, acc_type varchar(255), acc_bal double, primary key (acc_id))
18:27:32,125 DEBUG SchemaExport:303 - create table CSEmployee (id bigint not null, name varchar(255), email varchar(255), primary key (id))
18:27:32,250 DEBUG SchemaExport:303 - create table MSComputer (computerId bigint not null, id bigint, computerMake varchar(255), computerType varchar(255), primary key (computerId))
18:27:32,375 DEBUG SchemaExport:303 - create table employee (eid integer not null, designation varchar(255) not null, name varchar(255), email varchar(255), cabin varchar(255), primary key (eid))
18:27:32,500 DEBUG SchemaExport:303 - alter table ACCOUNT_ADDRESS add constraint FKB19587A214785E92 foreign key (acc_id) references Account
18:27:32,593 DEBUG SchemaExport:303 - alter table ACCOUNT_PIN add constraint FKB407AC4314785E92 foreign key (acc_id) references Account
18:27:32,671 DEBUG SchemaExport:303 - alter table ACCOUNT_TRANSACTION add constraint FK28362F8C14785E92 foreign key (acc_id) references Account
18:27:32,765 DEBUG SchemaExport:303 - create or replace procedure SELECT_ALL_EMP ( OUT_RESULT out SYS_REFCURSOR, ) as begin open OUT_RESULT for select id,name,email from Employee e
18:27:32,765 ERROR SchemaExport:274 - Unsuccessful: create or replace procedure SELECT_ALL_EMP ( OUT_RESULT out SYS_REFCURSOR, ) as begin open OUT_RESULT for select id,name,email from Employee e
18:27:32,765 ERROR SchemaExport:275 - Syntax error: Encountered "or" at line 1, column 8.
18:27:32,765 INFO SchemaExport:196 - schema export complete
18:27:32,765 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 1
18:27:32,765 DEBUG SessionFactoryImpl:392 - Checking 0 named HQL queries
18:27:32,765 DEBUG SessionFactoryImpl:412 - Checking 0 named SQL queries
18:27:32,796 DEBUG SessionImpl:220 - opened session at timestamp: 12183730527
18:27:32,796 DEBUG JDBCTransaction:54 - begin
18:27:32,796 DEBUG ConnectionManager:421 - opening JDBC connection
18:27:32,796 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0
18:27:32,796 DEBUG DriverManagerConnectionProvider:99 - using pooled JDBC connection, pool size: 0
18:27:32,812 DEBUG JDBCTransaction:59 - current autocommit status: false
18:27:32,812 DEBUG JDBCContext:214 - after transaction begin
18:27:32,812 DEBUG DefaultSaveOrUpdateEventListener:158 - saving transient instance
18:27:32,812 DEBUG IncrementGenerator:80 - fetching initial value: select max(id) from CSEmployee
18:27:32,812 DEBUG AbstractBatcher:366 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
18:27:32,812 DEBUG SQL:401 - select max(id) from CSEmployee
18:27:32,812 DEBUG AbstractBatcher:484 - preparing statement
18:27:32,953 DEBUG IncrementGenerator:95 - first free id: 1
18:27:32,953 DEBUG AbstractBatcher:374 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
18:27:32,953 DEBUG AbstractBatcher:533 - closing statement
18:27:32,953 DEBUG AbstractSaveEventListener:112 - generated identifier: 1, using strategy: org.hibernate.id.IncrementGenerator
18:27:32,953 DEBUG AbstractSaveEventListener:153 - saving [training.CSEmployee#1]
18:27:32,968 DEBUG Cascade:115 - processing cascade ACTION_SAVE_UPDATE for: training.CSEmployee
18:27:32,968 DEBUG Cascade:150 - done processing cascade ACTION_SAVE_UPDATE for: training.CSEmployee
18:27:32,968 DEBUG Cascade:115 - processing cascade ACTION_SAVE_UPDATE for: training.CSEmployee
18:27:32,968 DEBUG CascadingAction:216 - cascading to saveOrUpdate: training.Computer
18:27:32,968 DEBUG AbstractSaveEventListener:514 - transient instance of: training.Computer
18:27:32,968 DEBUG DefaultSaveOrUpdateEventListener:158 - saving transient instance
18:27:32,968 DEBUG IncrementGenerator:80 - fetching initial value: select max(computerId) from MSComputer
18:27:32,968 DEBUG AbstractBatcher:366 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
18:27:32,968 DEBUG SQL:401 - select max(computerId) from MSComputer
18:27:32,968 DEBUG AbstractBatcher:484 - preparing statement
18:27:32,984 DEBUG IncrementGenerator:95 - first free id: 1
18:27:32,984 DEBUG AbstractBatcher:374 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
18:27:32,984 DEBUG AbstractBatcher:533 - closing statement
18:27:32,984 DEBUG AbstractSaveEventListener:112 - generated identifier: 1, using strategy: org.hibernate.id.IncrementGenerator
18:27:32,984 DEBUG AbstractSaveEventListener:153 - saving [training.Computer#1]
18:27:32,984 DEBUG Cascade:150 - done processing cascade ACTION_SAVE_UPDATE for: training.CSEmployee
18:27:32,984 DEBUG DefaultSaveOrUpdateEventListener:158 - saving transient instance
18:27:32,984 DEBUG AbstractSaveEventListener:112 - generated identifier: 2, using strategy: org.hibernate.id.IncrementGenerator
18:27:32,984 DEBUG AbstractSaveEventListener:153 - saving [training.CSEmployee#2]
18:27:32,984 DEBUG Cascade:115 - processing cascade ACTION_SAVE_UPDATE for: training.CSEmployee
18:27:32,984 DEBUG Cascade:150 - done processing cascade ACTION_SAVE_UPDATE for: training.CSEmployee
18:27:32,984 DEBUG Cascade:115 - processing cascade ACTION_SAVE_UPDATE for: training.CSEmployee
18:27:32,984 DEBUG CascadingAction:216 - cascading to saveOrUpdate: training.Computer
18:27:32,984 DEBUG AbstractSaveEventListener:514 - transient instance of: training.Computer
18:27:32,984 DEBUG DefaultSaveOrUpdateEventListener:158 - saving transient instance
18:27:32,984 DEBUG AbstractSaveEventListener:112 - generated identifier: 2, using strategy: org.hibernate.id.IncrementGenerator
18:27:32,984 DEBUG AbstractSaveEventListener:153 - saving [training.Computer#2]
18:27:32,984 DEBUG Cascade:150 - done processing cascade ACTION_SAVE_UPDATE for: training.CSEmployee
18:27:32,984 DEBUG JDBCTransaction:103 - commit
18:27:32,984 DEBUG SessionImpl:337 - automatically flushing session
18:27:32,984 DEBUG AbstractFlushingEventListener:58 - flushing session
18:27:32,984 DEBUG AbstractFlushingEventListener:111 - processing flush-time cascades
18:27:32,984 DEBUG Cascade:115 - processing cascade ACTION_SAVE_UPDATE for: training.CSEmployee
18:27:32,984 DEBUG CascadingAction:216 - cascading to saveOrUpdate: training.Computer
18:27:32,984 DEBUG AbstractSaveEventListener:488 - persistent instance of: training.Computer
18:27:32,984 DEBUG DefaultSaveOrUpdateEventListener:99 - ignoring persistent instance
18:27:32,984 DEBUG DefaultSaveOrUpdateEventListener:136 - object already associated with session: [training.Computer#1]
18:27:32,984 DEBUG Cascade:150 - done processing cascade ACTION_SAVE_UPDATE for: training.CSEmployee
18:27:32,984 DEBUG Cascade:115 - processing cascade ACTION_SAVE_UPDATE for: training.CSEmployee
18:27:32,984 DEBUG CascadingAction:216 - cascading to saveOrUpdate: training.Computer
18:27:33,000 DEBUG AbstractSaveEventListener:488 - persistent instance of: training.Computer
18:27:33,000 DEBUG DefaultSaveOrUpdateEventListener:99 - ignoring persistent instance
18:27:33,000 DEBUG DefaultSaveOrUpdateEventListener:136 - object already associated with session: [training.Computer#2]
18:27:33,000 DEBUG Cascade:150 - done processing cascade ACTION_SAVE_UPDATE for: training.CSEmployee
18:27:33,000 DEBUG AbstractFlushingEventListener:154 - dirty checking collections
18:27:33,000 DEBUG AbstractFlushingEventListener:171 - Flushing entities and processing referenced collections
18:27:33,000 DEBUG AbstractFlushingEventListener:210 - Processing unreferenced collections
18:27:33,000 DEBUG AbstractFlushingEventListener:224 - Scheduling collection removes/(re)creates/updates
18:27:33,000 DEBUG AbstractFlushingEventListener:85 - Flushed: 4 insertions, 0 updates, 0 deletions to 4 objects
18:27:33,000 DEBUG AbstractFlushingEventListener:91 - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
18:27:33,000 DEBUG Printer:83 - listing entities:
18:27:33,000 DEBUG Printer:90 - training.CSEmployee{computer=training.Computer#1, id=1, email=indiapinky@yahoo.com, name=Pinky Mehta}
18:27:33,000 DEBUG Printer:90 - training.CSEmployee{computer=training.Computer#2, id=2, email=imiten@yahoo.com, name=Miten Mehta}
18:27:33,000 DEBUG Printer:90 - training.Computer{id=null, computerId=1, computerMake=HP, computerType=P4 3.2 GHz}
18:27:33,000 DEBUG Printer:90 - training.Computer{id=null, computerId=2, computerMake=Circle, computerType=P4 3.2 GHz}
18:27:33,000 DEBUG AbstractFlushingEventListener:290 - executing flush
18:27:33,000 DEBUG ConnectionManager:469 - registering flush begin
18:27:33,000 DEBUG AbstractEntityPersister:2209 - Inserting entity: [training.CSEmployee#1]
18:27:33,000 DEBUG AbstractBatcher:366 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
18:27:33,000 DEBUG SQL:401 - insert into CSEmployee (name, email, id) values (?, ?, ?)
18:27:33,000 DEBUG AbstractBatcher:484 - preparing statement
18:27:33,031 DEBUG AbstractEntityPersister:1997 - Dehydrating entity: [training.CSEmployee#1]
18:27:33,031 DEBUG AbstractEntityPersister:2209 - Inserting entity: [training.Computer#1]
18:27:33,031 DEBUG AbstractBatcher:374 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
18:27:33,031 DEBUG AbstractBatcher:533 - closing statement
18:27:33,031 DEBUG AbstractBatcher:366 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
18:27:33,031 DEBUG SQL:401 - insert into MSComputer (id, computerMake, computerType, computerId) values (?, ?, ?, ?)
18:27:33,031 DEBUG AbstractBatcher:484 - preparing statement
18:27:33,046 DEBUG AbstractEntityPersister:1997 - Dehydrating entity: [training.Computer#1]
18:27:33,046 DEBUG AbstractEntityPersister:2209 - Inserting entity: [training.CSEmployee#2]
18:27:33,046 DEBUG AbstractBatcher:374 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
18:27:33,046 DEBUG AbstractBatcher:533 - closing statement
18:27:33,046 DEBUG AbstractBatcher:366 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
18:27:33,046 DEBUG SQL:401 - insert into CSEmployee (name, email, id) values (?, ?, ?)
18:27:33,046 DEBUG AbstractBatcher:484 - preparing statement
18:27:33,046 DEBUG AbstractEntityPersister:1997 - Dehydrating entity: [training.CSEmployee#2]
18:27:33,046 DEBUG AbstractEntityPersister:2209 - Inserting entity: [training.Computer#2]
18:27:33,046 DEBUG AbstractBatcher:374 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
18:27:33,046 DEBUG AbstractBatcher:533 - closing statement
18:27:33,046 DEBUG AbstractBatcher:366 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
18:27:33,046 DEBUG SQL:401 - insert into MSComputer (id, computerMake, computerType, computerId) values (?, ?, ?, ?)
18:27:33,046 DEBUG AbstractBatcher:484 - preparing statement
18:27:33,046 DEBUG AbstractEntityPersister:1997 - Dehydrating entity: [training.Computer#2]
18:27:33,046 DEBUG AbstractBatcher:374 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
18:27:33,046 DEBUG AbstractBatcher:533 - closing statement
18:27:33,046 DEBUG ConnectionManager:478 - registering flush end
18:27:33,046 DEBUG AbstractFlushingEventListener:321 - post flush
18:27:33,046 DEBUG JDBCContext:205 - before transaction completion
18:27:33,046 DEBUG SessionImpl:393 - before transaction completion
18:27:33,046 DEBUG JDBCTransaction:116 - committed JDBC Connection
18:27:33,046 DEBUG JDBCContext:219 - after transaction completion
18:27:33,046 DEBUG ConnectionManager:404 - aggressively releasing JDBC connection
18:27:33,046 DEBUG ConnectionManager:441 - releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
18:27:33,296 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 1
18:27:33,296 DEBUG SessionImpl:422 - after transaction completion
18:27:33,296 DEBUG SessionImpl:273 - closing session
18:27:33,296 DEBUG ConnectionManager:375 - connection already null in cleanup : no action
18:27:33,296 INFO SessionFactoryImpl:769 - closing
18:27:33,296 INFO DriverManagerConnectionProvider:147 - cleaning up connection pool: jdbc:derby:D:\DerbyDatabases\MyDB;create=true
Problems with Session and transaction handling?
Read this:
http://hibernate.org/42.html