-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: XML Mapping in Hibernate
PostPosted: Tue May 20, 2008 1:44 am 
Newbie

Joined: Mon May 12, 2008 2:49 am
Posts: 3
I am using Hibernate's XML mapping feature to retrieve the datas in the form of XML. I have problem in getting the XML generated. I am getting the following exeption displayed in the console.

I am handling with three Tables -

PERSONS(PERSON_ID(PK),FIRST_NAME,LAST_NAME),

FLIGHTS(FLIGHT_ID(PK),NAME,DEPARTURE_UTC,ARRIVAL_UTC,),

RESERVATIONS(RESERVATION_ID(PK),PERSON_ID_FK(PK.FK),FLIGHT_ID_FK(PK,FK),REGISTRATION_UTC,COMMENT)

In the Reservation Table, combination of reservationId and personid and flightId forms a primary key. i.e a composite key.


My configuration file:

<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.ibm.db2.jcc.DB2Driver</property>
<property name="hibernate.connection.url">jdbc:db2://XXXX/SAMPLE</property>
<property name="hibernate.connection.username">XXX</property>
<property name="hibernate.connection.password">XXXX</property>
<property name="hibernate.connection.pool_size">10</property>
<property name="show_sql">true</property>
<property name="dialect">org.hibernate.dialect.DB2Dialect</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<!-- Mapping files -->
<mapping resource="Flight.hbm.xml"/>
<mapping resource="Person.hbm.xml"/>
<mapping resource="Reservation.hbm.xml"/>
</session-factory>
</hibernate-configuration>


Person.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>
<!--
Created by Middlegen Hibernate plugin

http://boss.bekk.no/boss/middlegen/
http://hibernate.sourceforge.net/
-->

<class
name="com.metlife.stm.Person"
table="persons"
node = ""
>

<id
name="personId"
type="int"
column="person_id"
node = "personId"
>
<generator class="assigned" />
</id>

<property
name="firstName"
type="java.lang.String"
column="first_name"
not-null="true"
node = "firstName"
/>
<property
name="lastName"
type="java.lang.String"
column="last_name"
not-null="true"
node = "lastName"
/>

<!-- associations -->
<!-- bi-directional one-to-many association to Reservation -->
<set
name="reservations"
lazy="true"
inverse="true"
node = "reservations_person"
>
<key>
<column name="person_id_fk" />
</key>
<one-to-many
class="com.metlife.stm.Reservation"
/>
</set>

</class>
</hibernate-mapping>


Flight.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>
<!--
Created by Middlegen Hibernate plugin

http://boss.bekk.no/boss/middlegen/
http://hibernate.sourceforge.net/
-->

<class
name="com.metlife.stm.Flight"
table="flights" node = "Flight"
>

<id
name="flightId"
type="int"
column="flight_id"
node = "flightId"
>
<generator class="assigned" />
</id>

<property
name="name"
type="java.lang.String"
column="name"
not-null="true"
length="32"
node = "name"
/>
<property
name="departureUtc"
type="java.sql.Timestamp"
column="departure_utc"
not-null="true"
node = "departureUtc"
/>
<property
name="arrivalUtc"
type="java.sql.Timestamp"
column="arrival_utc"
not-null="true"
node = "arrivalUtc"
/>

<!-- associations -->
<!-- bi-directional one-to-many association to Reservation -->
<set
name="reservations"
lazy="true"
inverse="true"
node = "reservations"
>
<key>
<column name="flight_id_fk" />
</key>
<one-to-many
class="com.metlife.stm.Reservation"
/>
</set>

</class>
</hibernate-mapping>


Reservation.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>
<!--
Created by Middlegen Hibernate plugin

http://boss.bekk.no/boss/middlegen/
http://hibernate.sourceforge.net/
-->

<class
name="com.metlife.stm.Reservation"
table="reservations"
node = "Reservation"
>

<composite-id name="comp_id" class="com.metlife.stm.ReservationPK" node = "comp_id">
<key-property
name="reservationId"
column="reservation_id"
type="int"
/>
<!-- bi-directional many-to-one association to Person -->
<key-many-to-one
name="person"
class="com.metlife.stm.Person"
>
<column name="person_id_fk" />
</key-many-to-one>
<!-- bi-directional many-to-one association to Flight -->
<key-many-to-one
name="flight"
class="com.metlife.stm.Flight"
>
<column name="flight_id_fk" />
</key-many-to-one>
</composite-id>

<property
name="registrationUtc"
type="java.sql.Timestamp"
column="registration_utc"
not-null="true"
node = "registrationUtc"
/>
<property
name="comment"
type="java.lang.String"
column="comment"
node = "comment"
/>

<!-- associations -->

</class>
</hibernate-mapping>


Person.java:

package com.metlife.stm;

import java.io.Serializable;
import java.util.Set;
import org.apache.commons.lang.builder.ToStringBuilder;


/** @author Hibernate CodeGenerator */
public class Person implements Serializable {

/** identifier field */
private Integer personId;

/** persistent field */
private String firstName;

/** persistent field */
private String lastName;

/** persistent field */
private Set reservations;

/** full constructor */
public Person(Integer personId, String firstName, String lastName, Set reservations) {
this.personId = personId;
this.firstName = firstName;
this.lastName = lastName;
this.reservations = reservations;
}

/** default constructor */
public Person() {
}

public Integer getPersonId() {
return this.personId;
}

public void setPersonId(Integer personId) {
this.personId = personId;
}

public String getFirstName() {
return this.firstName;
}

public void setFirstName(String firstName) {
this.firstName = firstName;
}

public String getLastName() {
return this.lastName;
}

public void setLastName(String lastName) {
this.lastName = lastName;
}

public Set getReservations() {
return this.reservations;
}

public void setReservations(Set reservations) {
this.reservations = reservations;
}

public String toString() {
return new ToStringBuilder(this)
.append("personId", getPersonId())
.toString();
}

}


Flight.java:

package com.metlife.stm;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;
import org.apache.commons.lang.builder.ToStringBuilder;


/** @author Hibernate CodeGenerator */
public class Flight implements Serializable {

/** identifier field */
private Integer flightId;

/** persistent field */
private String name;

/** persistent field */
private Date departureUtc;

/** persistent field */
private Date arrivalUtc;

/** persistent field */
private Set reservations;

/** full constructor */
public Flight(Integer flightId, String name, Date departureUtc, Date arrivalUtc, Set reservations) {
this.flightId = flightId;
this.name = name;
this.departureUtc = departureUtc;
this.arrivalUtc = arrivalUtc;
this.reservations = reservations;
}

/** default constructor */
public Flight() {
}

public Integer getFlightId() {
return this.flightId;
}

public void setFlightId(Integer flightId) {
this.flightId = flightId;
}

public String getName() {
return this.name;
}

public void setName(String name) {
this.name = name;
}

public Date getDepartureUtc() {
return this.departureUtc;
}

public void setDepartureUtc(Date departureUtc) {
this.departureUtc = departureUtc;
}

public Date getArrivalUtc() {
return this.arrivalUtc;
}

public void setArrivalUtc(Date arrivalUtc) {
this.arrivalUtc = arrivalUtc;
}

public Set getReservations() {
return this.reservations;
}

public void setReservations(Set reservations) {
this.reservations = reservations;
}

public String toString() {
return new ToStringBuilder(this)
.append("flightId", getFlightId())
.toString();
}

}


Reservation.java:

package com.metlife.stm;

import java.io.Serializable;
import java.util.Date;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;


