I've just tried it frommain(), with seeming same result. Here's console output, with debug turned on:
10:08:39,625 INFO Version:15 - Hibernate Annotations 3.4.0.GA 10:08:39,640 INFO Environment:560 - Hibernate 3.3.2.GA 10:08:39,640 INFO Environment:593 - hibernate.properties not found 10:08:39,656 INFO Environment:771 - Bytecode provider name : javassist 10:08:39,656 INFO Environment:652 - using JDK 1.4 java.sql.Timestamp handling 10:08:39,765 INFO Version:14 - Hibernate Commons Annotations 3.1.0.GA 10:08:39,765 INFO Configuration:1474 - configuring from resource: /hibernate.cfg.xml 10:08:39,765 INFO Configuration:1451 - Configuration resource: /hibernate.cfg.xml 10:08:39,843 DEBUG DTDEntityResolver:64 - trying to resolve system-id [http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd] 10:08:39,843 DEBUG DTDEntityResolver:66 - recognized hibernate namespace; attempting to resolve on classpath under org/hibernate/ 10:08:39,843 DEBUG DTDEntityResolver:76 - located [http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd] in classpath 10:08:39,890 DEBUG Configuration:1435 - connection.url=jdbc:sqlserver://CYBERDYNE\SS2005;databaseName=HibernateDB;integratedSecurity=false; 10:08:39,890 DEBUG Configuration:1435 - connection.driver_class=com.microsoft.sqlserver.jdbc.SQLServerDriver 10:08:39,890 DEBUG Configuration:1435 - connection.username=sa 10:08:39,890 DEBUG Configuration:1435 - connection.password=sql 10:08:39,890 DEBUG Configuration:1435 - transaction.factory_class=org.hibernate.transaction.JDBCTransactionFactory 10:08:39,890 DEBUG Configuration:1435 - current_session_context_class=thread 10:08:39,890 DEBUG Configuration:1435 - dialect=org.hibernate.dialect.SQLServerDialect 10:08:39,890 DEBUG Configuration:1435 - hibernate.show_sql=true 10:08:39,890 INFO Configuration:1589 - Configured SessionFactory: null 10:08:39,890 DEBUG Configuration:1590 - properties: {hibernate.connection.password=sql, java.runtime.name=Java(TM) SE Runtime Environment, transaction.factory_class=org.hibernate.transaction.JDBCTransactionFactory, sun.boot.library.path=C:\Program Files\Java\jre1.6.0_07\bin, java.vm.version=10.0-b23, hibernate.connection.username=sa, 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=AU, sun.java.launcher=SUN_STANDARD, sun.os.patch.level=Service Pack 3, java.vm.specification.name=Java Virtual Machine Specification, user.dir=C:\workspace\HibernateTutorial, java.runtime.version=1.6.0_07-b06, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, hibernate.current_session_context_class=thread, java.endorsed.dirs=C:\Program Files\Java\jre1.6.0_07\lib\endorsed, os.arch=x86, java.io.tmpdir=C:\DOCUME~1\John\LOCALS~1\Temp\, line.separator= , java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, os.name=Windows XP, sun.jnu.encoding=Cp1252, java.library.path=C:\Program Files\Java\jre1.6.0_07\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:\Program Files\PC Connectivity Solution\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\glassfish-v2ur2\bin;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\, java.specification.name=Java Platform API Specification, java.class.version=50.0, sun.management.compiler=HotSpot Client Compiler, hibernate.transaction.factory_class=org.hibernate.transaction.JDBCTransactionFactory, os.version=5.1, connection.password=sql, user.home=C:\Documents and Settings\John, user.timezone=Australia/Sydney, connection.username=sa, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=Cp1252, java.specification.version=1.6, hibernate.connection.driver_class=com.microsoft.sqlserver.jdbc.SQLServerDriver, user.name=John, java.class.path=C:\workspace\HibernateTutorial\bin;C:\workspace\HibernateTutorial\libs\Microsoft SQL Server JDBC Driver 2.0\sqljdbc_2.0\enu\sqljdbc4.jar;C:\workspace\HibernateTutorial\libs\hibernate-annotations-3.4.0.GA\hibernate-annotations.jar;C:\workspace\HibernateTutorial\libs\hibernate-distribution-3.3.2.GA\lib\bytecode\cglib\cglib-2.2.jar;C:\workspace\HibernateTutorial\libs\hibernate-distribution-3.3.2.GA\lib\bytecode\javassist\javassist-3.9.0.GA.jar;C:\workspace\HibernateTutorial\libs\hibernate-distribution-3.3.2.GA\lib\required\antlr-2.7.6.jar;C:\workspace\HibernateTutorial\libs\hibernate-distribution-3.3.2.GA\lib\required\commons-collections-3.1.jar;C:\workspace\HibernateTutorial\libs\hibernate-distribution-3.3.2.GA\lib\required\dom4j-1.6.1.jar;C:\workspace\HibernateTutorial\libs\hibernate-distribution-3.3.2.GA\lib\required\javassist-3.9.0.GA.jar;C:\workspace\HibernateTutorial\libs\hibernate-distribution-3.3.2.GA\lib\required\jta-1.1.jar;C:\workspace\HibernateTutorial\libs\hibernate-distribution-3.3.2.GA\lib\required\slf4j-api-1.5.8.jar;C:\workspace\HibernateTutorial\libs\hibernate-distribution-3.3.2.GA\hibernate-testing.jar;C:\workspace\HibernateTutorial\libs\hibernate-distribution-3.3.2.GA\hibernate3.jar;C:\workspace\HibernateTutorial\libs\hibernate-annotations-3.4.0.GA\lib\ejb3-persistence.jar;C:\workspace\HibernateTutorial\libs\hibernate-annotations-3.4.0.GA\lib\hibernate-commons-annotations.jar;C:\workspace\HibernateTutorial\libs\hibernate-annotations-3.4.0.GA\ivy\ivy-1.4.1.jar;C:\workspace\HibernateTutorial\libs\hibernate-annotations-3.4.0.GA\ivy\maven-ant-tasks.jar;C:\workspace\HibernateTutorial\libs\hibernate-annotations-3.4.0.GA\lib\build\ant-contrib-1.0b2.jar;C:\workspace\HibernateTutorial\libs\hibernate-annotations-3.4.0.GA\lib\build\ant-junit-1.6.5.jar;C:\workspace\HibernateTutorial\libs\hibernate-annotations-3.4.0.GA\lib\build\junit-3.8.1.jar;C:\workspace\HibernateTutorial\libs\hibernate-annotations-3.4.0.GA\lib\test\antlr.jar;C:\workspace\HibernateTutorial\libs\hibernate-annotations-3.4.0.GA\lib\test\asm-attrs.jar;C:\workspace\HibernateTutorial\libs\hibernate-annotations-3.4.0.GA\lib\test\asm.jar;C:\workspace\HibernateTutorial\libs\hibernate-annotations-3.4.0.GA\lib\test\commons-collections.jar;C:\workspace\HibernateTutorial\libs\hibernate-annotations-3.4.0.GA\lib\test\javassist.jar;C:\workspace\HibernateTutorial\libs\hibernate-annotations-3.4.0.GA\lib\test\jta.jar;C:\workspace\HibernateTutorial\libs\hibernate-annotations-3.4.0.GA\lib\test\junit.jar;C:\workspace\HibernateTutorial\libs\hibernate-annotations-3.4.0.GA\lib\test\log4j.jar;C:\workspace\HibernateTutorial\libs\hibernate-annotations-3.4.0.GA\lib\test\slf4j-log4j12.jar;C:\workspace\HibernateTutorial\libs\hibernate-annotations-3.4.0.GA\lib\dom4j.jar;C:\workspace\HibernateTutorial\libs\hibernate-annotations-3.4.0.GA\lib\hibernate-core.jar;C:\workspace\HibernateTutorial\libs\hibernate-annotations-3.4.0.GA\lib\slf4j-api.jar;C:\workspace\HibernateTutorial\libs\hibernate-distribution-3.3.2.GA\lib\optional\c3p0\c3p0-0.9.1.jar;C:\workspace\HibernateTutorial\libs\hibernate-distribution-3.3.2.GA\lib\optional\ehcache\ehcache-1.2.3.jar;C:\workspace\HibernateTutorial\libs\hibernate-distribution-3.3.2.GA\lib\optional\jbosscache\jboss-cache-1.4.1.GA.jar;C:\workspace\HibernateTutorial\libs\hibernate-distribution-3.3.2.GA\lib\optional\jbosscache2\jbosscache-core-3.1.0.GA.jar;C:\workspace\HibernateTutorial\libs\hibernate-distribution-3.3.2.GA\lib\optional\oscache\oscache-2.1.jar;C:\workspace\HibernateTutorial\libs\hibernate-distribution-3.3.2.GA\lib\optional\proxool\proxool-0.8.3.jar;C:\workspace\HibernateTutorial\libs\hibernate-distribution-3.3.2.GA\lib\optional\swarmcache\swarmcache-1.0RC2.jar;C:\Program Files\eclipse\plugins\org.junit4_4.3.1\junit.jar, hibernate.bytecode.use_reflection_optimizer=false, hibernate.show_sql=true, current_session_context_class=thread, java.vm.specification.version=1.0, java.home=C:\Program Files\Java\jre1.6.0_07, sun.arch.data.model=32, hibernate.dialect=org.hibernate.dialect.SQLServerDialect, hibernate.connection.url=jdbc:sqlserver://CYBERDYNE\SS2005;databaseName=HibernateDB;integratedSecurity=false;, user.language=en, java.specification.vendor=Sun Microsystems Inc., awt.toolkit=sun.awt.windows.WToolkit, java.vm.info=mixed mode, java.version=1.6.0_07, java.ext.dirs=C:\Program Files\Java\jre1.6.0_07\lib\ext;C:\WINDOWS\Sun\Java\lib\ext, sun.boot.class.path=C:\Program Files\Java\jre1.6.0_07\lib\resources.jar;C:\Program Files\Java\jre1.6.0_07\lib\rt.jar;C:\Program Files\Java\jre1.6.0_07\lib\sunrsasign.jar;C:\Program Files\Java\jre1.6.0_07\lib\jsse.jar;C:\Program Files\Java\jre1.6.0_07\lib\jce.jar;C:\Program Files\Java\jre1.6.0_07\lib\charsets.jar;C:\Program Files\Java\jre1.6.0_07\classes, java.vendor=Sun Microsystems Inc., connection.driver_class=com.microsoft.sqlserver.jdbc.SQLServerDriver, 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:sqlserver://CYBERDYNE\SS2005;databaseName=HibernateDB;integratedSecurity=false;, dialect=org.hibernate.dialect.SQLServerDialect, sun.cpu.isalist=pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86} 10:08:39,984 INFO Dialect:175 - Using dialect: org.hibernate.dialect.SQLServerDialect 10:08:40,031 DEBUG AnnotationConfiguration:258 - Execute first pass mapping processing 10:08:40,125 DEBUG AnnotationConfiguration:529 - Process hbm files 10:08:40,125 DEBUG AnnotationConfiguration:537 - Process annotated classes 10:08:40,125 DEBUG AnnotationConfiguration:401 - processing fk mappings (*ToOne and JoinedSubclass) 10:08:40,125 DEBUG Configuration:1167 - processing extends queue 10:08:40,125 DEBUG Configuration:1171 - processing collection mappings 10:08:40,125 DEBUG Configuration:1182 - processing native query and ResultSetMapping mappings 10:08:40,125 DEBUG Configuration:1190 - processing association property references 10:08:40,125 DEBUG Configuration:1212 - processing foreign key constraints 10:08:40,125 INFO AnnotationConfiguration:369 - Hibernate Validator not found: ignoring 10:08:40,125 DEBUG AnnotationConfiguration:258 - Execute first pass mapping processing 10:08:40,125 DEBUG AnnotationConfiguration:529 - Process hbm files 10:08:40,125 DEBUG AnnotationConfiguration:537 - Process annotated classes 10:08:40,125 DEBUG AnnotationConfiguration:401 - processing fk mappings (*ToOne and JoinedSubclass) 10:08:40,125 DEBUG Configuration:1167 - processing extends queue 10:08:40,125 DEBUG Configuration:1171 - processing collection mappings 10:08:40,125 DEBUG Configuration:1182 - processing native query and ResultSetMapping mappings 10:08:40,125 DEBUG Configuration:1190 - processing association property references 10:08:40,125 DEBUG Configuration:1212 - processing foreign key constraints 10:08:40,140 INFO SchemaExport:226 - Running hbm2ddl schema export 10:08:40,140 DEBUG SchemaExport:242 - import file not found: /import.sql 10:08:40,140 INFO SchemaExport:251 - exporting generated schema to database 10:08:40,140 INFO DriverManagerConnectionProvider:64 - Using Hibernate built-in connection pool (not for production use!) 10:08:40,140 INFO DriverManagerConnectionProvider:65 - Hibernate connection pool size: 20 10:08:40,140 INFO DriverManagerConnectionProvider:68 - autocommit mode: false 10:08:40,281 INFO DriverManagerConnectionProvider:103 - using driver: com.microsoft.sqlserver.jdbc.SQLServerDriver at URL: jdbc:sqlserver://CYBERDYNE\SS2005;databaseName=HibernateDB;integratedSecurity=false; 10:08:40,281 INFO DriverManagerConnectionProvider:106 - connection properties: {user=sa, password=sql} 10:08:40,281 DEBUG DriverManagerConnectionProvider:132 - opening new JDBC connection 10:08:41,000 DEBUG DriverManagerConnectionProvider:138 - created connection to: jdbc:sqlserver://CYBERDYNE\SS2005;databaseName=HibernateDB;integratedSecurity=false;, Isolation Level: 2 10:08:41,000 INFO SchemaExport:268 - schema export complete 10:08:41,000 INFO DriverManagerConnectionProvider:170 - cleaning up connection pool: jdbc:sqlserver://CYBERDYNE\SS2005;databaseName=HibernateDB;integratedSecurity=false;
|