I checked the "from Customer" debug data and there was no "clazz" reference. I compiled a simple example to show the error:
Main test class
Code:
public class Test{
public static void main(String[] args){
new Test();
}
public Test() {
Session s=null;
try {
SessionFactory sf = new Configuration().configure().buildSessionFactory();
s = sf.openSession();
List l = s.createSQLQuery("SELECT g.id as {girl.id} from GIRLS g","girl",model.Girl.class).list();
if(l!=null){
System.out.println("Number of records in list: " + l.size());
}
} catch (HibernateException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}
finally{
try {
s.close();
} catch (HibernateException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}
}
}
}
Hibernate config fileCode:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.query.substitutions">true 1, false 0</property>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost/test2</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">root</property>
<property name="show_sql">false</property>
<property name="dialect">net.sf.hibernate.dialect.MySQLDialect</property>
<!-- Mapping files -->
<mapping resource="model/Girl.hbm.xml"/>
</session-factory>
</hibernate-configuration>
Mapping file (in ./model) Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping package="model" default-cascade="none">
<class name="Girl" table="girls" where="deleted = 'false'" >
<id name="id" type="int" column="id">
<generator class="identity"/>
</id>
<joined-subclass name="HotGirl" table="hotgirls">
<key column="ID"/>
</joined-subclass>
</class>
</hibernate-mapping>
Girl.javaCode:
package model;
import java.io.Serializable;
import org.apache.commons.lang.builder.ToStringBuilder;
/** @author Hibernate CodeGenerator */
public class Girl implements Serializable {
/** identifier field */
private Integer id;
/** full constructor */
public Girl() {
}
public Integer getId() {
return this.id;
}
public void setId(Integer id) {
this.id = id;
}
public String toString() {
return new ToStringBuilder(this)
.append("id", getId())
.toString();
}
}
HotGirl.javaCode:
package model;
import java.io.Serializable;
import org.apache.commons.lang.builder.ToStringBuilder;
/** @author Hibernate CodeGenerator */
public class HotGirl extends Girl implements Serializable {
/** full constructor */
public HotGirl() {
}
public String toString() {
return new ToStringBuilder(this)
.append("id", getId())
.toString();
}
}
database scheme generated from hbm2ddl: Code:
alter table hotgirls drop constraint FKEF1CFD2A91B
drop table if exists girls
drop table if exists hotgirls
create table girls (id integer not null auto_increment, primary key (id))
create table hotgirls (ID integer not null, primary key (ID))
alter table hotgirls add index FKEF1CFD2A91B (ID), add constraint FKEF1CFD2A91B foreign key (ID) references girls (id)
The error only occurs when data is entered in both tables!
Code to insert some values in database :
Code:
insert into girls values(1);
insert into girls values(2);
insert into girls values(3);
insert into hotgirls values(1);
The resulting error:
0 [main] INFO net.sf.hibernate.cfg.Environment - Hibernate 2.1.6
0 [main] INFO net.sf.hibernate.cfg.Environment - hibernate.properties not found
10 [main] INFO net.sf.hibernate.cfg.Environment - using CGLIB reflection optimizer
20 [main] INFO net.sf.hibernate.cfg.Configuration - configuring from resource: /hibernate.cfg.xml
20 [main] INFO net.sf.hibernate.cfg.Configuration - Configuration resource: /hibernate.cfg.xml
621 [main] DEBUG net.sf.hibernate.util.DTDEntityResolver - trying to locate
http://hibernate.sourceforge.net/hibern ... on-2.0.dtd in classpath under net/sf/hibernate/
621 [main] DEBUG net.sf.hibernate.util.DTDEntityResolver - found
http://hibernate.sourceforge.net/hibern ... on-2.0.dtd in classpath
701 [main] DEBUG net.sf.hibernate.cfg.Configuration - hibernate.query.substitutions=true 1, false 0
701 [main] DEBUG net.sf.hibernate.cfg.Configuration - hibernate.connection.driver_class=com.mysql.jdbc.Driver
701 [main] DEBUG net.sf.hibernate.cfg.Configuration - hibernate.connection.url=jdbc:mysql://localhost/test2
701 [main] DEBUG net.sf.hibernate.cfg.Configuration - hibernate.connection.username=root
701 [main] DEBUG net.sf.hibernate.cfg.Configuration - hibernate.connection.password=root
701 [main] DEBUG net.sf.hibernate.cfg.Configuration - show_sql=false
711 [main] DEBUG net.sf.hibernate.cfg.Configuration - dialect=net.sf.hibernate.dialect.MySQLDialect
711 [main] DEBUG net.sf.hibernate.cfg.Configuration - null<-org.dom4j.tree.DefaultAttribute@e28b9 [Attribute: name resource value "model/Girl.hbm.xml"]
711 [main] INFO net.sf.hibernate.cfg.Configuration - Mapping resource: model/Girl.hbm.xml
731 [main] DEBUG net.sf.hibernate.util.DTDEntityResolver - trying to locate
http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd in classpath under net/sf/hibernate/
731 [main] DEBUG net.sf.hibernate.util.DTDEntityResolver - found
http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd in classpath
941 [main] INFO net.sf.hibernate.cfg.Binder - Mapping class: model.Girl -> girls
1031 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: id -> id, type: integer
1112 [main] INFO net.sf.hibernate.cfg.Binder - Mapping joined-subclass: model.HotGirl -> hotgirls
1112 [main] INFO net.sf.hibernate.cfg.Configuration - Configured SessionFactory: null
1112 [main] DEBUG net.sf.hibernate.cfg.Configuration - properties: {hibernate.connection.password=root, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, sun.boot.library.path=D:\libs\j2sdk\v1.4.2_06\jre\bin, java.vm.version=1.4.2_06-b03, hibernate.connection.username=root, java.vm.vendor=Sun Microsystems Inc., java.vendor.url=http://java.sun.com/, path.separator=;, java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io, idea.launcher.port=7535, user.country=NL, sun.os.patch.level=Service Pack 2, java.vm.specification.name=Java Virtual Machine Specification, user.dir=D:\projects\FirstIdeaProject, java.runtime.version=1.4.2_06-b03, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.endorsed.dirs=D:\libs\j2sdk\v1.4.2_06\jre\lib\endorsed, os.arch=x86, java.io.tmpdir=C:\DOCUME~1\ddelange\LOCALS~1\Temp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, os.name=Windows XP, sun.java2d.fontpath=, java.library.path=D:\libs\j2sdk\v1.4.2_06\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;"C:\Program Files\Symantec\Norton Ghost 2003\";C:\PROGRA~1\IBM\CLIENT~1;C:\PROGRA~1\IBM\CLIENT~1\Shared;C:\PROGRA~1\IBM\CLIENT~1\Emulator;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;"C:\Program Files\Symantec\Norton Ghost 2003\";C:\PROGRA~1\IBM\CLIENT~1;C:\PROGRA~1\IBM\CLIENT~1\Shared;C:\PROGRA~1\IBM\CLIENT~1\Emulator;;C:\cygwin\bin;C:\j2sdk1.4.2_05\bin;D:\eclipse-SDK-3.0.1-win32\eclipse\plugins\org.apache.ant_1.6.2\bin, java.specification.name=Java Platform API Specification, java.class.version=48.0, java.util.prefs.PreferencesFactory=java.util.prefs.WindowsPreferencesFactory, os.version=5.1, user.home=C:\Documents and Settings\ddelange, user.timezone=, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=windows-1252, java.specification.version=1.4, hibernate.connection.driver_class=com.mysql.jdbc.Driver, show_sql=false, user.name=ddelange, java.class.path=D:\libs\j2sdk\v1.4.2_06\jre\lib\charsets.jar;D:\libs\j2sdk\v1.4.2_06\jre\lib\jce.jar;D:\libs\j2sdk\v1.4.2_06\jre\lib\jsse.jar;D:\libs\j2sdk\v1.4.2_06\jre\lib\plugin.jar;D:\libs\j2sdk\v1.4.2_06\jre\lib\rt.jar;D:\libs\j2sdk\v1.4.2_06\jre\lib\sunrsasign.jar;D:\libs\j2sdk\v1.4.2_06\jre\lib\ext\dnsns.jar;D:\libs\j2sdk\v1.4.2_06\jre\lib\ext\ldapsec.jar;D:\libs\j2sdk\v1.4.2_06\jre\lib\ext\localedata.jar;D:\libs\j2sdk\v1.4.2_06\jre\lib\ext\sunjce_provider.jar;D:\projects\FirstIdeaProject\vikiestandard\test_classes;D:\projects\FirstIdeaProject\vikiestandard\classes;D:\libs\hibernate\hibernate-2.1.6\lib\commons-logging-1.0.4.jar;D:\libs\log4j\jakarta-log4j-1.2.8\dist\lib\log4j-1.2.8.jar;D:\libs\hibernate\hibernate-2.1.6\hibernate2.jar;D:\libs\hibernate\hibernate-2.1.6\lib\jboss-system.jar;D:\libs\hibernate\hibernate-2.1.6\lib\jboss-cache.jar;D:\libs\hibernate\hibernate-2.1.6\lib\jdbc2_0-stdext.jar;D:\libs\hibernate\hibernate-2.1.6\lib\connector.jar;D:\libs\hibernate\hibernate-2.1.6\lib\commons-pool-1.2.jar;D:\libs\hibernate\hibernate-2.1.6\lib\jgroups-2.2.3.jar;D:\libs\hibernate\hibernate-2.1.6\lib\ant-1.5.3.jar;D:\libs\hibernate\hibernate-2.1.6\lib\oscache-2.0.jar;D:\libs\hibernate\hibernate-2.1.6\lib\jaas.jar;D:\libs\hibernate\hibernate-2.1.6\lib\commons-lang-1.0.1.jar;D:\libs\hibernate\hibernate-2.1.6\lib\xalan-2.4.0.jar;D:\libs\hibernate\hibernate-2.1.6\lib\jboss-jmx.jar;D:\libs\hibernate\hibernate-2.1.6\lib\log4j-1.2.8.jar;D:\libs\hibernate\hibernate-2.1.6\lib\commons-collections-2.1.1.jar;D:\libs\hibernate\hibernate-2.1.6\lib\odmg-3.0.jar;D:\libs\hibernate\hibernate-2.1.6\lib\c3p0-0.8.4.5.jar;D:\libs\hibernate\hibernate-2.1.6\lib\jta.jar;D:\libs\hibernate\hibernate-2.1.6\lib\commons-dbcp-1.2.1.jar;D:\libs\hibernate\hibernate-2.1.6\lib\junit-3.8.1.jar;D:\libs\hibernate\hibernate-2.1.6\lib\concurrent-1.3.3.jar;D:\libs\hibernate\hibernate-2.1.6\lib\jcs-1.0-dev.jar;D:\libs\hibernate\hibernate-2.1.6\lib\jboss-common.jar;D:\libs\hibernate\hibernate-2.1.6\lib\cglib-full-2.0.2.jar;D:\libs\hibernate\hibernate-2.1.6\lib\swarmcache-1.0rc2.jar;D:\libs\hibernate\hibernate-2.1.6\lib\ehcache-0.9.jar;D:\libs\hibernate\hibernate-2.1.6\lib\xml-apis.jar;D:\libs\hibernate\hibernate-2.1.6\lib\xerces-2.4.0.jar;D:\libs\hibernate\hibernate-2.1.6\lib\proxool-0.8.3.jar;D:\libs\hibernate\hibernate-2.1.6\lib\ant-optional-1.5.3.jar;D:\libs\hibernate\hibernate-2.1.6\lib\dom4j-1.4.jar;D:\libs\mysql-connector-java-3.0.15-ga\mysql-connector-java-3.0.15-ga-bin.jar;D:\libs\mysql\mysql-connector-java-3.0.15-ga\mysql-connector-java-3.0.15-ga-bin.jar;C:\IntelliJ-IDEA-4.5\lib\idea_rt.jar, hibernate.show_sql=false, hibernate.query.substitutions=true 1, false 0, java.vm.specification.version=1.0, java.home=D:\libs\j2sdk\v1.4.2_06\jre, sun.arch.data.model=32, hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect, hibernate.connection.url=jdbc:mysql://localhost/test2, user.language=nl, java.specification.vendor=Sun Microsystems Inc., awt.toolkit=sun.awt.windows.WToolkit, hibernate.cglib.use_reflection_optimizer=true, java.vm.info=mixed mode, java.version=1.4.2_06, java.ext.dirs=D:\libs\j2sdk\v1.4.2_06\jre\lib\ext, sun.boot.class.path=D:\libs\j2sdk\v1.4.2_06\jre\lib\rt.jar;D:\libs\j2sdk\v1.4.2_06\jre\lib\i18n.jar;D:\libs\j2sdk\v1.4.2_06\jre\lib\sunrsasign.jar;D:\libs\j2sdk\v1.4.2_06\jre\lib\jsse.jar;D:\libs\j2sdk\v1.4.2_06\jre\lib\jce.jar;D:\libs\j2sdk\v1.4.2_06\jre\lib\charsets.jar;D:\libs\j2sdk\v1.4.2_06\jre\classes, java.vendor=Sun Microsystems Inc., file.separator=\, idea.launcher.library=C:\IntelliJ-IDEA-4.5\bin\breakgen.dll, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, dialect=net.sf.hibernate.dialect.MySQLDialect, sun.cpu.isalist=pentium i486 i386}
1122 [main] INFO net.sf.hibernate.cfg.Configuration - processing one-to-many association mappings
1122 [main] INFO net.sf.hibernate.cfg.Configuration - processing one-to-one association property references
1122 [main] INFO net.sf.hibernate.cfg.Configuration - processing foreign key constraints
1122 [main] DEBUG net.sf.hibernate.cfg.Configuration - resolving reference to class: model.Girl
1322 [main] INFO net.sf.hibernate.dialect.Dialect - Using dialect: net.sf.hibernate.dialect.MySQLDialect
1332 [main] INFO net.sf.hibernate.cfg.SettingsFactory - Maximim outer join fetch depth: 2
1332 [main] INFO net.sf.hibernate.cfg.SettingsFactory - Use outer join fetching: true
1332 [main] INFO net.sf.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!)
1332 [main] INFO net.sf.hibernate.connection.DriverManagerConnectionProvider - Hibernate connection pool size: 20
1342 [main] INFO net.sf.hibernate.connection.DriverManagerConnectionProvider - using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost/test2
1342 [main] INFO net.sf.hibernate.connection.DriverManagerConnectionProvider - connection properties: {user=root, password=root}
1352 [main] INFO net.sf.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
1352 [main] DEBUG net.sf.hibernate.connection.DriverManagerConnectionProvider - total checked-out connections: 0
1352 [main] DEBUG net.sf.hibernate.connection.DriverManagerConnectionProvider - opening new JDBC connection
1742 [main] DEBUG net.sf.hibernate.connection.DriverManagerConnectionProvider - created connection to: jdbc:mysql://localhost/test2, Isolation Level: 4
1742 [main] DEBUG net.sf.hibernate.connection.DriverManagerConnectionProvider - returning connection to pool, pool size: 1
1742 [main] INFO net.sf.hibernate.cfg.SettingsFactory - Use scrollable result sets: true
1742 [main] INFO net.sf.hibernate.cfg.SettingsFactory - Use JDBC3 getGeneratedKeys(): true
1742 [main] INFO net.sf.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: false
1742 [main] INFO net.sf.hibernate.cfg.SettingsFactory - Query language substitutions: {true=1, false=0}
1742 [main] INFO net.sf.hibernate.cfg.SettingsFactory - cache provider: net.sf.hibernate.cache.EhCacheProvider
1752 [main] INFO net.sf.hibernate.cfg.Configuration - instantiating and configuring caches
1933 [main] INFO net.sf.hibernate.impl.SessionFactoryImpl - building session factory
1933 [main] DEBUG net.sf.hibernate.impl.SessionFactoryImpl - instantiating session factory with properties: {hibernate.connection.password=root, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, sun.boot.library.path=D:\libs\j2sdk\v1.4.2_06\jre\bin, java.vm.version=1.4.2_06-b03, hibernate.connection.username=root, java.vm.vendor=Sun Microsystems Inc., java.vendor.url=http://java.sun.com/, path.separator=;, java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io, idea.launcher.port=7535, user.country=NL, sun.os.patch.level=Service Pack 2, java.vm.specification.name=Java Virtual Machine Specification, user.dir=D:\projects\FirstIdeaProject, java.runtime.version=1.4.2_06-b03, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.endorsed.dirs=D:\libs\j2sdk\v1.4.2_06\jre\lib\endorsed, os.arch=x86, java.io.tmpdir=C:\DOCUME~1\ddelange\LOCALS~1\Temp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, os.name=Windows XP, sun.java2d.fontpath=, java.library.path=D:\libs\j2sdk\v1.4.2_06\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;"C:\Program Files\Symantec\Norton Ghost 2003\";C:\PROGRA~1\IBM\CLIENT~1;C:\PROGRA~1\IBM\CLIENT~1\Shared;C:\PROGRA~1\IBM\CLIENT~1\Emulator;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;"C:\Program Files\Symantec\Norton Ghost 2003\";C:\PROGRA~1\IBM\CLIENT~1;C:\PROGRA~1\IBM\CLIENT~1\Shared;C:\PROGRA~1\IBM\CLIENT~1\Emulator;;C:\cygwin\bin;C:\j2sdk1.4.2_05\bin;D:\eclipse-SDK-3.0.1-win32\eclipse\plugins\org.apache.ant_1.6.2\bin, java.specification.name=Java Platform API Specification, java.class.version=48.0, java.util.prefs.PreferencesFactory=java.util.prefs.WindowsPreferencesFactory, os.version=5.1, user.home=C:\Documents and Settings\ddelange, user.timezone=, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=windows-1252, java.specification.version=1.4, hibernate.connection.driver_class=com.mysql.jdbc.Driver, show_sql=false, user.name=ddelange, java.class.path=D:\libs\j2sdk\v1.4.2_06\jre\lib\charsets.jar;D:\libs\j2sdk\v1.4.2_06\jre\lib\jce.jar;D:\libs\j2sdk\v1.4.2_06\jre\lib\jsse.jar;D:\libs\j2sdk\v1.4.2_06\jre\lib\plugin.jar;D:\libs\j2sdk\v1.4.2_06\jre\lib\rt.jar;D:\libs\j2sdk\v1.4.2_06\jre\lib\sunrsasign.jar;D:\libs\j2sdk\v1.4.2_06\jre\lib\ext\dnsns.jar;D:\libs\j2sdk\v1.4.2_06\jre\lib\ext\ldapsec.jar;D:\libs\j2sdk\v1.4.2_06\jre\lib\ext\localedata.jar;D:\libs\j2sdk\v1.4.2_06\jre\lib\ext\sunjce_provider.jar;D:\projects\FirstIdeaProject\vikiestandard\test_classes;D:\projects\FirstIdeaProject\vikiestandard\classes;D:\libs\hibernate\hibernate-2.1.6\lib\commons-logging-1.0.4.jar;D:\libs\log4j\jakarta-log4j-1.2.8\dist\lib\log4j-1.2.8.jar;D:\libs\hibernate\hibernate-2.1.6\hibernate2.jar;D:\libs\hibernate\hibernate-2.1.6\lib\jboss-system.jar;D:\libs\hibernate\hibernate-2.1.6\lib\jboss-cache.jar;D:\libs\hibernate\hibernate-2.1.6\lib\jdbc2_0-stdext.jar;D:\libs\hibernate\hibernate-2.1.6\lib\connector.jar;D:\libs\hibernate\hibernate-2.1.6\lib\commons-pool-1.2.jar;D:\libs\hibernate\hibernate-2.1.6\lib\jgroups-2.2.3.jar;D:\libs\hibernate\hibernate-2.1.6\lib\ant-1.5.3.jar;D:\libs\hibernate\hibernate-2.1.6\lib\oscache-2.0.jar;D:\libs\hibernate\hibernate-2.1.6\lib\jaas.jar;D:\libs\hibernate\hibernate-2.1.6\lib\commons-lang-1.0.1.jar;D:\libs\hibernate\hibernate-2.1.6\lib\xalan-2.4.0.jar;D:\libs\hibernate\hibernate-2.1.6\lib\jboss-jmx.jar;D:\libs\hibernate\hibernate-2.1.6\lib\log4j-1.2.8.jar;D:\libs\hibernate\hibernate-2.1.6\lib\commons-collections-2.1.1.jar;D:\libs\hibernate\hibernate-2.1.6\lib\odmg-3.0.jar;D:\libs\hibernate\hibernate-2.1.6\lib\c3p0-0.8.4.5.jar;D:\libs\hibernate\hibernate-2.1.6\lib\jta.jar;D:\libs\hibernate\hibernate-2.1.6\lib\commons-dbcp-1.2.1.jar;D:\libs\hibernate\hibernate-2.1.6\lib\junit-3.8.1.jar;D:\libs\hibernate\hibernate-2.1.6\lib\concurrent-1.3.3.jar;D:\libs\hibernate\hibernate-2.1.6\lib\jcs-1.0-dev.jar;D:\libs\hibernate\hibernate-2.1.6\lib\jboss-common.jar;D:\libs\hibernate\hibernate-2.1.6\lib\cglib-full-2.0.2.jar;D:\libs\hibernate\hibernate-2.1.6\lib\swarmcache-1.0rc2.jar;D:\libs\hibernate\hibernate-2.1.6\lib\ehcache-0.9.jar;D:\libs\hibernate\hibernate-2.1.6\lib\xml-apis.jar;D:\libs\hibernate\hibernate-2.1.6\lib\xerces-2.4.0.jar;D:\libs\hibernate\hibernate-2.1.6\lib\proxool-0.8.3.jar;D:\libs\hibernate\hibernate-2.1.6\lib\ant-optional-1.5.3.jar;D:\libs\hibernate\hibernate-2.1.6\lib\dom4j-1.4.jar;D:\libs\mysql-connector-java-3.0.15-ga\mysql-connector-java-3.0.15-ga-bin.jar;D:\libs\mysql\mysql-connector-java-3.0.15-ga\mysql-connector-java-3.0.15-ga-bin.jar;C:\IntelliJ-IDEA-4.5\lib\idea_rt.jar, hibernate.show_sql=false, hibernate.query.substitutions=true 1, false 0, java.vm.specification.version=1.0, java.home=D:\libs\j2sdk\v1.4.2_06\jre, sun.arch.data.model=32, hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect, hibernate.connection.url=jdbc:mysql://localhost/test2, user.language=nl, java.specification.vendor=Sun Microsystems Inc., awt.toolkit=sun.awt.windows.WToolkit, hibernate.cglib.use_reflection_optimizer=true, java.vm.info=mixed mode, java.version=1.4.2_06, java.ext.dirs=D:\libs\j2sdk\v1.4.2_06\jre\lib\ext, sun.boot.class.path=D:\libs\j2sdk\v1.4.2_06\jre\lib\rt.jar;D:\libs\j2sdk\v1.4.2_06\jre\lib\i18n.jar;D:\libs\j2sdk\v1.4.2_06\jre\lib\sunrsasign.jar;D:\libs\j2sdk\v1.4.2_06\jre\lib\jsse.jar;D:\libs\j2sdk\v1.4.2_06\jre\lib\jce.jar;D:\libs\j2sdk\v1.4.2_06\jre\lib\charsets.jar;D:\libs\j2sdk\v1.4.2_06\jre\classes, java.vendor=Sun Microsystems Inc., file.separator=\, idea.launcher.library=C:\IntelliJ-IDEA-4.5\bin\breakgen.dll, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, dialect=net.sf.hibernate.dialect.MySQLDialect, sun.cpu.isalist=pentium i486 i386}
2544 [main] DEBUG net.sf.hibernate.impl.SessionFactoryObjectFactory - initializing class SessionFactoryObjectFactory
2544 [main] DEBUG net.sf.hibernate.impl.SessionFactoryObjectFactory - registered: 8a8a81f8003d3afc01003d3afff80000 (unnamed)
2544 [main] INFO net.sf.hibernate.impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured
2544 [main] DEBUG net.sf.hibernate.impl.SessionFactoryImpl - instantiated session factory
2634 [main] DEBUG net.sf.hibernate.impl.SessionImpl - opened session
2644 [main] DEBUG net.sf.hibernate.impl.SessionImpl - SQL query: SELECT g.id as {girl.id} from GIRLS g
2654 [main] DEBUG net.sf.hibernate.impl.SessionImpl - flushing session
2654 [main] DEBUG net.sf.hibernate.impl.SessionImpl - Flushing entities and processing referenced collections
2654 [main] DEBUG net.sf.hibernate.impl.SessionImpl - Processing unreferenced collections
2654 [main] DEBUG net.sf.hibernate.impl.SessionImpl - Scheduling collection removes/(re)creates/updates
2654 [main] DEBUG net.sf.hibernate.impl.SessionImpl - Flushed: 0 insertions, 0 updates, 0 deletions to 0 objects
2654 [main] DEBUG net.sf.hibernate.impl.SessionImpl - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
2654 [main] DEBUG net.sf.hibernate.impl.SessionImpl - Dont need to execute flush
2654 [main] DEBUG net.sf.hibernate.impl.BatcherImpl - about to open: 0 open PreparedStatements, 0 open ResultSets
2654 [main] DEBUG net.sf.hibernate.connection.DriverManagerConnectionProvider - total checked-out connections: 0
2654 [main] DEBUG net.sf.hibernate.connection.DriverManagerConnectionProvider - using pooled JDBC connection, pool size: 0
2654 [main] DEBUG net.sf.hibernate.SQL - SELECT g.id as id0_ from GIRLS g
2654 [main] DEBUG net.sf.hibernate.impl.BatcherImpl - preparing statement
2674 [main] DEBUG net.sf.hibernate.loader.Loader - processing result set
2684 [main] DEBUG net.sf.hibernate.type.IntegerType - returning '1' as column: id0_
2684 [main] DEBUG net.sf.hibernate.loader.Loader - result row: 1
2694 [main] DEBUG net.sf.hibernate.util.JDBCExceptionReporter - SQL Exception
java.sql.SQLException: Column 'clazz_0_' not found.
at com.mysql.jdbc.ResultSet.findColumn(ResultSet.java:2317)
at com.mysql.jdbc.ResultSet.getInt(ResultSet.java:1287)
at net.sf.hibernate.type.IntegerType.get(IntegerType.java:18)
at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:62)
at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:74)
at net.sf.hibernate.loader.Loader.getInstanceClass(Loader.java:648)
at net.sf.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:569)
at net.sf.hibernate.loader.Loader.getRow(Loader.java:501)
at net.sf.hibernate.loader.Loader.getRowFromResultSet(Loader.java:213)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:281)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
at net.sf.hibernate.loader.Loader.doList(Loader.java:1033)
at net.sf.hibernate.loader.Loader.list(Loader.java:1024)
at net.sf.hibernate.loader.SQLLoader.list(SQLLoader.java:92)
at net.sf.hibernate.impl.SessionImpl.findBySQL(SessionImpl.java:3806)
at net.sf.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:52)
at Test.<init>(Test.java:32)
at Test.main(Test.java:23)
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:324)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)
2694 [main] WARN net.sf.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: S0022
2694 [main] ERROR net.sf.hibernate.util.JDBCExceptionReporter - Column 'clazz_0_' not found.
2694 [main] DEBUG net.sf.hibernate.impl.BatcherImpl - done closing: 0 open PreparedStatements, 0 open ResultSets
2694 [main] DEBUG net.sf.hibernate.impl.BatcherImpl - closing statement
2704 [main] DEBUG net.sf.hibernate.util.JDBCExceptionReporter - SQL Exception
java.sql.SQLException: Column 'clazz_0_' not found.
at com.mysql.jdbc.ResultSet.findColumn(ResultSet.java:2317)
at com.mysql.jdbc.ResultSet.getInt(ResultSet.java:1287)
at net.sf.hibernate.type.IntegerType.get(IntegerType.java:18)
at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:62)
at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:74)
at net.sf.hibernate.loader.Loader.getInstanceClass(Loader.java:648)
at net.sf.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:569)
at net.sf.hibernate.loader.Loader.getRow(Loader.java:501)
at net.sf.hibernate.loader.Loader.getRowFromResultSet(Loader.java:213)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:281)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
at net.sf.hibernate.loader.Loader.doList(Loader.java:1033)
at net.sf.hibernate.loader.Loader.list(Loader.java:1024)
at net.sf.hibernate.loader.SQLLoader.list(SQLLoader.java:92)
at net.sf.hibernate.impl.SessionImpl.findBySQL(SessionImpl.java:3806)
at net.sf.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:52)
at Test.<init>(Test.java:32)
at Test.main(Test.java:23)
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:324)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)
2704 [main] WARN net.sf.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: S0022
2704 [main] ERROR net.sf.hibernate.util.JDBCExceptionReporter - Column 'clazz_0_' not found.
2704 [main] ERROR net.sf.hibernate.util.JDBCExceptionReporter - SQLException occurred
java.sql.SQLException: Column 'clazz_0_' not found.
at com.mysql.jdbc.ResultSet.findColumn(ResultSet.java:2317)
at com.mysql.jdbc.ResultSet.getInt(ResultSet.java:1287)
at net.sf.hibernate.type.IntegerType.get(IntegerType.java:18)
at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:62)
at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:74)
at net.sf.hibernate.loader.Loader.getInstanceClass(Loader.java:648)
at net.sf.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:569)
at net.sf.hibernate.loader.Loader.getRow(Loader.java:501)
at net.sf.hibernate.loader.Loader.getRowFromResultSet(Loader.java:213)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:281)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
at net.sf.hibernate.loader.Loader.doList(Loader.java:1033)
at net.sf.hibernate.loader.Loader.list(Loader.java:1024)
at net.sf.hibernate.loader.SQLLoader.list(SQLLoader.java:92)
at net.sf.hibernate.impl.SessionImpl.findBySQL(SessionImpl.java:3806)
at net.sf.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:52)
at Test.<init>(Test.java:32)
at Test.main(Test.java:23)
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:324)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)
net.sf.hibernate.JDBCException: SQLException occurred
at net.sf.hibernate.impl.SessionImpl.findBySQL(SessionImpl.java:3809)
at net.sf.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:52)
at Test.<init>(Test.java:32)
at Test.main(Test.java:23)
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:324)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)
Caused by: java.sql.SQLException: Column 'clazz_0_' not found.
at com.mysql.jdbc.ResultSet.findColumn(ResultSet.java:2317)
at com.mysql.jdbc.ResultSet.getInt(ResultSet.java:1287)
at net.sf.hibernate.type.IntegerType.get(IntegerType.java:18)
at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:62)
at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:74)
at net.sf.hibernate.loader.Loader.getInstanceClass(Loader.java:648)
at net.sf.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:569)
at net.sf.hibernate.loader.Loader.getRow(Loader.java:501)
at net.sf.hibernate.loader.Loader.getRowFromResultSet(Loader.java:213)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:281)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
at net.sf.hibernate.loader.Loader.doList(Loader.java:1033)
at net.sf.hibernate.loader.Loader.list(Loader.java:1024)
at net.sf.hibernate.loader.SQLLoader.list(SQLLoader.java:92)
at net.sf.hibernate.impl.SessionImpl.findBySQL(SessionImpl.java:3806)
... 8 more
2714 [main] DEBUG net.sf.hibernate.impl.SessionImpl - closing session
2714 [main] DEBUG net.sf.hibernate.impl.SessionImpl - disconnecting session
2714 [main] DEBUG net.sf.hibernate.connection.DriverManagerConnectionProvider - returning connection to pool, pool size: 1
2714 [main] DEBUG net.sf.hibernate.impl.SessionImpl - transaction completion