/** @author Hibernate CodeGenerator */
public class Reservation implements Serializable {

/** identifier field */
private com.metlife.stm.ReservationPK comp_id;

/** persistent field */
private Date registrationUtc;

/** nullable persistent field */
private String comment;

/** full constructor */
public Reservation(com.metlife.stm.ReservationPK comp_id, Date registrationUtc, String comment) {
this.comp_id = comp_id;
this.registrationUtc = registrationUtc;
this.comment = comment;
}

/** default constructor */
public Reservation() {
}

/** minimal constructor */
public Reservation(com.metlife.stm.ReservationPK comp_id, Date registrationUtc) {
this.comp_id = comp_id;
this.registrationUtc = registrationUtc;
}

public com.metlife.stm.ReservationPK getComp_id() {
return this.comp_id;
}

public void setComp_id(com.metlife.stm.ReservationPK comp_id) {
this.comp_id = comp_id;
}

public Date getRegistrationUtc() {
return this.registrationUtc;
}

public void setRegistrationUtc(Date registrationUtc) {
this.registrationUtc = registrationUtc;
}

public String getComment() {
return this.comment;
}

public void setComment(String comment) {
this.comment = comment;
}

public String toString() {
return new ToStringBuilder(this)
.append("comp_id", getComp_id())
.toString();
}

public boolean equals(Object other) {
if ( (this == other ) ) return true;
if ( !(other instanceof Reservation) ) return false;
Reservation castOther = (Reservation) other;
return new EqualsBuilder()
.append(this.getComp_id(), castOther.getComp_id())
.isEquals();
}

public int hashCode() {
return new HashCodeBuilder()
.append(getComp_id())
.toHashCode();
}

}


This is the code I am using to fetch the datas:

package com.metlife.stm;

import java.util.Iterator;
import java.util.List;

import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.hibernate.EntityMode;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;
import org.apache.log4j.*;

public class InsDetTest {

public static void main(String[] args){
BasicConfigurator.configure();
Session session = null;

InsDetTest ins = new InsDetTest();
try {
SessionFactory sessionFactory = new Configuration().configure()
.buildSessionFactory();
session = sessionFactory.openSession();
Session dom4jSession = session.getSession(EntityMode.DOM4J);
Transaction tx = session.beginTransaction();


ins.methodSelect2(dom4jSession);
//ins.methodInsert(session, tx);
//ins.Test(session, tx);

} catch (Exception e) {
e.printStackTrace();
System.out.println(e.getMessage());
} finally {
if (session != null) {
session.flush();
session.close();
}
}

}


private void methodSelect2(Session dom4jSession) {

Document doc = DocumentHelper.createDocument();
Element root = doc.addElement( "Root" );
System.out.println("Selecting Record1");
//int value =1;
//String HQL_QUERY = "from Insurance INSURANCE1";
Query qry = dom4jSession.createQuery("from Person");
//qry.setParameter("value", value);
List results = qry.list();
//Query query = dom4jSession.createQuery(HQL_QUERY);
for ( int i=0; i<results.size(); i++ ) {
//add the customer data to the XML document
System.out.println("@@@@@@@@@"+results.get(i));
Element insurance = (Element) results.get(i);
doc.add(insurance);
}
String xmlRetrieved = doc.asXML();
System.out.println(xmlRetrieved);
System.out.println("Selecting Done1");
}



private void methodCompanyTest(Session dom4jSession) {

Document doc = DocumentHelper.createDocument();
Element root = doc.addElement( "Root" );
System.out.println("Selecting Record2");
//String HQL_QUERY = "from Insurance INSURANCE1";
List results = dom4jSession.createQuery("from Company COMPANY").list();
//Query query = dom4jSession.createQuery(HQL_QUERY);
for ( int i=0; i<results.size(); i++ ) {
//add the customer data to the XML document
Element company = (Element) results.get(i);
root.add(company);
}
String xmlRetrieved = doc.asXML();
System.out.println(xmlRetrieved);
System.out.println("Selecting Done2");
}

private void Test(Session session, Transaction tx) {

String SQL_QUERY ="SELECT * FROM STMFE.RESERVATIONS";
Query query = session.createSQLQuery(SQL_QUERY);
List lst = query.list();
for ( int i=0; i<lst.size(); i++ ) {
Object[] row = (Object[]) lst.get(i);
System.out.println("ID: " + row[0]);
System.out.println("FIRSTNAME: " + row[1]);
System.out.println("LASTNAME: " + row[2]);
}
// String xmlRetrieved = doc.asXML();
// System.out.println(xmlRetrieved);
System.out.println("Selecting Done2");
}
}


Console Stack Trace:

