Hi,
A newbie question...
I have a customer with a billingAddress. I have defined the relationship between them (below) and using it to retrieve a customer and its associated billingAddress. This works fine.
The problem occurs when I create and new customer, create a new billingAddress and set a reference on customer, and try and execute a cascading save. I get a exception (below_ saying that customer_id cant be null, which is correct, by this is only generated when hibernate executes an insert on the customer table.
I suspect I have made a mistake in mapping the classes, but any help would be appreciated.
The tables are
Customer(customer_id...)
BillingAddress(billingaddress_id, customer_id...)
Hibernate version:
3.0.5
Mapping documents:
CUSTOMER...
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="src">
<class name="Customer" table="customer">
<id name="customer_id" column="customer_id" type="integer" unsaved-value="null">
<generator class="native"/>
</id>
<property name="firstname" type="string" length="45"/>
<property name="lastname" type="string" length="45"/>
<property name="gender" type="string" length="1"/>
<one-to-one
name="billingAddress"
class="src.BillingAddress"
property-ref="customer"
cascade="all"
/>
<one-to-one
name="contactDetail"
class="src.ContactDetail"
property-ref="customer"
cascade="all"
/>
</class>
</hibernate-mapping>
BILLINGADDRESS...
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="src">
<class name="BillingAddress" table="billingaddress">
<id name="billingaddress_id" column="billingaddress_id" type="integer" unsaved-value="null">
<generator class="native"/>
</id>
<property name="line1" type="string" length="45"/>
<property name="line2" type="string" length="45"/>
<property name="line3" type="string" length="45"/>
<property name="line4" type="string" length="45"/>
<property name="line5" type="string" length="45"/>
<many-to-one
name="customer"
class="src.Customer"
column="customer_id"
unique="true"
cascade="all"
/>
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
transaction = session.beginTransaction();
session.saveOrUpdate(o);
transaction.commit();
Full stack trace of any exception that occurs:
15:10:42,715 INFO Configuration:1110 - configuring from resource: /hibernate.cfg.xml
15:10:42,715 INFO Configuration:1081 - Configuration resource: /hibernate.cfg.xml
15:10:42,775 DEBUG DTDEntityResolver:42 - trying to locate
http://hibernate.sourceforge.net/hibern ... on-3.0.dtd in classpath under org/hibernate/
15:10:42,775 DEBUG DTDEntityResolver:53 - found
http://hibernate.sourceforge.net/hibern ... on-3.0.dtd in classpath
15:10:42,825 DEBUG Configuration:1067 - dialect=org.hibernate.dialect.MySQLDialect
15:10:42,825 DEBUG Configuration:1067 - connection.driver_class=com.mysql.jdbc.Driver
15:10:42,825 DEBUG Configuration:1067 - connection.url=jdbc:mysql://localhost/practicum
15:10:42,825 DEBUG Configuration:1067 - connection.username=practicum
15:10:42,835 DEBUG Configuration:1067 - connection.password=practicum
15:10:42,835 DEBUG Configuration:1262 - null<-org.dom4j.tree.DefaultAttribute@3f265b [Attribute: name resource value "src/Customer.hbm.xml"]
15:10:42,835 INFO Configuration:444 - Mapping resource: src/Customer.hbm.xml
15:10:42,875 DEBUG DTDEntityResolver:42 - trying to locate
http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath under org/hibernate/
15:10:42,885 DEBUG DTDEntityResolver:53 - found
http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath
15:10:42,975 INFO HbmBinder:260 - Mapping class: src.Customer -> customer
15:10:42,975 DEBUG HbmBinder:1099 - Mapped property: customer_id -> customer_id
15:10:42,975 DEBUG HbmBinder:1099 - Mapped property: firstname -> firstname
15:10:43,005 DEBUG HbmBinder:1099 - Mapped property: lastname -> lastname
15:10:43,005 DEBUG HbmBinder:1099 - Mapped property: gender -> gender
15:10:43,005 DEBUG HbmBinder:1099 - Mapped property: billingAddress
15:10:43,005 DEBUG HbmBinder:1099 - Mapped property: contactDetail
15:10:43,015 DEBUG Configuration:1262 - null<-org.dom4j.tree.DefaultAttribute@511e0a [Attribute: name resource value "src/BillingAddress.hbm.xml"]
15:10:43,015 INFO Configuration:444 - Mapping resource: src/BillingAddress.hbm.xml
15:10:43,025 DEBUG DTDEntityResolver:42 - trying to locate
http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath under org/hibernate/
15:10:43,035 DEBUG DTDEntityResolver:53 - found
http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath
15:10:43,065 INFO HbmBinder:260 - Mapping class: src.BillingAddress -> billingaddress
15:10:43,065 DEBUG HbmBinder:1099 - Mapped property: billingaddress_id -> billingaddress_id
15:10:43,065 DEBUG HbmBinder:1099 - Mapped property: line1 -> line1
15:10:43,096 DEBUG HbmBinder:1099 - Mapped property: line2 -> line2
15:10:43,096 DEBUG HbmBinder:1099 - Mapped property: line3 -> line3
15:10:43,096 DEBUG HbmBinder:1099 - Mapped property: line4 -> line4
15:10:43,106 DEBUG HbmBinder:1099 - Mapped property: line5 -> line5
15:10:43,106 DEBUG HbmBinder:1099 - Mapped property: customer -> customer_id
15:10:43,106 DEBUG Configuration:1262 - null<-org.dom4j.tree.DefaultAttribute@18b3e62 [Attribute: name resource value "src/ContactDetail.hbm.xml"]
15:10:43,106 INFO Configuration:444 - Mapping resource: src/ContactDetail.hbm.xml
15:10:43,116 DEBUG DTDEntityResolver:42 - trying to locate
http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath under org/hibernate/
15:10:43,126 DEBUG DTDEntityResolver:53 - found
http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath
15:10:43,186 INFO HbmBinder:260 - Mapping class: src.ContactDetail -> contactdetail
15:10:43,186 DEBUG HbmBinder:1099 - Mapped property: contactdetail_id -> contactdetail_id
15:10:43,186 DEBUG HbmBinder:1099 - Mapped property: homeNumber -> homeNumber
15:10:43,206 DEBUG HbmBinder:1099 - Mapped property: workNumber -> workNumber
15:10:43,216 DEBUG HbmBinder:1099 - Mapped property: mobileNumber -> mobileNumber
15:10:43,216 DEBUG HbmBinder:1099 - Mapped property: faxNumber -> faxNumber
15:10:43,216 DEBUG HbmBinder:1099 - Mapped property: emailAddress -> emailAddress
15:10:43,216 DEBUG HbmBinder:1099 - Mapped property: customer -> customer_id
15:10:43,216 DEBUG Configuration:1262 - null<-org.dom4j.tree.DefaultAttribute@b2fb1e [Attribute: name resource value "src/Order.hbm.xml"]
15:10:43,226 INFO Configuration:444 - Mapping resource: src/Order.hbm.xml
15:10:43,236 DEBUG DTDEntityResolver:42 - trying to locate
http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath under org/hibernate/
15:10:43,246 DEBUG DTDEntityResolver:53 - found
http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath
15:10:43,326 INFO HbmBinder:260 - Mapping class: src.Order -> order
15:10:43,326 DEBUG HbmBinder:1099 - Mapped property: id -> id
15:10:43,326 DEBUG HbmBinder:1099 - Mapped property: orderNumber -> orderNumber
15:10:43,336 DEBUG HbmBinder:1099 - Mapped property: datePlaced -> datePlaced
15:10:43,336 DEBUG HbmBinder:1099 - Mapped property: shippedDate -> shippedDate
15:10:43,346 DEBUG Configuration:1262 - null<-org.dom4j.tree.DefaultAttribute@8497f6 [Attribute: name resource value "src/OrderItem.hbm.xml"]
15:10:43,346 INFO Configuration:444 - Mapping resource: src/OrderItem.hbm.xml
15:10:43,356 DEBUG DTDEntityResolver:42 - trying to locate
http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath under org/hibernate/
15:10:43,356 DEBUG DTDEntityResolver:53 - found
http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath
15:10:43,406 INFO HbmBinder:260 - Mapping class: src.OrderItem -> orderitem
15:10:43,416 DEBUG HbmBinder:1099 - Mapped property: id -> id
15:10:43,416 DEBUG HbmBinder:1099 - Mapped property: product -> product
15:10:43,416 DEBUG HbmBinder:1099 - Mapped property: price -> price
15:10:43,416 INFO Configuration:1222 - Configured SessionFactory: null
15:10:43,456 DEBUG Configuration:1223 - properties: {hibernate.connection.password=practicum, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, sun.boot.library.path=C:\opt\java\jdk1.5.0_04\jre\bin, java.vm.version=1.5.0_04-b05, hibernate.connection.username=practicum, java.vm.vendor=Sun Microsystems Inc., java.vendor.url=http://java.sun.com/, path.separator=;, java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io, user.country=US, sun.os.patch.level=Service Pack 4, java.vm.specification.name=Java Virtual Machine Specification, user.dir=C:\usr\M.Sc\Practicum\Development\example\hibernate, java.runtime.version=1.5.0_04-b05, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.endorsed.dirs=C:\opt\java\jdk1.5.0_04\jre\lib\endorsed, os.arch=x86, java.io.tmpdir=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, os.name=Windows 2000, sun.jnu.encoding=Cp1252, java.library.path=C:\opt\java\jdk1.5.0_04\bin;.;C:\WINNT\system32;C:\WINNT;C:\opt\Perl\bin\;C:\opt\oracle\product\oracle902\bin;C:\opt\java\jdk1.5.0_04\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\opt\perforce;C:\opt\ant\1.6.5\bin\;C:\opt\java\Sun\AppServer\bin;C:\opt\java\jad1.5.8, java.specification.name=Java Platform API Specification, java.class.version=49.0, sun.management.compiler=HotSpot Client Compiler, os.version=5.0, connection.password=practicum, user.home=C:\Documents and Settings\Administrator, user.timezone=Europe/London, connection.username=practicum, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=Cp1252, java.specification.version=1.5, hibernate.connection.driver_class=com.mysql.jdbc.Driver, user.name=Administrator, java.class.path=C:\usr\M.Sc\Practicum\Development\example\hibernate;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\antlr-2.7.5H3.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\ant-antlr-1.6.3.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\ant-junit-1.6.3.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\ant-launcher-1.6.3.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\ant-1.6.3.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\ant-swing-1.6.3.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\asm.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\asm-attrs.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\c3p0-0.8.5.2.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\cglib-2.1.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\cleanimports.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\commons-collections-2.1.1.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\commons-logging-1.0.4.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\concurrent-1.3.2.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\connector.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\dom4j-1.6.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\ehcache-1.1.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\jaas.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\jacc-1_0-fr.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\jaxen-1.1-beta-4.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\jboss-cache.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\jboss-common.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\jboss-jmx.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\jboss-system.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\jdbc2_0-stdext.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\jgroups-2.2.7.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\jta.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\junit-3.8.1.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\log4j-1.2.9.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\oscache-2.1.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\proxool-0.8.3.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\swarmcache-1.0rc2.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\versioncheck.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\xerces-2.6.2.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\xml-apis.jar;C:\opt\tomcat\5.5.9\common\lib\servlet-api.jar;C:\opt\tomcat\5.5.9\common\lib\mcj317.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\hibernate3.jar;/c:/opt/java/eclipse/3.1/eclipse/plugins/org.eclipse.jdt.junit_3.1.0/junitsupport.jar;/c:/opt/java/eclipse/3.1/eclipse/plugins/org.eclipse.jdt.junit.runtime_3.1.0/junitruntime.jar, java.vm.specification.version=1.0, java.home=C:\opt\java\jdk1.5.0_04\jre, sun.arch.data.model=32, hibernate.connection.url=jdbc:mysql://localhost/practicum, hibernate.dialect=org.hibernate.dialect.MySQLDialect, user.language=en, java.specification.vendor=Sun Microsystems Inc., awt.toolkit=sun.awt.windows.WToolkit, hibernate.cglib.use_reflection_optimizer=true, java.vm.info=mixed mode, java.version=1.5.0_04, java.ext.dirs=C:\opt\java\jdk1.5.0_04\jre\lib\ext, sun.boot.class.path=C:\opt\java\jdk1.5.0_04\jre\lib\rt.jar;C:\opt\java\jdk1.5.0_04\jre\lib\i18n.jar;C:\opt\java\jdk1.5.0_04\jre\lib\sunrsasign.jar;C:\opt\java\jdk1.5.0_04\jre\lib\jsse.jar;C:\opt\java\jdk1.5.0_04\jre\lib\jce.jar;C:\opt\java\jdk1.5.0_04\jre\lib\charsets.jar;C:\opt\java\jdk1.5.0_04\jre\classes, java.vendor=Sun Microsystems Inc., connection.driver_class=com.mysql.jdbc.Driver, file.separator=\, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, sun.desktop=windows, connection.url=jdbc:mysql://localhost/practicum, dialect=org.hibernate.dialect.MySQLDialect, sun.cpu.isalist=pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86}
15:10:43,466 DEBUG Configuration:998 - Preparing to build session factory with filters : {}
15:10:43,466 INFO Configuration:875 - processing extends queue
15:10:43,466 INFO Configuration:879 - processing collection mappings
15:10:43,466 INFO Configuration:888 - processing association property references
15:10:43,466 INFO Configuration:917 - processing foreign key constraints
15:10:43,466 DEBUG Configuration:964 - resolving reference to class: src.Customer
15:10:43,476 DEBUG Configuration:964 - resolving reference to class: src.Customer
15:10:43,476 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
15:10:43,476 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 20
15:10:43,476 INFO DriverManagerConnectionProvider:45 - autocommit mode: false
15:10:43,556 INFO DriverManagerConnectionProvider:80 - using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost/practicum
15:10:43,566 INFO DriverManagerConnectionProvider:83 - connection properties: {user=practicum, password=practicum}
15:10:43,566 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0
15:10:43,566 DEBUG DriverManagerConnectionProvider:109 - opening new JDBC connection
15:10:43,686 DEBUG DriverManagerConnectionProvider:115 - created connection to: jdbc:mysql://localhost/practicum, Isolation Level: 4
15:10:43,686 INFO SettingsFactory:77 - RDBMS: MySQL, version: 4.1.14-nt
15:10:43,686 INFO SettingsFactory:78 - JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-3.1.7 ( $Date: 2005/01/25 19:11:41 $, $Revision: 1.27.4.54 $ )
15:10:43,686 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 1
15:10:43,706 INFO Dialect:92 - Using dialect: org.hibernate.dialect.MySQLDialect
15:10:43,706 INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
15:10:43,706 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
15:10:43,716 INFO SettingsFactory:125 - Automatic flush during beforeCompletion(): disabled
15:10:43,716 INFO SettingsFactory:129 - Automatic session close at end of transaction: disabled
15:10:43,716 INFO SettingsFactory:136 - JDBC batch size: 15
15:10:43,726 INFO SettingsFactory:139 - JDBC batch updates for versioned data: disabled
15:10:43,726 INFO SettingsFactory:144 - Scrollable result sets: enabled
15:10:43,726 DEBUG SettingsFactory:148 - Wrap result sets: disabled
15:10:43,726 INFO SettingsFactory:152 - JDBC3 getGeneratedKeys(): enabled
15:10:43,746 INFO SettingsFactory:160 - Connection release mode: null
15:10:43,746 INFO SettingsFactory:184 - Maximum outer join fetch depth: 2
15:10:43,756 INFO SettingsFactory:187 - Default batch fetch size: 1
15:10:43,756 INFO SettingsFactory:191 - Generate SQL with comments: disabled
15:10:43,756 INFO SettingsFactory:195 - Order SQL updates by primary key: disabled
15:10:43,756 INFO SettingsFactory:334 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
15:10:43,766 INFO ASTQueryTranslatorFactory:21 - Using ASTQueryTranslatorFactory
15:10:43,766 INFO SettingsFactory:203 - Query language substitutions: {}
15:10:43,766 INFO SettingsFactory:209 - Second-level cache: enabled
15:10:43,766 INFO SettingsFactory:213 - Query cache: disabled
15:10:43,766 INFO SettingsFactory:321 - Cache provider: org.hibernate.cache.EhCacheProvider
15:10:43,766 INFO SettingsFactory:228 - Optimize cache for minimal puts: disabled
15:10:43,776 INFO SettingsFactory:237 - Structured second-level cache entries: disabled
15:10:43,776 DEBUG SQLExceptionConverterFactory:52 - Using dialect defined converter
15:10:43,776 INFO SettingsFactory:261 - Statistics: disabled
15:10:43,776 INFO SettingsFactory:265 - Deleted entity synthetic identifier rollback: disabled
15:10:43,776 INFO SettingsFactory:279 - Default entity-mode: pojo
15:10:43,797 INFO SessionFactoryImpl:152 - building session factory
15:10:43,827 DEBUG SessionFactoryImpl:161 - Session factory constructed with filter configurations : {}
15:10:43,837 DEBUG SessionFactoryImpl:164 - instantiating session factory with properties: {hibernate.connection.password=practicum, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, sun.boot.library.path=C:\opt\java\jdk1.5.0_04\jre\bin, java.vm.version=1.5.0_04-b05, hibernate.connection.username=practicum, java.vm.vendor=Sun Microsystems Inc., java.vendor.url=http://java.sun.com/, path.separator=;, java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io, user.country=US, sun.os.patch.level=Service Pack 4, java.vm.specification.name=Java Virtual Machine Specification, user.dir=C:\usr\M.Sc\Practicum\Development\example\hibernate, java.runtime.version=1.5.0_04-b05, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.endorsed.dirs=C:\opt\java\jdk1.5.0_04\jre\lib\endorsed, os.arch=x86, java.io.tmpdir=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, os.name=Windows 2000, sun.jnu.encoding=Cp1252, java.library.path=C:\opt\java\jdk1.5.0_04\bin;.;C:\WINNT\system32;C:\WINNT;C:\opt\Perl\bin\;C:\opt\oracle\product\oracle902\bin;C:\opt\java\jdk1.5.0_04\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\opt\perforce;C:\opt\ant\1.6.5\bin\;C:\opt\java\Sun\AppServer\bin;C:\opt\java\jad1.5.8, java.specification.name=Java Platform API Specification, java.class.version=49.0, sun.management.compiler=HotSpot Client Compiler, os.version=5.0, connection.password=practicum, user.home=C:\Documents and Settings\Administrator, user.timezone=Europe/London, connection.username=practicum, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=Cp1252, java.specification.version=1.5, hibernate.connection.driver_class=com.mysql.jdbc.Driver, user.name=Administrator, java.class.path=C:\usr\M.Sc\Practicum\Development\example\hibernate;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\antlr-2.7.5H3.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\ant-antlr-1.6.3.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\ant-junit-1.6.3.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\ant-launcher-1.6.3.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\ant-1.6.3.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\ant-swing-1.6.3.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\asm.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\asm-attrs.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\c3p0-0.8.5.2.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\cglib-2.1.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\cleanimports.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\commons-collections-2.1.1.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\commons-logging-1.0.4.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\concurrent-1.3.2.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\connector.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\dom4j-1.6.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\ehcache-1.1.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\jaas.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\jacc-1_0-fr.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\jaxen-1.1-beta-4.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\jboss-cache.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\jboss-common.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\jboss-jmx.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\jboss-system.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\jdbc2_0-stdext.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\jgroups-2.2.7.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\jta.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\junit-3.8.1.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\log4j-1.2.9.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\oscache-2.1.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\proxool-0.8.3.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\swarmcache-1.0rc2.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\versioncheck.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\xerces-2.6.2.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\lib\xml-apis.jar;C:\opt\tomcat\5.5.9\common\lib\servlet-api.jar;C:\opt\tomcat\5.5.9\common\lib\mcj317.jar;C:\usr\M.Sc\Practicum\Development\hibernate\hibernate-3.0\hibernate3.jar;/c:/opt/java/eclipse/3.1/eclipse/plugins/org.eclipse.jdt.junit_3.1.0/junitsupport.jar;/c:/opt/java/eclipse/3.1/eclipse/plugins/org.eclipse.jdt.junit.runtime_3.1.0/junitruntime.jar, java.vm.specification.version=1.0, java.home=C:\opt\java\jdk1.5.0_04\jre, sun.arch.data.model=32, hibernate.connection.url=jdbc:mysql://localhost/practicum, hibernate.dialect=org.hibernate.dialect.MySQLDialect, user.language=en, java.specification.vendor=Sun Microsystems Inc., awt.toolkit=sun.awt.windows.WToolkit, hibernate.cglib.use_reflection_optimizer=true, java.vm.info=mixed mode, java.version=1.5.0_04, java.ext.dirs=C:\opt\java\jdk1.5.0_04\jre\lib\ext, sun.boot.class.path=C:\opt\java\jdk1.5.0_04\jre\lib\rt.jar;C:\opt\java\jdk1.5.0_04\jre\lib\i18n.jar;C:\opt\java\jdk1.5.0_04\jre\lib\sunrsasign.jar;C:\opt\java\jdk1.5.0_04\jre\lib\jsse.jar;C:\opt\java\jdk1.5.0_04\jre\lib\jce.jar;C:\opt\java\jdk1.5.0_04\jre\lib\charsets.jar;C:\opt\java\jdk1.5.0_04\jre\classes, java.vendor=Sun Microsystems Inc., connection.driver_class=com.mysql.jdbc.Driver, file.separator=\, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, sun.desktop=windows, connection.url=jdbc:mysql://localhost/practicum, dialect=org.hibernate.dialect.MySQLDialect, sun.cpu.isalist=pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86}
15:10:43,837 DEBUG CacheManager:196 - Attempting to create an existing instance. Existing instance returned.
15:10:43,857 DEBUG BasicEntityPersister:2220 - Static SQL for entity: src.Customer
15:10:43,867 DEBUG BasicEntityPersister:2222 - Version select: select customer_id from customer where customer_id =?
15:10:43,877 DEBUG BasicEntityPersister:2223 - Snapshot select: select customer_.customer_id, customer_.firstname as firstname15_, customer_.lastname as lastname15_, customer_.gender as gender15_ from customer customer_ where customer_.customer_id=?
15:10:43,877 DEBUG BasicEntityPersister:2225 - Insert 0: insert into customer (firstname, lastname, gender, customer_id) values (?, ?, ?, ?)
15:10:43,877 DEBUG BasicEntityPersister:2226 - Update 0: update customer set firstname=?, lastname=?, gender=? where customer_id=?
15:10:43,887 DEBUG BasicEntityPersister:2227 - Delete 0: delete from customer where customer_id=?
15:10:43,887 DEBUG BasicEntityPersister:2230 - Identity insert: insert into customer (firstname, lastname, gender) values (?, ?, ?)
15:10:43,907 DEBUG BasicEntityPersister:2220 - Static SQL for entity: src.ContactDetail
15:10:43,907 DEBUG BasicEntityPersister:2222 - Version select: select contactdetail_id from contactdetail where contactdetail_id =?
15:10:43,907 DEBUG BasicEntityPersister:2223 - Snapshot select: select contactdet_.contactdetail_id, contactdet_.homeNumber as homeNumber17_, contactdet_.workNumber as workNumber17_, contactdet_.mobileNumber as mobileNu4_17_, contactdet_.faxNumber as faxNumber17_, contactdet_.emailAddress as emailAdd6_17_, contactdet_.customer_id as customer7_17_ from contactdetail contactdet_ where contactdet_.contactdetail_id=?
15:10:43,917 DEBUG BasicEntityPersister:2225 - Insert 0: insert into contactdetail (homeNumber, workNumber, mobileNumber, faxNumber, emailAddress, customer_id, contactdetail_id) values (?, ?, ?, ?, ?, ?, ?)
15:10:43,917 DEBUG BasicEntityPersister:2226 - Update 0: update contactdetail set homeNumber=?, workNumber=?, mobileNumber=?, faxNumber=?, emailAddress=?, customer_id=? where contactdetail_id=?
15:10:43,947 DEBUG BasicEntityPersister:2227 - Delete 0: delete from contactdetail where contactdetail_id=?
15:10:43,947 DEBUG BasicEntityPersister:2230 - Identity insert: insert into contactdetail (homeNumber, workNumber, mobileNumber, faxNumber, emailAddress, customer_id) values (?, ?, ?, ?, ?, ?)
15:10:43,967 DEBUG BasicEntityPersister:2220 - Static SQL for entity: src.BillingAddress
15:10:43,977 DEBUG BasicEntityPersister:2222 - Version select: select billingaddress_id from billingaddress where billingaddress_id =?
15:10:43,977 DEBUG BasicEntityPersister:2223 - Snapshot select: select billingadd_.billingaddress_id, billingadd_.line1 as line2_16_, billingadd_.line2 as line3_16_, billingadd_.line3 as line4_16_, billingadd_.line4 as line5_16_, billingadd_.line5 as line6_16_, billingadd_.customer_id as customer7_16_ from billingaddress billingadd_ where billingadd_.billingaddress_id=?
15:10:43,977 DEBUG BasicEntityPersister:2225 - Insert 0: insert into billingaddress (line1, line2, line3, line4, line5, customer_id, billingaddress_id) values (?, ?, ?, ?, ?, ?, ?)
15:10:43,977 DEBUG BasicEntityPersister:2226 - Update 0: update billingaddress set line1=?, line2=?, line3=?, line4=?, line5=?, customer_id=? where billingaddress_id=?
15:10:43,977 DEBUG BasicEntityPersister:2227 - Delete 0: delete from billingaddress where billingaddress_id=?
15:10:43,987 DEBUG BasicEntityPersister:2230 - Identity insert: insert into billingaddress (line1, line2, line3, line4, line5, customer_id) values (?, ?, ?, ?, ?, ?)
15:10:43,987 DEBUG BasicEntityPersister:2220 - Static SQL for entity: src.OrderItem
15:10:43,997 DEBUG BasicEntityPersister:2222 - Version select: select id from orderitem where id =?
15:10:44,017 DEBUG BasicEntityPersister:2223 - Snapshot select: select orderitem_.id, orderitem_.product as product19_, orderitem_.price as price19_ from orderitem orderitem_ where orderitem_.id=?
15:10:44,027 DEBUG BasicEntityPersister:2225 - Insert 0: insert into orderitem (product, price, id) values (?, ?, ?)
15:10:44,027 DEBUG BasicEntityPersister:2226 - Update 0: update orderitem set product=?, price=? where id=?
15:10:44,027 DEBUG BasicEntityPersister:2227 - Delete 0: delete from orderitem where id=?
15:10:44,027 DEBUG BasicEntityPersister:2230 - Identity insert: insert into orderitem (product, price) values (?, ?)
15:10:44,037 DEBUG BasicEntityPersister:2220 - Static SQL for entity: src.Order
15:10:44,037 DEBUG BasicEntityPersister:2222 - Version select: select id from order where id =?
15:10:44,067 DEBUG BasicEntityPersister:2223 - Snapshot select: select order_.id, order_.orderNumber as orderNum2_18_, order_.datePlaced as datePlaced18_, order_.shippedDate as shippedD4_18_ from order order_ where order_.id=?
15:10:44,067 DEBUG BasicEntityPersister:2225 - Insert 0: insert into order (orderNumber, datePlaced, shippedDate, id) values (?, ?, ?, ?)
15:10:44,067 DEBUG BasicEntityPersister:2226 - Update 0: update order set orderNumber=?, datePlaced=?, shippedDate=? where id=?
15:10:44,077 DEBUG BasicEntityPersister:2227 - Delete 0: delete from order where id=?
15:10:44,077 DEBUG BasicEntityPersister:2230 - Identity insert: insert into order (orderNumber, datePlaced, shippedDate) values (?, ?, ?)
15:10:44,077 DEBUG EntityLoader:95 - Static select for entity src.Customer: select customer0_.customer_id as customer1_2_, customer0_.firstname as firstname15_2_, customer0_.lastname as lastname15_2_, customer0_.gender as gender15_2_, billingadd1_.billingaddress_id as billinga1_0_, billingadd1_.line1 as line2_16_0_, billingadd1_.line2 as line3_16_0_, billingadd1_.line3 as line4_16_0_, billingadd1_.line4 as line5_16_0_, billingadd1_.line5 as line6_16_0_, billingadd1_.customer_id as customer7_16_0_, contactdet2_.contactdetail_id as contactd1_1_, contactdet2_.homeNumber as homeNumber17_1_, contactdet2_.workNumber as workNumber17_1_, contactdet2_.mobileNumber as mobileNu4_17_1_, contactdet2_.faxNumber as faxNumber17_1_, contactdet2_.emailAddress as emailAdd6_17_1_, contactdet2_.customer_id as customer7_17_1_ from customer customer0_ left outer join billingaddress billingadd1_ on customer0_.customer_id=billingadd1_.customer_id left outer join contactdetail contactdet2_ on customer0_.customer_id=contactdet2_.customer_id where customer0_.customer_id=?
15:10:44,087 DEBUG EntityLoader:95 - Static select for entity src.Customer: select customer0_.customer_id as customer1_2_, customer0_.firstname as firstname15_2_, customer0_.lastname as lastname15_2_, customer0_.gender as gender15_2_, billingadd1_.billingaddress_id as billinga1_0_, billingadd1_.line1 as line2_16_0_, billingadd1_.line2 as line3_16_0_, billingadd1_.line3 as line4_16_0_, billingadd1_.line4 as line5_16_0_, billingadd1_.line5 as line6_16_0_, billingadd1_.customer_id as customer7_16_0_, contactdet2_.contactdetail_id as contactd1_1_, contactdet2_.homeNumber as homeNumber17_1_, contactdet2_.workNumber as workNumber17_1_, contactdet2_.mobileNumber as mobileNu4_17_1_, contactdet2_.faxNumber as faxNumber17_1_, contactdet2_.emailAddress as emailAdd6_17_1_, contactdet2_.customer_id as customer7_17_1_ from customer customer0_ left outer join billingaddress billingadd1_ on customer0_.customer_id=billingadd1_.customer_id left outer join contactdetail contactdet2_ on customer0_.customer_id=contactdet2_.customer_id where customer0_.customer_id=?
15:10:44,087 DEBUG EntityLoader:95 - Static select for entity src.Customer: select customer0_.customer_id as customer1_0_, customer0_.firstname as firstname15_0_, customer0_.lastname as lastname15_0_, customer0_.gender as gender15_0_ from customer customer0_ where customer0_.customer_id=? for update
15:10:44,087 DEBUG EntityLoader:95 - Static select for entity src.Customer: select customer0_.customer_id as customer1_0_, customer0_.firstname as firstname15_0_, customer0_.lastname as lastname15_0_, customer0_.gender as gender15_0_ from customer customer0_ where customer0_.customer_id=? for update
15:10:44,097 DEBUG EntityLoader:95 - Static select for entity src.ContactDetail: select contactdet0_.contactdetail_id as contactd1_0_, contactdet0_.homeNumber as homeNumber17_0_, contactdet0_.workNumber as workNumber17_0_, contactdet0_.mobileNumber as mobileNu4_17_0_, contactdet0_.faxNumber as faxNumber17_0_, contactdet0_.emailAddress as emailAdd6_17_0_, contactdet0_.customer_id as customer7_17_0_ from contactdetail contactdet0_ where contactdet0_.contactdetail_id=?
15:10:44,127 DEBUG EntityLoader:95 - Static select for entity src.ContactDetail: select contactdet0_.contactdetail_id as contactd1_0_, contactdet0_.homeNumber as homeNumber17_0_, contactdet0_.workNumber as workNumber17_0_, contactdet0_.mobileNumber as mobileNu4_17_0_, contactdet0_.faxNumber as faxNumber17_0_, contactdet0_.emailAddress as emailAdd6_17_0_, contactdet0_.customer_id as customer7_17_0_ from contactdetail contactdet0_ where contactdet0_.contactdetail_id=?
15:10:44,127 DEBUG EntityLoader:95 - Static select for entity src.ContactDetail: select contactdet0_.contactdetail_id as contactd1_0_, contactdet0_.homeNumber as homeNumber17_0_, contactdet0_.workNumber as workNumber17_0_, contactdet0_.mobileNumber as mobileNu4_17_0_, contactdet0_.faxNumber as faxNumber17_0_, contactdet0_.emailAddress as emailAdd6_17_0_, contactdet0_.customer_id as customer7_17_0_ from contactdetail contactdet0_ where contactdet0_.contactdetail_id=? for update
15:10:44,137 DEBUG EntityLoader:95 - Static select for entity src.ContactDetail: select contactdet0_.contactdetail_id as contactd1_0_, contactdet0_.homeNumber as homeNumber17_0_, contactdet0_.workNumber as workNumber17_0_, contactdet0_.mobileNumber as mobileNu4_17_0_, contactdet0_.faxNumber as faxNumber17_0_, contactdet0_.emailAddress as emailAdd6_17_0_, contactdet0_.customer_id as customer7_17_0_ from contactdetail contactdet0_ where contactdet0_.contactdetail_id=? for update
15:10:44,137 DEBUG EntityLoader:95 - Static select for entity src.ContactDetail: select contactdet0_.contactdetail_id as contactd1_0_, contactdet0_.homeNumber as homeNumber17_0_, contactdet0_.workNumber as workNumber17_0_, contactdet0_.mobileNumber as mobileNu4_17_0_, contactdet0_.faxNumber as faxNumber17_0_, contactdet0_.emailAddress as emailAdd6_17_0_, contactdet0_.customer_id as customer7_17_0_ from contactdetail contactdet0_ where contactdet0_.customer_id=?
15:10:44,137 DEBUG EntityLoader:95 - Static select for entity src.BillingAddress: select billingadd0_.billingaddress_id as billinga1_0_, billingadd0_.line1 as line2_16_0_, billingadd0_.line2 as line3_16_0_, billingadd0_.line3 as line4_16_0_, billingadd0_.line4 as line5_16_0_, billingadd0_.line5 as line6_16_0_, billingadd0_.customer_id as customer7_16_0_ from billingaddress billingadd0_ where billingadd0_.billingaddress_id=?
15:10:44,147 DEBUG EntityLoader:95 - Static select for entity src.BillingAddress: select billingadd0_.billingaddress_id as billinga1_0_, billingadd0_.line1 as line2_16_0_, billingadd0_.line2 as line3_16_0_, billingadd0_.line3 as line4_16_0_, billingadd0_.line4 as line5_16_0_, billingadd0_.line5 as line6_16_0_, billingadd0_.customer_id as customer7_16_0_ from billingaddress billingadd0_ where billingadd0_.billingaddress_id=?
15:10:44,157 DEBUG EntityLoader:95 - Static select for entity src.BillingAddress: select billingadd0_.billingaddress_id as billinga1_0_, billingadd0_.line1 as line2_16_0_, billingadd0_.line2 as line3_16_0_, billingadd0_.line3 as line4_16_0_, billingadd0_.line4 as line5_16_0_, billingadd0_.line5 as line6_16_0_, billingadd0_.customer_id as customer7_16_0_ from billingaddress billingadd0_ where billingadd0_.billingaddress_id=? for update
15:10:44,157 DEBUG EntityLoader:95 - Static select for entity src.BillingAddress: select billingadd0_.billingaddress_id as billinga1_0_, billingadd0_.line1 as line2_16_0_, billingadd0_.line2 as line3_16_0_, billingadd0_.line3 as line4_16_0_, billingadd0_.line4 as line5_16_0_, billingadd0_.line5 as line6_16_0_, billingadd0_.customer_id as customer7_16_0_ from billingaddress billingadd0_ where billingadd0_.billingaddress_id=? for update
15:10:44,177 DEBUG EntityLoader:95 - Static select for entity src.BillingAddress: select billingadd0_.billingaddress_id as billinga1_0_, billingadd0_.line1 as line2_16_0_, billingadd0_.line2 as line3_16_0_, billingadd0_.line3 as line4_16_0_, billingadd0_.line4 as line5_16_0_, billingadd0_.line5 as line6_16_0_, billingadd0_.customer_id as customer7_16_0_ from billingaddress billingadd0_ where billingadd0_.customer_id=?
15:10:44,177 DEBUG EntityLoader:95 - Static select for entity src.OrderItem: select orderitem0_.id as id0_, orderitem0_.product as product19_0_, orderitem0_.price as price19_0_ from orderitem orderitem0_ where orderitem0_.id=?
15:10:44,177 DEBUG EntityLoader:95 - Static select for entity src.OrderItem: select orderitem0_.id as id0_, orderitem0_.product as product19_0_, orderitem0_.price as price19_0_ from orderitem orderitem0_ where orderitem0_.id=?
15:10:44,177 DEBUG EntityLoader:95 - Static select for entity src.OrderItem: select orderitem0_.id as id0_, orderitem0_.product as product19_0_, orderitem0_.price as price19_0_ from orderitem orderitem0_ where orderitem0_.id=? for update
15:10:44,187 DEBUG EntityLoader:95 - Static select for entity src.OrderItem: select orderitem0_.id as id0_, orderitem0_.product as product19_0_, orderitem0_.price as price19_0_ from orderitem orderitem0_ where orderitem0_.id=? for update
15:10:44,187 DEBUG EntityLoader:95 - Static select for entity src.Order: select order0_.id as id0_, order0_.orderNumber as orderNum2_18_0_, order0_.datePlaced as datePlaced18_0_, order0_.shippedDate as shippedD4_18_0_ from order order0_ where order0_.id=?
15:10:44,187 DEBUG EntityLoader:95 - Static select for entity src.Order: select order0_.id as id0_, order0_.orderNumber as orderNum2_18_0_, order0_.datePlaced as datePlaced18_0_, order0_.shippedDate as shippedD4_18_0_ from order order0_ where order0_.id=?
15:10:44,197 DEBUG EntityLoader:95 - Static select for entity src.Order: select order0_.id as id0_, order0_.orderNumber as orderNum2_18_0_, order0_.datePlaced as datePlaced18_0_, order0_.shippedDate as shippedD4_18_0_ from order order0_ where order0_.id=? for update
15:10:44,197 DEBUG EntityLoader:95 - Static select for entity src.Order: select order0_.id as id0_, order0_.orderNumber as orderNum2_18_0_, order0_.datePlaced as datePlaced18_0_, order0_.shippedDate as shippedD4_18_0_ from order order0_ where order0_.id=? for update
15:10:44,197 DEBUG SessionFactoryObjectFactory:76 - registered: 8a8181e107e6dfaa0107e6e015e50003 (unnamed)
15:10:44,197 INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured
15:10:44,197 DEBUG SessionFactoryImpl:262 - instantiated session factory
15:10:44,207 INFO SessionFactoryImpl:379 - Checking 0 named queries
15:10:44,207 DEBUG SessionImpl:250 - opened session at timestamp: 4642610561871872
15:10:44,217 DEBUG JDBCTransaction:46 - begin
15:10:44,217 DEBUG ConnectionManager:296 - opening JDBC connection
15:10:44,217 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0
15:10:44,217 DEBUG DriverManagerConnectionProvider:99 - using pooled JDBC connection, pool size: 0
15:10:44,217 DEBUG JDBCTransaction:50 - current autocommit status: false
15:11:01,672 DEBUG AbstractSaveEventListener:410 - transient instance of: src.Customer
15:11:01,682 DEBUG DefaultSaveOrUpdateEventListener:159 - saving transient instance
15:11:01,682 DEBUG AbstractSaveEventListener:133 - saving [src.Customer#<null>]
15:11:01,682 DEBUG AbstractSaveEventListener:195 - executing insertions
15:11:01,682 DEBUG Cascades:836 - processing cascade ACTION_SAVE_UPDATE for: src.Customer
15:11:01,682 DEBUG Cascades:861 - done processing cascade ACTION_SAVE_UPDATE for: src.Customer
15:11:01,702 DEBUG BasicEntityPersister:1732 - Inserting entity: src.Customer (native id)
15:11:01,702 DEBUG AbstractBatcher:290 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
15:11:01,702 DEBUG SQL:324 - insert into customer (firstname, lastname, gender) values (?, ?, ?)
15:11:01,702 DEBUG AbstractBatcher:378 - preparing statement
15:11:01,712 DEBUG BasicEntityPersister:1612 - Dehydrating entity: [src.Customer#<null>]
15:11:01,712 DEBUG StringType:59 - binding 'Rory' to parameter: 1
15:11:01,722 DEBUG StringType:59 - binding 'Moynihan' to parameter: 2
15:11:01,722 DEBUG StringType:59 - binding 'M' to parameter: 3
15:11:01,722 DEBUG IdentifierGeneratorFactory:37 - Natively generated identity: 29
15:11:01,722 DEBUG AbstractBatcher:298 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
15:11:01,732 DEBUG AbstractBatcher:416 - closing statement
15:11:01,732 DEBUG Cascades:836 - processing cascade ACTION_SAVE_UPDATE for: src.Customer
15:11:01,732 DEBUG Cascades:153 - cascading to saveOrUpdate: src.BillingAddress
15:11:01,742 DEBUG AbstractSaveEventListener:410 - transient instance of: src.BillingAddress
15:11:01,742 DEBUG DefaultSaveOrUpdateEventListener:159 - saving transient instance
15:11:01,742 DEBUG AbstractSaveEventListener:133 - saving [src.BillingAddress#<null>]
15:11:01,752 DEBUG AbstractSaveEventListener:195 - executing insertions
15:11:01,752 DEBUG Cascades:836 - processing cascade ACTION_SAVE_UPDATE for: src.BillingAddress
15:11:01,752 DEBUG Cascades:861 - done processing cascade ACTION_SAVE_UPDATE for: src.BillingAddress
15:11:01,752 DEBUG BasicEntityPersister:1732 - Inserting entity: src.BillingAddress (native id)
15:11:01,782 DEBUG AbstractBatcher:290 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
15:11:01,782 DEBUG SQL:324 - insert into billingaddress (line1, line2, line3, line4, line5, customer_id) values (?, ?, ?, ?, ?, ?)
15:11:01,782 DEBUG AbstractBatcher:378 - preparing statement
15:11:01,802 DEBUG BasicEntityPersister:1612 - Dehydrating entity: [src.BillingAddress#<null>]
15:11:01,812 DEBUG StringType:59 - binding 'LL1' to parameter: 1
15:11:01,812 DEBUG StringType:59 - binding 'LL2' to parameter: 2
15:11:01,812 DEBUG StringType:59 - binding 'LL3' to parameter: 3
15:11:01,822 DEBUG StringType:52 - binding null to parameter: 4
15:11:01,822 DEBUG StringType:52 - binding null to parameter: 5
15:11:01,822 DEBUG IntegerType:52 - binding null to parameter: 6
15:11:02,063 DEBUG ConnectionManager:369 - running Session.finalize()
15:11:02,063 DEBUG ConnectionManager:369 - running Session.finalize()
15:11:02,113 DEBUG AbstractBatcher:298 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
15:11:02,123 DEBUG AbstractBatcher:416 - closing statement
15:11:02,153 DEBUG JDBCExceptionReporter:63 - could not insert: [src.BillingAddress] [insert into billingaddress (line1, line2, line3, line4, line5, customer_id) values (?, ?, ?, ?, ?, ?)]
java.sql.SQLException: Column 'customer_id' cannot be null
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2847)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1531)
at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1347)
at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:958)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1957)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1880)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1741)
at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1759)
at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:2178)
at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:34)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239)
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:240)
at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:160)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:95)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:184)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:173)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:96)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:69)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:468)
at org.hibernate.engine.Cascades$5.cascade(Cascades.java:154)
at org.hibernate.engine.Cascades.cascadeAssociation(Cascades.java:771)
at org.hibernate.engine.Cascades.cascade(Cascades.java:720)
at org.hibernate.engine.Cascades.cascade(Cascades.java:847)
at org.hibernate.event.def.AbstractSaveEventListener.cascadeAfterSave(AbstractSaveEventListener.java:363)
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:265)
at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:160)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:95)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:184)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:173)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:96)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:69)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:468)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:463)
at src.HibernateUtil.persist(HibernateUtil.java:47)
at tests.CustomerTest.testCreateCustomerAndAddress(CustomerTest.java:88)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
15:11:02,193 WARN JDBCExceptionReporter:71 - SQL Error: 1048, SQLState: 23000
15:11:02,193 ERROR JDBCExceptionReporter:72 - Column 'customer_id' cannot be null
Name and version of the database you are using:
MySQL 4
Rory