0 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.1.3
31 [main] INFO org.hibernate.cfg.Environment - hibernate.properties not found
47 [main] INFO org.hibernate.cfg.Environment - using CGLIB reflection optimizer
47 [main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
203 [main] INFO org.hibernate.cfg.Configuration - configuring from resource: /hibernate.cfg.xml
203 [main] INFO org.hibernate.cfg.Configuration - Configuration resource: /hibernate.cfg.xml
375 [main] DEBUG org.hibernate.util.DTDEntityResolver - trying to resolve system-id [http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd]
375 [main] DEBUG org.hibernate.util.DTDEntityResolver - recognized hibernate namespace; attempting to resolve on classpath under org/hibernate/
375 [main] DEBUG org.hibernate.util.DTDEntityResolver - located [http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd] in classpath
469 [main] DEBUG org.hibernate.cfg.Configuration - hibernate.connection.driver_class=com.ibm.db2.jcc.DB2Driver
469 [main] DEBUG org.hibernate.cfg.Configuration - hibernate.connection.url=jdbc:db2://10.237.165.47:50000/SAMPLE
469 [main] DEBUG org.hibernate.cfg.Configuration - hibernate.connection.username=144382
469 [main] DEBUG org.hibernate.cfg.Configuration - hibernate.connection.password=Kothan001
469 [main] DEBUG org.hibernate.cfg.Configuration - hibernate.connection.pool_size=10
469 [main] DEBUG org.hibernate.cfg.Configuration - show_sql=true
469 [main] DEBUG org.hibernate.cfg.Configuration - dialect=org.hibernate.dialect.DB2Dialect
469 [main] DEBUG org.hibernate.cfg.Configuration - hibernate.hbm2ddl.auto=update
469 [main] DEBUG org.hibernate.cfg.Configuration - null<-org.dom4j.tree.DefaultAttribute@167c167c [Attribute: name resource value "Flight.hbm.xml"]
469 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource: Flight.hbm.xml
485 [main] DEBUG org.hibernate.util.DTDEntityResolver - trying to resolve system-id [http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd]
485 [main] DEBUG org.hibernate.util.DTDEntityResolver - recognized hibernate namespace; attempting to resolve on classpath under org/hibernate/
485 [main] DEBUG org.hibernate.util.DTDEntityResolver - located [http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd] in classpath
844 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: com.metlife.stm.Flight -> flights
844 [main] DEBUG org.hibernate.cfg.HbmBinder - Mapped property: flightId -> flight_id
860 [main] DEBUG org.hibernate.cfg.HbmBinder - Mapped property: name -> name
860 [main] DEBUG org.hibernate.cfg.HbmBinder - Mapped property: departureUtc -> departure_utc
860 [main] DEBUG org.hibernate.cfg.HbmBinder - Mapped property: arrivalUtc -> arrival_utc
875 [main] DEBUG org.hibernate.cfg.HbmBinder - Mapped property: reservations
875 [main] DEBUG org.hibernate.cfg.Configuration - null<-org.dom4j.tree.DefaultAttribute@169e169e [Attribute: name resource value "Person.hbm.xml"]
875 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource: Person.hbm.xml
875 [main] DEBUG org.hibernate.util.DTDEntityResolver - trying to resolve system-id [http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd]
875 [main] DEBUG org.hibernate.util.DTDEntityResolver - recognized hibernate namespace; attempting to resolve on classpath under org/hibernate/
907 [main] DEBUG org.hibernate.util.DTDEntityResolver - located [http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd] in classpath
1016 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: com.metlife.stm.Person -> persons
1016 [main] DEBUG org.hibernate.cfg.HbmBinder - Mapped property: personId -> person_id
1016 [main] DEBUG org.hibernate.cfg.HbmBinder - Mapped property: firstName -> first_name
1016 [main] DEBUG org.hibernate.cfg.HbmBinder - Mapped property: lastName -> last_name
1016 [main] DEBUG org.hibernate.cfg.HbmBinder - Mapped property: reservations
1032 [main] DEBUG org.hibernate.cfg.Configuration - null<-org.dom4j.tree.DefaultAttribute@16c216c2 [Attribute: name resource value "Reservation.hbm.xml"]
1032 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource: Reservation.hbm.xml
1032 [main] DEBUG org.hibernate.util.DTDEntityResolver - trying to resolve system-id [http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd]
1032 [main] DEBUG org.hibernate.util.DTDEntityResolver - recognized hibernate namespace; attempting to resolve on classpath under org/hibernate/
1032 [main] DEBUG org.hibernate.util.DTDEntityResolver - located [http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd] in classpath
1094 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: com.metlife.stm.Reservation -> reservations
1094 [main] DEBUG org.hibernate.cfg.HbmBinder - Mapped property: reservationId -> reservation_id
1188 [main] DEBUG org.hibernate.cfg.HbmBinder - Mapped property: person -> person_id_fk
1188 [main] DEBUG org.hibernate.cfg.HbmBinder - Mapped property: flight -> flight_id_fk
1188 [main] DEBUG org.hibernate.cfg.HbmBinder - Mapped property: comp_id -> reservation_id, person_id_fk, flight_id_fk
1188 [main] DEBUG org.hibernate.cfg.HbmBinder - Mapped property: registrationUtc -> registration_utc
1188 [main] DEBUG org.hibernate.cfg.HbmBinder - Mapped property: comment -> comment
1188 [main] INFO org.hibernate.cfg.Configuration - Configured SessionFactory: null
1188 [main] DEBUG org.hibernate.cfg.Configuration - properties: {java.vendor=IBM Corporation, show_sql=true, hibernate.connection.url=jdbc:db2://10.237.165.47:50000/SAMPLE, os.name=Windows XP, sun.boot.class.path=C:\Program Files\IBM\SDP70\jdk\jre\lib\vm.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\core.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\charsets.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\graphics.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\security.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\ibmpkcs.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\ibmorb.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\ibmcfw.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\ibmorbapi.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\ibmjcefw.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\ibmjgssprovider.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\ibmjsseprovider2.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\ibmjaaslm.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\ibmjaasactivelm.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\ibmcertpathprovider.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\server.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\xml.jar, sun.java2d.fontpath=, java.vm.specification.vendor=Sun Microsystems Inc., java.runtime.version=pwi32dev-20061002a (SR3), user.name=144382, java.compiler=j9jit23, com.ibm.util.extralibs.properties=, user.language=en, com.ibm.oti.vm.bootstrap.library.path=C:\Program Files\IBM\SDP70\jdk\jre\bin, sun.boot.library.path=C:\Program Files\IBM\SDP70\jdk\jre\bin, dialect=org.hibernate.dialect.DB2Dialect, java.version=1.5.0, user.timezone=, sun.arch.data.model=32, com.ibm.oti.vm.library.version=23, sun.jnu.encoding=Cp1252, jxe.current.romimage.version=9, file.separator=\, java.specification.name=Java Platform API Specification, hibernate.cglib.use_reflection_optimizer=true, java.class.version=49.0, user.country=US, java.home=C:\Program Files\IBM\SDP70\jdk\jre, java.vm.info=J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32 j9vmwi3223-20061001 (JIT enabled)
J9VM - 20060915_08260_lHdSMR
JIT - 20060908_1811_r8
GC - 20060906_AA, os.version=5.1 build 2600 Service Pack 2, java.awt.fonts=, path.separator=;, java.vm.version=2.3, java.util.prefs.PreferencesFactory=java.util.prefs.WindowsPreferencesFactory, hibernate.connection.password=Kothan001, user.variant=, java.awt.printerjob=sun.awt.windows.WPrinterJob, sun.io.unicode.encoding=UnicodeLittle, awt.toolkit=sun.awt.windows.WToolkit, ibm.signalhandling.sigint=true, hibernate.connection.username=144382, java.assistive=ON, user.home=C:\Documents and Settings\144382, com.ibm.cpu.endian=little, java.specification.vendor=Sun Microsystems Inc., ibm.signalhandling.sigchain=true, invokedviajava=, hibernate.hbm2ddl.auto=update, java.library.path=C:\Program Files\IBM\SDP70\jdk\jre\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\IBM\Personal Communications\;C:\Program Files\IBM\Trace Facility\;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;c:\program files\borland\StarTeam SDK 2005 R2\Lib;c:\program files\borland\StarTeam SDK 2005 R2\Bin;D:\PROGRA~1\IBM\SQLLIB\BIN;D:\PROGRA~1\IBM\SQLLIB\FUNCTION;D:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL;C:\Sun\jwsdp-1.5\jwsdp-shared\bin, java.vendor.url=http://www.ibm.com/, hibernate.connection.driver_class=com.ibm.db2.jcc.DB2Driver, java.vm.vendor=IBM Corporation, hibernate.dialect=org.hibernate.dialect.DB2Dialect, java.fullversion=J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32 j9vmwi3223-20061001 (JIT enabled)
J9VM - 20060915_08260_lHdSMR
JIT - 20060908_1811_r8
GC - 20060906_AA, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, java.class.path=D:\Mani\Workspace\Hibernate\HBXMLTest;D:\Mani\ALLjars on 10.239.23.231\asm.jar;D:\Mani\ALLjars on 10.239.23.231\asm-attrs.jar;D:\Mani\ALLjars on 10.239.23.231\commons-collections.jar;D:\Mani\ALLjars on 10.239.23.231\commons-logging.jar;D:\Mani\ALLjars on 10.239.23.231\HibernateJars\hibernate3.jar;D:\Mani\ALLjars on 10.239.23.231\jta.jar;D:\Mani\ALLjars on 10.239.23.231\dom4j.jar;D:\Mani\ALLjars on 10.239.23.231\log4j.jar;D:\Mani\ALLjars on 10.239.23.231\db2jcc.jar;D:\Mani\ALLjars on 10.239.23.231\db2jcc_license_cu.jar;D:\Mani\ALLjars on 10.239.23.231\cglib-2.1.3.jar;D:\Mani\ALLjars on 10.239.23.231\HibernateJars\ehcache-0.9.jar;D:\Mani\ALLjars on 10.239.23.231\commons-lang-2.0.jar;D:\Mani\ALLjars on 10.239.23.231\stmutil.jar;D:\Mani\ALLjars on 10.239.23.231\antlr-2.7.6.jar, java.vm.specification.name=Java Virtual Machine Specification, java.vm.specification.version=1.0, java.io.tmpdir=C:\DOCUME~1\144382\LOCALS~1\Temp\, java.jcl.version=20061002, ibm.system.encoding=Cp1252, os.arch=x86, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, ibm.signalhandling.rs=false, java.ext.dirs=C:\Program Files\IBM\SDP70\jdk\jre\lib\ext, user.dir=D:\Mani\Workspace\Hibernate\HBXMLTest, line.separator=
, java.vm.name=IBM J9 VM, com.ibm.vm.bitmode=32, jxe.lowest.romimage.version=9, file.encoding=Cp1252, com.ibm.oti.jcl.build=20060906_1248, java.specification.version=1.5, com.ibm.oti.configuration=scar, hibernate.show_sql=true, hibernate.connection.pool_size=10}
1188 [main] DEBUG org.hibernate.cfg.Configuration - Preparing to build session factory with filters : {}
1188 [main] DEBUG org.hibernate.cfg.Configuration - processing extends queue
1188 [main] DEBUG org.hibernate.cfg.Configuration - processing collection mappings
1188 [main] DEBUG org.hibernate.cfg.CollectionSecondPass - Second pass for collection: com.metlife.stm.Flight.reservations
1188 [main] INFO org.hibernate.cfg.HbmBinder - Mapping collection: com.metlife.stm.Flight.reservations -> reservations
1219 [main] DEBUG org.hibernate.cfg.CollectionSecondPass - Mapped collection key: flight_id_fk, one-to-many: com.metlife.stm.Reservation
1219 [main] DEBUG org.hibernate.cfg.CollectionSecondPass - Second pass for collection: com.metlife.stm.Person.reservations
1219 [main] INFO org.hibernate.cfg.HbmBinder - Mapping collection: com.metlife.stm.Person.reservations -> reservations
1219 [main] DEBUG org.hibernate.cfg.CollectionSecondPass - Mapped collection key: person_id_fk, one-to-many: com.metlife.stm.Reservation
1219 [main] DEBUG org.hibernate.cfg.Configuration - processing native query and ResultSetMapping mappings
1219 [main] DEBUG org.hibernate.cfg.Configuration - processing association property references
1219 [main] DEBUG org.hibernate.cfg.Configuration - processing foreign key constraints
1219 [main] DEBUG org.hibernate.cfg.Configuration - resolving reference to class: com.metlife.stm.Person
1219 [main] DEBUG org.hibernate.cfg.Configuration - resolving reference to class: com.metlife.stm.Flight
1422 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!)
1438 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Hibernate connection pool size: 10
1438 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - autocommit mode: false
1563 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - using driver: com.ibm.db2.jcc.DB2Driver at URL: jdbc:db2://10.237.165.47:50000/SAMPLE
1563 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - connection properties: {user=144382, password=Kothan001}
1563 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider - total checked-out connections: 0
1563 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider - opening new JDBC connection
1907 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider - created connection to: jdbc:db2://10.237.165.47:50000/SAMPLE, Isolation Level: 2
1907 [main] INFO org.hibernate.cfg.SettingsFactory - RDBMS: DB2/NT, version: SQL09010
1907 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC driver: IBM DB2 JDBC Universal Driver Architecture, version: 3.1.57
1907 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider - returning connection to pool, pool size: 1
1922 [main] INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.DB2Dialect
1953 [main] INFO org.hibernate.transaction.TransactionFactoryFactory - Using default transaction strategy (direct JDBC transactions)
1953 [main] INFO org.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
1953 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled
1953 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic session close at end of transaction: disabled
1953 [main] INFO org.hibernate.cfg.SettingsFactory - Scrollable result sets: enabled
1953 [main] DEBUG org.hibernate.cfg.SettingsFactory - Wrap result sets: disabled
1953 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): enabled
1953 [main] INFO org.hibernate.cfg.SettingsFactory - Connection release mode: auto
1953 [main] INFO org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1
1953 [main] INFO org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled
1953 [main] INFO org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key: disabled
1953 [main] INFO org.hibernate.cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
1953 [main] INFO org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
1953 [main] INFO org.hibernate.cfg.SettingsFactory - Query language substitutions: {}
1953 [main] INFO org.hibernate.cfg.SettingsFactory - Second-level cache: enabled
1953 [main] INFO org.hibernate.cfg.SettingsFactory - Query cache: disabled
1953 [main] INFO org.hibernate.cfg.SettingsFactory - Cache provider: org.hibernate.cache.EhCacheProvider
1953 [main] INFO org.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: disabled
1953 [main] INFO org.hibernate.cfg.SettingsFactory - Structured second-level cache entries: disabled
1953 [main] DEBUG org.hibernate.exception.SQLExceptionConverterFactory - Using dialect defined converter
1969 [main] INFO org.hibernate.cfg.SettingsFactory - Echoing all SQL to stdout
1969 [main] INFO org.hibernate.cfg.SettingsFactory - Statistics: disabled
1969 [main] INFO org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled
1969 [main] INFO org.hibernate.cfg.SettingsFactory - Default entity-mode: pojo
2000 [main] INFO org.hibernate.impl.SessionFactoryImpl - building session factory
2000 [main] DEBUG org.hibernate.impl.SessionFactoryImpl - Session factory constructed with filter configurations : {}
2000 [main] DEBUG org.hibernate.impl.SessionFactoryImpl - instantiating session factory with properties: {java.vendor=IBM Corporation, show_sql=true, hibernate.connection.url=jdbc:db2://10.237.165.47:50000/SAMPLE, os.name=Windows XP, sun.boot.class.path=C:\Program Files\IBM\SDP70\jdk\jre\lib\vm.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\core.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\charsets.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\graphics.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\security.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\ibmpkcs.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\ibmorb.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\ibmcfw.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\ibmorbapi.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\ibmjcefw.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\ibmjgssprovider.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\ibmjsseprovider2.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\ibmjaaslm.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\ibmjaasactivelm.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\ibmcertpathprovider.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\server.jar;C:\Program Files\IBM\SDP70\jdk\jre\lib\xml.jar, sun.java2d.fontpath=, java.vm.specification.vendor=Sun Microsystems Inc., java.runtime.version=pwi32dev-20061002a (SR3), user.name=144382, java.compiler=j9jit23, com.ibm.util.extralibs.properties=, user.language=en, com.ibm.oti.vm.bootstrap.library.path=C:\Program Files\IBM\SDP70\jdk\jre\bin, sun.boot.library.path=C:\Program Files\IBM\SDP70\jdk\jre\bin, dialect=org.hibernate.dialect.DB2Dialect, java.version=1.5.0, user.timezone=, sun.arch.data.model=32, com.ibm.oti.vm.library.version=23, sun.jnu.encoding=Cp1252, jxe.current.romimage.version=9, file.separator=\, java.specification.name=Java Platform API Specification, hibernate.cglib.use_reflection_optimizer=true, java.class.version=49.0, user.country=US, java.home=C:\Program Files\IBM\SDP70\jdk\jre, java.vm.info=J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32 j9vmwi3223-20061001 (JIT enabled)
J9VM - 20060915_08260_lHdSMR
JIT - 20060908_1811_r8
GC - 20060906_AA, os.version=5.1 build 2600 Service Pack 2, java.awt.fonts=, path.separator=;, java.vm.version=2.3, java.util.prefs.PreferencesFactory=java.util.prefs.WindowsPreferencesFactory, hibernate.connection.password=Kothan001, user.variant=, java.awt.printerjob=sun.awt.windows.WPrinterJob, sun.io.unicode.encoding=UnicodeLittle, awt.toolkit=sun.awt.windows.WToolkit, ibm.signalhandling.sigint=true, hibernate.connection.username=144382, java.assistive=ON, user.home=C:\Documents and Settings\144382, com.ibm.cpu.endian=little, java.specification.vendor=Sun Microsystems Inc., ibm.signalhandling.sigchain=true, invokedviajava=, hibernate.hbm2ddl.auto=update, java.library.path=C:\Program Files\IBM\SDP70\jdk\jre\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\IBM\Personal Communications\;C:\Program Files\IBM\Trace Facility\;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;c:\program files\borland\StarTeam SDK 2005 R2\Lib;c:\program files\borland\StarTeam SDK 2005 R2\Bin;D:\PROGRA~1\IBM\SQLLIB\BIN;D:\PROGRA~1\IBM\SQLLIB\FUNCTION;D:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL;C:\Sun\jwsdp-1.5\jwsdp-shared\bin, java.vendor.url=http://www.ibm.com/, hibernate.connection.driver_class=com.ibm.db2.jcc.DB2Driver, java.vm.vendor=IBM Corporation, hibernate.dialect=org.hibernate.dialect.DB2Dialect, java.fullversion=J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32 j9vmwi3223-20061001 (JIT enabled)
J9VM - 20060915_08260_lHdSMR
JIT - 20060908_1811_r8
GC - 20060906_AA, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, java.class.path=D:\Mani\Workspace\Hibernate\HBXMLTest;D:\Mani\ALLjars on 10.239.23.231\asm.jar;D:\Mani\ALLjars on 10.239.23.231\asm-attrs.jar;D:\Mani\ALLjars on 10.239.23.231\commons-collections.jar;D:\Mani\ALLjars on 10.239.23.231\commons-logging.jar;D:\Mani\ALLjars on 10.239.23.231\HibernateJars\hibernate3.jar;D:\Mani\ALLjars on 10.239.23.231\jta.jar;D:\Mani\ALLjars on 10.239.23.231\dom4j.jar;D:\Mani\ALLjars on 10.239.23.231\log4j.jar;D:\Mani\ALLjars on 10.239.23.231\db2jcc.jar;D:\Mani\ALLjars on 10.239.23.231\db2jcc_license_cu.jar;D:\Mani\ALLjars on 10.239.23.231\cglib-2.1.3.jar;D:\Mani\ALLjars on 10.239.23.231\HibernateJars\ehcache-0.9.jar;D:\Mani\ALLjars on 10.239.23.231\commons-lang-2.0.jar;D:\Mani\ALLjars on 10.239.23.231\stmutil.jar;D:\Mani\ALLjars on 10.239.23.231\antlr-2.7.6.jar, java.vm.specification.name=Java Virtual Machine Specification, java.vm.specification.version=1.0, java.io.tmpdir=C:\DOCUME~1\144382\LOCALS~1\Temp\, java.jcl.version=20061002, ibm.system.encoding=Cp1252, os.arch=x86, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, ibm.signalhandling.rs=false, java.ext.dirs=C:\Program Files\IBM\SDP70\jdk\jre\lib\ext, user.dir=D:\Mani\Workspace\Hibernate\HBXMLTest, line.separator=
, java.vm.name=IBM J9 VM, com.ibm.vm.bitmode=32, jxe.lowest.romimage.version=9, file.encoding=Cp1252, com.ibm.oti.configuration=scar, java.specification.version=1.5, com.ibm.oti.jcl.build=20060906_1248, hibernate.connection.pool_size=10, hibernate.show_sql=true}
2016 [main] DEBUG net.sf.ehcache.CacheManager - Creating new CacheManager with default config
2016 [main] DEBUG net.sf.ehcache.CacheManager - Configuring ehcache from classpath.
2016 [main] WARN net.sf.ehcache.config.Configurator - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/D:/Mani/ALLjars%20on%2010.239.23.231/HibernateJars/ehcache-0.9.jar!/ehcache-failsafe.xml
2032 [main] DEBUG net.sf.ehcache.config.Configuration$DiskStore - Disk Store Path: C:\DOCUME~1\144382\LOCALS~1\Temp\
2438 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Static SQL for entity: com.metlife.stm.Person
2438 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Version select: select person_id from persons where person_id =?
2438 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Snapshot select: select person_.person_id, person_.first_name as first2_1_, person_.last_name as last3_1_ from persons person_ where person_.person_id=?
2438 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Insert 0: insert into persons (first_name, last_name, person_id) values (?, ?, ?)
2453 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Update 0: update persons set first_name=?, last_name=? where person_id=?
2453 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Delete 0: delete from persons where person_id=?
2500 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Static SQL for entity: com.metlife.stm.Reservation
2547 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Version select: select reservation_id, person_id_fk, flight_id_fk from reservations where reservation_id =? and person_id_fk =? and flight_id_fk =?
2547 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Snapshot select: select reservatio_.reservation_id, reservatio_.person_id_fk, reservatio_.flight_id_fk, reservatio_.registration_utc as registra4_2_, reservatio_.comment as comment2_ from reservations reservatio_ where reservatio_.reservation_id=? and reservatio_.person_id_fk=? and reservatio_.flight_id_fk=?
2547 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Insert 0: insert into reservations (registration_utc, comment, reservation_id, person_id_fk, flight_id_fk) values (?, ?, ?, ?, ?)
2547 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Update 0: update reservations set registration_utc=?, comment=? where reservation_id=? and person_id_fk=? and flight_id_fk=?
2547 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Delete 0: delete from reservations where reservation_id=? and person_id_fk=? and flight_id_fk=?
2594 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Static SQL for entity: com.metlife.stm.Flight
2594 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Version select: select flight_id from flights where flight_id =?
2594 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Snapshot select: select flight_.flight_id, flight_.name as name0_, flight_.departure_utc as departure3_0_, flight_.arrival_utc as arrival4_0_ from flights flight_ where flight_.flight_id=?
2594 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Insert 0: insert into flights (name, departure_utc, arrival_utc, flight_id) values (?, ?, ?, ?)
2594 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Update 0: update flights set name=?, departure_utc=?, arrival_utc=? where flight_id=?
2594 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Delete 0: delete from flights where flight_id=?
2610 [main] DEBUG org.hibernate.persister.collection.AbstractCollectionPersister - Static SQL for collection: com.metlife.stm.Person.reservations
2610 [main] DEBUG org.hibernate.persister.collection.AbstractCollectionPersister - Row insert: update reservations set person_id_fk=? where reservation_id=? and person_id_fk=? and flight_id_fk=?
2610 [main] DEBUG org.hibernate.persister.collection.AbstractCollectionPersister - Row delete: update reservations set person_id_fk=null where person_id_fk=? and reservation_id=? and person_id_fk=? and flight_id_fk=?
2610 [main] DEBUG org.hibernate.persister.collection.AbstractCollectionPersister - One-shot delete: update reservations set person_id_fk=null where person_id_fk=?
2610 [main] DEBUG org.hibernate.persister.collection.AbstractCollectionPersister - Static SQL for collection: com.metlife.stm.Flight.reservations
2610 [main] DEBUG org.hibernate.persister.collection.AbstractCollectionPersister - Row insert: update reservations set flight_id_fk=? where reservation_id=? and person_id_fk=? and flight_id_fk=?
2610 [main] DEBUG org.hibernate.persister.collection.AbstractCollectionPersister - Row delete: update reservations set flight_id_fk=null where flight_id_fk=? and reservation_id=? and person_id_fk=? and flight_id_fk=?
2610 [main] DEBUG org.hibernate.persister.collection.AbstractCollectionPersister - One-shot delete: update reservations set flight_id_fk=null where flight_id_fk=?
2641 [main] DEBUG org.hibernate.loader.entity.EntityLoader - Static select for entity com.metlife.stm.Person: select person0_.person_id as person1_1_0_, person0_.first_name as first2_1_0_, person0_.last_name as last3_1_0_ from persons person0_ where person0_.person_id=?
2641 [main] DEBUG org.hibernate.loader.entity.EntityLoader - Static select for entity com.metlife.stm.Person: select person0_.person_id as person1_1_0_, person0_.first_name as first2_1_0_, person0_.last_name as last3_1_0_ from persons person0_ where person0_.person_id=?
2641 [main] DEBUG org.hibernate.loader.entity.EntityLoader - Static select for entity com.metlife.stm.Person: select person0_.person_id as person1_1_0_, person0_.first_name as first2_1_0_, person0_.last_name as last3_1_0_ from persons person0_ where person0_.person_id=? for read only with rs
2641 [main] DEBUG org.hibernate.loader.entity.EntityLoader - Static select for entity com.metlife.stm.Person: select person0_.person_id as person1_1_0_, person0_.first_name as first2_1_0_, person0_.last_name as last3_1_0_ from persons person0_ where person0_.person_id=? for read only with rs
2657 [main] DEBUG org.hibernate.loader.entity.EntityLoader - Static select for action ACTION_MERGE on entity com.metlife.stm.Person: select person0_.person_id as person1_1_0_, person0_.first_name as first2_1_0_, person0_.last_name as last3_1_0_ from persons person0_ where person0_.person_id=?
2657 [main] DEBUG org.hibernate.loader.entity.EntityLoader - Static select for action ACTION_REFRESH on entity com.metlife.stm.Person: select person0_.person_id as person1_1_0_, person0_.first_name as first2_1_0_, person0_.last_name as last3_1_0_ from persons person0_ where person0_.person_id=?
2672 [main] DEBUG org.hibernate.loader.entity.EntityLoader - Static select for entity com.metlife.stm.Reservation: select reservatio0_.reservation_id as reservat1_2_0_, reservatio0_.person_id_fk as person2_2_0_, reservatio0_.flight_id_fk as flight3_2_0_, reservatio0_.registration_utc as registra4_2_0_, reservatio0_.comment as comment2_0_ from reservations reservatio0_ where reservatio0_.reservation_id=? and reservatio0_.person_id_fk=? and reservatio0_.flight_id_fk=?
2672 [main] DEBUG org.hibernate.loader.entity.EntityLoader - Static select for entity com.metlife.stm.Reservation: select reservatio0_.reservation_id as reservat1_2_0_, reservatio0_.person_id_fk as person2_2_0_, reservatio0_.flight_id_fk as flight3_2_0_, reservatio0_.registration_utc as registra4_2_0_, reservatio0_.comment as comment2_0_ from reservations reservatio0_ where reservatio0_.reservation_id=? and reservatio0_.person_id_fk=? and reservatio0_.flight_id_fk=?
2672 [main] DEBUG org.hibernate.loader.entity.EntityLoader - Static select for entity com.metlife.stm.Reservation: select reservatio0_.reservation_id as reservat1_2_0_, reservatio0_.person_id_fk as person2_2_0_, reservatio0_.flight_id_fk as flight3_2_0_, reservatio0_.registration_utc as registra4_2_0_, reservatio0_.comment as comment2_0_ from reservations reservatio0_ where reservatio0_.reservation_id=? and reservatio0_.person_id_fk=? and reservatio0_.flight_id_fk=? for read only with rs
2672 [main] DEBUG org.hibernate.loader.entity.EntityLoader - Static select for entity com.metlife.stm.Reservation: select reservatio0_.reservation_id as reservat1_2_0_, reservatio0_.person_id_fk as person2_2_0_, reservatio0_.flight_id_fk as flight3_2_0_, reservatio0_.registration_utc as registra4_2_0_, reservatio0_.comment as comment2_0_ from reservations reservatio0_ where reservatio0_.reservation_id=? and reservatio0_.person_id_fk=? and reservatio0_.flight_id_fk=? for read only with rs
2672 [main] DEBUG org.hibernate.loader.entity.EntityLoader - Static select for action ACTION_MERGE on entity com.metlife.stm.Reservation: select reservatio0_.reservation_id as reservat1_2_0_, reservatio0_.person_id_fk as person2_2_0_, reservatio0_.flight_id_fk as flight3_2_0_, reservatio0_.registration_utc as registra4_2_0_, reservatio0_.comment as comment2_0_ from reservations reservatio0_ where reservatio0_.reservation_id=? and reservatio0_.person_id_fk=? and reservatio0_.flight_id_fk=?
2672 [main] DEBUG org.hibernate.loader.entity.EntityLoader - Static select for action ACTION_REFRESH on entity com.metlife.stm.Reservation: select reservatio0_.reservation_id as reservat1_2_0_, reservatio0_.person_id_fk as person2_2_0_, reservatio0_.flight_id_fk as flight3_2_0_, reservatio0_.registration_utc as registra4_2_0_, reservatio0_.comment as comment2_0_ from reservations reservatio0_ where reservatio0_.reservation_id=? and reservatio0_.person_id_fk=? and reservatio0_.flight_id_fk=?
2672 [main] DEBUG org.hibernate.loader.entity.EntityLoader - Static select for entity com.metlife.stm.Flight: select flight0_.flight_id as flight1_0_0_, flight0_.name as name0_0_, flight0_.departure_utc as departure3_0_0_, flight0_.arrival_utc as arrival4_0_0_ from flights flight0_ where flight0_.flight_id=?
2672 [main] DEBUG org.hibernate.loader.entity.EntityLoader - Static select for entity com.metlife.stm.Flight: select flight0_.flight_id as flight1_0_0_, flight0_.name as name0_0_, flight0_.departure_utc as departure3_0_0_, flight0_.arrival_utc as arrival4_0_0_ from flights flight0_ where flight0_.flight_id=?
2672 [main] DEBUG org.hibernate.loader.entity.EntityLoader - Static select for entity com.metlife.stm.Flight: select flight0_.flight_id as flight1_0_0_, flight0_.name as name0_0_, flight0_.departure_utc as departure3_0_0_, flight0_.arrival_utc as arrival4_0_0_ from flights flight0_ where flight0_.flight_id=? for read only with rs
2672 [main] DEBUG org.hibernate.loader.entity.EntityLoader - Static select for entity com.metlife.stm.Flight: select flight0_.flight_id as flight1_0_0_, flight0_.name as name0_0_, flight0_.departure_utc as departure3_0_0_, flight0_.arrival_utc as arrival4_0_0_ from flights flight0_ where flight0_.flight_id=? for read only with rs
2672 [main] DEBUG org.hibernate.loader.entity.EntityLoader - Static select for action ACTION_MERGE on entity com.metlife.stm.Flight: select flight0_.flight_id as flight1_0_0_, flight0_.name as name0_0_, flight0_.departure_utc as departure3_0_0_, flight0_.arrival_utc as arrival4_0_0_ from flights flight0_ where flight0_.flight_id=?
2688 [main] DEBUG org.hibernate.loader.entity.EntityLoader - Static select for action ACTION_REFRESH on entity com.metlife.stm.Flight: select flight0_.flight_id as flight1_0_0_, flight0_.name as name0_0_, flight0_.departure_utc as departure3_0_0_, flight0_.arrival_utc as arrival4_0_0_ from flights flight0_ where flight0_.flight_id=?
2688 [main] DEBUG org.hibernate.loader.collection.OneToManyLoader - Static select for one-to-many com.metlife.stm.Person.reservations: select reservatio0_.person_id_fk as person2_1_, reservatio0_.reservation_id as reservat1_1_, reservatio0_.flight_id_fk as flight3_1_, reservatio0_.reservation_id as reservat1_2_0_, reservatio0_.person_id_fk as person2_2_0_, reservatio0_.flight_id_fk as flight3_2_0_, reservatio0_.registration_utc as registra4_2_0_, reservatio0_.comment as comment2_0_ from reservations reservatio0_ where reservatio0_.person_id_fk=?
2688 [main] DEBUG org.hibernate.loader.collection.OneToManyLoader - Static select for one-to-many com.metlife.stm.Flight.reservations: select reservatio0_.flight_id_fk as flight3_1_, reservatio0_.reservation_id as reservat1_1_, reservatio0_.person_id_fk as person2_1_, reservatio0_.reservation_id as reservat1_2_0_, reservatio0_.person_id_fk as person2_2_0_, reservatio0_.flight_id_fk as flight3_2_0_, reservatio0_.registration_utc as registra4_2_0_, reservatio0_.comment as comment2_0_ from reservations reservatio0_ where reservatio0_.flight_id_fk=?
2703 [main] DEBUG org.hibernate.impl.SessionFactoryObjectFactory - initializing class SessionFactoryObjectFactory
2703 [main] DEBUG org.hibernate.impl.SessionFactoryObjectFactory - registered: 8a6d25af1a04bb2c011a04bb2f4f0000 (unnamed)
2703 [main] INFO org.hibernate.impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured
2703 [main] DEBUG org.hibernate.impl.SessionFactoryImpl - instantiated session factory
2703 [main] INFO org.hibernate.tool.hbm2ddl.SchemaUpdate - Running hbm2ddl schema update
2719 [main] INFO org.hibernate.tool.hbm2ddl.SchemaUpdate - fetching database metadata
2719 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider - total checked-out connections: 0
2719 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider - using pooled JDBC connection, pool size: 0
2766 [main] INFO org.hibernate.tool.hbm2ddl.SchemaUpdate - updating schema
2766 [main] DEBUG org.hibernate.cfg.Configuration - processing extends queue
2766 [main] DEBUG org.hibernate.cfg.Configuration - processing collection mappings
2766 [main] DEBUG org.hibernate.cfg.Configuration - processing native query and ResultSetMapping mappings
2766 [main] DEBUG org.hibernate.cfg.Configuration - processing association property references
2766 [main] DEBUG org.hibernate.cfg.Configuration - processing foreign key constraints
2766 [main] DEBUG org.hibernate.cfg.Configuration - resolving reference to class: com.metlife.stm.Person
2766 [main] DEBUG org.hibernate.cfg.Configuration - resolving reference to class: com.metlife.stm.Flight
2844 [main] INFO org.hibernate.tool.hbm2ddl.TableMetadata - table found: 144382.FLIGHTS
2844 [main] INFO org.hibernate.tool.hbm2ddl.TableMetadata - columns: [arrival_utc, name, flight_id, departure_utc]
2844 [main] INFO org.hibernate.tool.hbm2ddl.TableMetadata - foreign keys: []
2844 [main] INFO org.hibernate.tool.hbm2ddl.TableMetadata - indexes: [sql080519140840920]
2875 [main] INFO org.hibernate.tool.hbm2ddl.TableMetadata - table found: 144382.PERSONS
2875 [main] INFO org.hibernate.tool.hbm2ddl.TableMetadata - columns: [first_name, person_id, last_name]
2875 [main] INFO org.hibernate.tool.hbm2ddl.TableMetadata - foreign keys: []
2875 [main] INFO org.hibernate.tool.hbm2ddl.TableMetadata - indexes: [sql080519140837520]
2922 [main] INFO org.hibernate.tool.hbm2ddl.TableMetadata - table found: 144382.RESERVATIONS
2922 [main] INFO org.hibernate.tool.hbm2ddl.TableMetadata - columns: [comment, person_id_fk, registration_utc, reservation_id, flight_id_fk]
2922 [main] INFO org.hibernate.tool.hbm2ddl.TableMetadata - foreign keys: [sql080519140843782, sql080519140843781]
2922 [main] INFO org.hibernate.tool.hbm2ddl.TableMetadata - indexes: [sql080519140843740]
2922 [main] DEBUG org.hibernate.tool.hbm2ddl.SchemaUpdate - alter table reservations add constraint FKB7D336274E44B0D9 foreign key (person_id_fk) references persons
2938 [main] DEBUG org.hibernate.tool.hbm2ddl.SchemaUpdate - alter table reservations add constraint FKB7D33627DF5602CF foreign key (flight_id_fk) references flights
2938 [main] INFO org.hibernate.tool.hbm2ddl.SchemaUpdate - schema update complete
2938 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider - returning connection to pool, pool size: 1
2938 [main] DEBUG org.hibernate.impl.SessionFactoryImpl - Checking 0 named HQL queries
2938 [main] DEBUG org.hibernate.impl.SessionFactoryImpl - Checking 0 named SQL queries
2985 [main] DEBUG org.hibernate.impl.SessionImpl - opened session at timestamp: 4961321590493184
2985 [main] DEBUG org.hibernate.impl.SessionImpl - opened session [dom4j]
2985 [main] DEBUG org.hibernate.transaction.JDBCTransaction - begin
2985 [main] DEBUG org.hibernate.jdbc.ConnectionManager - opening JDBC connection
3016 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider - total checked-out connections: 0
3016 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider - using pooled JDBC connection, pool size: 0
3016 [main] DEBUG org.hibernate.transaction.JDBCTransaction - current autocommit status: false
3016 [main] DEBUG org.hibernate.jdbc.JDBCContext - after transaction begin
Selecting Record1
3032 [main] DEBUG org.hibernate.engine.query.QueryPlanCache - unable to locate HQL query plan in cache; generating (from Person)
3157 [main] DEBUG org.hibernate.hql.ast.QueryTranslatorImpl - parse() - HQL: from com.metlife.stm.Person
3172 [main] DEBUG org.hibernate.hql.ast.AST - --- HQL AST ---
\-[QUERY] 'query'
\-[SELECT_FROM] 'SELECT_FROM'
\-[FROM] 'from'
\-[RANGE] 'RANGE'
\-[DOT] '.'
+-[DOT] '.'
| +-[DOT] '.'
| | +-[IDENT] 'com'
| | \-[IDENT] 'metlife'
| \-[IDENT] 'stm'
\-[IDENT] 'Person'

3172 [main] DEBUG org.hibernate.hql.ast.ErrorCounter - throwQueryException() : no errors
3235 [main] DEBUG org.hibernate.hql.antlr.HqlSqlBaseWalker - select << begin [level=1, statement=select]
3250 [main] DEBUG org.hibernate.hql.ast.tree.FromElement - FromClause{level=1} : com.metlife.stm.Person (no alias) -> person0_
3250 [main] DEBUG org.hibernate.hql.antlr.HqlSqlBaseWalker - select : finishing up [level=1, statement=select]
3250 [main] DEBUG org.hibernate.hql.ast.HqlSqlWalker - processQuery() : ( SELECT ( FromClause{level=1} persons person0_ ) )
3266 [main] DEBUG org.hibernate.hql.ast.HqlSqlWalker - Derived SELECT clause created.
3266 [main] DEBUG org.hibernate.hql.ast.util.JoinProcessor - Using FROM fragment [persons person0_]
3266 [main] DEBUG org.hibernate.hql.antlr.HqlSqlBaseWalker - select >> end [level=1, statement=select]
3282 [main] DEBUG org.hibernate.hql.ast.AST - --- SQL AST ---
\-[SELECT] QueryNode: 'SELECT' querySpaces (persons)
+-[SELECT_CLAUSE] SelectClause: '{derived select clause}'
| +-[SELECT_EXPR] SelectExpressionImpl: 'person0_.person_id as person1_1_' {FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=null,role=null,tableName=persons,tableAlias=person0_,origin=null,colums={,className=com.metlife.stm.Person}}}
| \-[SQL_TOKEN] SqlFragment: 'person0_.first_name as first2_1_, person0_.last_name as last3_1_'
\-[FROM] FromClause: 'from' FromClause{level=1, fromElementCounter=1, fromElements=1, fromElementByClassAlias=[], fromElementByTableAlias=[person0_], fromElementsByPath=[], collectionJoinFromElementsByPath=[], impliedElements=[]}
\-[FROM_FRAGMENT] FromElement: 'persons person0_' FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=null,role=null,tableName=persons,tableAlias=person0_,origin=null,colums={,className=com.metlife.stm.Person}}

3282 [main] DEBUG org.hibernate.hql.ast.ErrorCounter - throwQueryException() : no errors
3297 [main] DEBUG org.hibernate.hql.ast.QueryTranslatorImpl - HQL: from com.metlife.stm.Person
3297 [main] DEBUG org.hibernate.hql.ast.QueryTranslatorImpl - SQL: select person0_.person_id as person1_1_, person0_.first_name as first2_1_, person0_.last_name as last3_1_ from persons person0_
3297 [main] DEBUG org.hibernate.hql.ast.ErrorCounter - throwQueryException() : no errors
3313 [main] DEBUG org.hibernate.engine.query.HQLQueryPlan - HQL param location recognition took 0 mills (from Person)
3313 [main] DEBUG org.hibernate.engine.query.QueryPlanCache - located HQL query plan in cache (from Person)
3313 [main] DEBUG org.hibernate.engine.query.HQLQueryPlan - find: from Person
3313 [main] DEBUG org.hibernate.engine.QueryParameters - named parameters: {}
3313 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
3313 [main] DEBUG org.hibernate.SQL - select person0_.person_id as person1_1_, person0_.first_name as first2_1_, person0_.last_name as last3_1_ from persons person0_
Hibernate: select person0_.person_id as person1_1_, person0_.first_name as first2_1_, person0_.last_name as last3_1_ from persons person0_
3328 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - preparing statement
3328 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to open ResultSet (open ResultSets: 0, globally: 0)
3328 [main] DEBUG org.hibernate.loader.Loader - processing result set
3328 [main] DEBUG org.hibernate.loader.Loader - result set row: 0
3328 [main] DEBUG org.hibernate.type.IntegerType - returning '1' as column: person1_1_
3328 [main] DEBUG org.hibernate.loader.Loader - result row: EntityKey[com.metlife.stm.Person#1]
3328 [main] DEBUG org.hibernate.loader.Loader - Initializing object from ResultSet: [com.metlife.stm.Person#1]
3328 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Hydrating entity: [com.metlife.stm.Person#1]
3328 [main] DEBUG org.hibernate.type.StringType - returning 'Aslak' as column: first2_1_
3328 [main] DEBUG org.hibernate.type.StringType - returning 'Hellesøy' as column: last3_1_
3344 [main] DEBUG org.hibernate.loader.Loader - result set row: 1
3344 [main] DEBUG org.hibernate.type.IntegerType - returning '2' as column: person1_1_
3344 [main] DEBUG org.hibernate.loader.Loader - result row: EntityKey[com.metlife.stm.Person#2]
3344 [main] DEBUG org.hibernate.loader.Loader - Initializing object from ResultSet: [com.metlife.stm.Person#2]
3344 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Hydrating entity: [com.metlife.stm.Person#2]
3344 [main] DEBUG org.hibernate.type.StringType - returning 'Eivind' as column: first2_1_
3344 [main] DEBUG org.hibernate.type.StringType - returning 'Waaler' as column: last3_1_
3344 [main] DEBUG org.hibernate.loader.Loader - result set row: 2
3344 [main] DEBUG org.hibernate.type.IntegerType - returning '3' as column: person1_1_
3344 [main] DEBUG org.hibernate.loader.Loader - result row: EntityKey[com.metlife.stm.Person#3]
3344 [main] DEBUG org.hibernate.loader.Loader - Initializing object from ResultSet: [com.metlife.stm.Person#3]
3344 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Hydrating entity: [com.metlife.stm.Person#3]
3344 [main] DEBUG org.hibernate.type.StringType - returning 'Ludovic' as column: first2_1_
3344 [main] DEBUG org.hibernate.type.StringType - returning 'Claude' as column: last3_1_
3344 [main] DEBUG org.hibernate.loader.Loader - done processing result set (3 rows)
3344 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to close ResultSet (open ResultSets: 1, globally: 1)
3344 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
3344 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - closing statement
3344 [main] DEBUG org.hibernate.loader.Loader - total objects hydrated: 3
3344 [main] DEBUG org.hibernate.engine.TwoPhaseLoad - resolving associations for [com.metlife.stm.Person#1]
3360 [main] DEBUG org.hibernate.engine.CollectionLoadContext - creating collection wrapper:[com.metlife.stm.Person.reservations#1]
3360 [main] DEBUG org.hibernate.event.def.DefaultInitializeCollectionEventListener - initializing collection [com.metlife.stm.Person.reservations#1]
3375 [main] DEBUG org.hibernate.event.def.DefaultInitializeCollectionEventListener - checking second-level cache
3375 [main] DEBUG org.hibernate.event.def.DefaultInitializeCollectionEventListener - collection not cached
3375 [main] DEBUG org.hibernate.loader.Loader - loading collection: [com.metlife.stm.Person.reservations#1]
3375 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
3375 [main] DEBUG org.hibernate.SQL - select reservatio0_.person_id_fk as person2_1_, reservatio0_.reservation_id as reservat1_1_, reservatio0_.flight_id_fk as flight3_1_, reservatio0_.reservation_id as reservat1_2_0_, reservatio0_.person_id_fk as person2_2_0_, reservatio0_.flight_id_fk as flight3_2_0_, reservatio0_.registration_utc as registra4_2_0_, reservatio0_.comment as comment2_0_ from reservations reservatio0_ where reservatio0_.person_id_fk=?
Hibernate: select reservatio0_.person_id_fk as person2_1_, reservatio0_.reservation_id as reservat1_1_, reservatio0_.flight_id_fk as flight3_1_, reservatio0_.reservation_id as reservat1_2_0_, reservatio0_.person_id_fk as person2_2_0_, reservatio0_.flight_id_fk as flight3_2_0_, reservatio0_.registration_utc as registra4_2_0_, reservatio0_.comment as comment2_0_ from reservations reservatio0_ where reservatio0_.person_id_fk=?
3375 [main] DEBUG ojava.lang.UnsupportedOperationException: The name and namespace of this Element cannot be changed
at org.dom4j.tree.AbstractElement.setName(AbstractElement.java:81)
at org.hibernate.type.AbstractType.replaceNode(AbstractType.java:127)
at org.hibernate.type.CollectionType.setToXMLNode(CollectionType.java:552)
at org.hibernate.property.Dom4jAccessor$ElementSetter.set(Dom4jAccessor.java:310)
at org.hibernate.tuple.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:330)
at org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:3232)rg.hibernate.jdbc.AbstractBatcher - preparing statement
3375 [main] DEBUG org.hibernate.type.IntegerType - binding '1' to parameter: 1
3375 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to open ResultSet (open ResultSets: 0, globally: 0)
3375 [main] DEBUG org.hibernate.loader.Loader - result set contains (possibly empty) collection: [com.metlife.stm.Person.reservations#1]
3375 [main] DEBUG org.hibernate.engine.CollectionLoadContext - uninitialized collection: initializing
3375 [main] DEBUG org.hibernate.loader.Loader - processing result set
3375 [main] DEBUG org.hibernate.loader.Loader - done processing result set (0 rows)
3391 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to close ResultSet (open ResultSets: 1, globally: 1)
3391 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
3391 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - closing statement
3391 [main] DEBUG org.hibernate.loader.Loader - total objects hydrated: 0
3391 [main] DEBUG org.hibernate.engine.CollectionLoadContext - 1 collections were found in result set for role: com.metlife.stm.Person.reservations
3391 [main] DEBUG org.hibernate.engine.CollectionLoadContext - collection fully initialized: [com.metlife.stm.Person.reservations#1]
3391 [main] DEBUG org.hibernate.engine.CollectionLoadContext - 1 collections initialized for role: com.metlife.stm.Person.reservations
3391 [main] DEBUG org.hiber

_________________
Regards,
Mani


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.