Hi Max
How are you executing your tests? How should I execute a single TestCase?
Being used to IntelliJ (and the wonderful support for JUnit) I would like to be able to run them within the IDE but I think that could be quite a mission.
For example when I run the OverrideBinderTest.testColumnPropertyNameMappings I get an exception due the property not being found Output below.
When I run the OverrideBinderTest 5/17 fail.
Any pointers?
Cheers
Shane
Code:
12:11:06,343 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
12:11:06,343 INFO DriverManagerConnectionProvider:147 - cleaning up connection pool: jdbc:hsqldb:.
12:11:06,343 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1
12:11:06,343 INFO DriverManagerConnectionProvider:45 - autocommit mode: false
12:11:06,343 INFO DriverManagerConnectionProvider:80 - using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:.
12:11:06,343 INFO DriverManagerConnectionProvider:86 - connection properties: {user=sa, password=****}
12:11:06,343 INFO SettingsFactory:78 - RDBMS: HSQL Database Engine, version: 1.8.0
12:11:06,343 INFO SettingsFactory:79 - JDBC driver: HSQL Database Engine Driver, version: 1.8.0
12:11:06,353 INFO Dialect:106 - Using dialect: org.hibernate.dialect.HSQLDialect
12:11:06,353 INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
12:11:06,353 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
12:11:06,363 INFO SettingsFactory:126 - Automatic flush during beforeCompletion(): disabled
12:11:06,363 INFO SettingsFactory:130 - Automatic session close at end of transaction: disabled
12:11:06,363 INFO SettingsFactory:137 - JDBC batch size: 15
12:11:06,363 INFO SettingsFactory:140 - JDBC batch updates for versioned data: enabled
12:11:06,363 INFO SettingsFactory:145 - Scrollable result sets: enabled
12:11:06,363 INFO SettingsFactory:153 - JDBC3 getGeneratedKeys(): disabled
12:11:06,363 INFO SettingsFactory:161 - Connection release mode: auto
12:11:06,363 INFO SettingsFactory:185 - Maximum outer join fetch depth: 1
12:11:06,363 INFO SettingsFactory:188 - Default batch fetch size: 8
12:11:06,363 INFO SettingsFactory:192 - Generate SQL with comments: disabled
12:11:06,363 INFO SettingsFactory:196 - Order SQL updates by primary key: enabled
12:11:06,373 INFO SettingsFactory:357 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
12:11:06,373 INFO ASTQueryTranslatorFactory:24 - Using ASTQueryTranslatorFactory
12:11:06,373 INFO SettingsFactory:204 - Query language substitutions: {no='N', true=1, yes='Y', false=0}
12:11:06,373 INFO SettingsFactory:210 - Second-level cache: enabled
12:11:06,373 INFO SettingsFactory:214 - Query cache: disabled
12:11:06,373 INFO SettingsFactory:344 - Cache provider: org.hibernate.cache.HashtableCacheProvider
12:11:06,373 INFO SettingsFactory:229 - Optimize cache for minimal puts: disabled
12:11:06,373 INFO SettingsFactory:234 - Cache region prefix: hibernate.test
12:11:06,373 INFO SettingsFactory:238 - Structured second-level cache entries: disabled
12:11:06,373 INFO SettingsFactory:265 - Statistics: disabled
12:11:06,373 INFO SettingsFactory:269 - Deleted entity synthetic identifier rollback: disabled
12:11:06,373 INFO SettingsFactory:284 - Default entity-mode: pojo
Execute: drop table excolumns
Execute: drop table parent
Execute: drop table children
Execute: drop table customer
Execute: drop table orders
java.sql.SQLException: Table not found: EXCOLUMNS in statement [drop table excolumns] for drop table excolumns
java.sql.SQLException: Table not found: PARENT in statement [drop table parent] for drop table parent
java.sql.SQLException: Table not found: CHILDREN in statement [drop table children] for drop table children
java.sql.SQLException: Table not found: CUSTOMER in statement [drop table customer] for drop table customer
java.sql.SQLException: Table not found: ORDERS in statement [drop table orders] for drop table orders
java.sql.SQLException: Table not found: INTHEMIDDLE in statement [drop table inthemiddle] for drop table inthemiddle
java.sql.SQLException: Table not found: MISC_TYPES in statement [drop table misc_types] for drop table misc_types
Execute: drop table inthemiddle
Execute: drop table misc_types
Execute: drop table defunct_table
java.sql.SQLException: Table not found: DEFUNCT_TABLE in statement [drop table defunct_table] for drop table defunct_table
java.sql.SQLException: Table not found: DUMMY in statement [drop table dummy] for drop table dummy
Execute: drop table dummy
12:11:06,383 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
12:11:06,383 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1
12:11:06,383 INFO DriverManagerConnectionProvider:45 - autocommit mode: false
12:11:06,383 INFO DriverManagerConnectionProvider:80 - using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:.
12:11:06,383 INFO DriverManagerConnectionProvider:86 - connection properties: {user=sa, password=****}
12:11:06,393 INFO SettingsFactory:78 - RDBMS: HSQL Database Engine, version: 1.8.0
12:11:06,393 INFO SettingsFactory:79 - JDBC driver: HSQL Database Engine Driver, version: 1.8.0
12:11:06,393 INFO DriverManagerConnectionProvider:147 - cleaning up connection pool: jdbc:hsqldb:.
12:11:06,393 INFO Dialect:106 - Using dialect: org.hibernate.dialect.HSQLDialect
12:11:06,393 INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
12:11:06,393 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
12:11:06,393 INFO SettingsFactory:126 - Automatic flush during beforeCompletion(): disabled
12:11:06,393 INFO SettingsFactory:130 - Automatic session close at end of transaction: disabled
12:11:06,393 INFO SettingsFactory:137 - JDBC batch size: 15
12:11:06,393 INFO SettingsFactory:140 - JDBC batch updates for versioned data: enabled
12:11:06,393 INFO SettingsFactory:145 - Scrollable result sets: enabled
12:11:06,393 INFO SettingsFactory:153 - JDBC3 getGeneratedKeys(): disabled
12:11:06,403 INFO SettingsFactory:161 - Connection release mode: auto
12:11:06,403 INFO SettingsFactory:185 - Maximum outer join fetch depth: 1
12:11:06,403 INFO SettingsFactory:188 - Default batch fetch size: 8
12:11:06,403 INFO SettingsFactory:192 - Generate SQL with comments: disabled
12:11:06,403 INFO SettingsFactory:196 - Order SQL updates by primary key: enabled
12:11:06,403 INFO SettingsFactory:357 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
12:11:06,403 INFO ASTQueryTranslatorFactory:24 - Using ASTQueryTranslatorFactory
12:11:06,403 INFO SettingsFactory:204 - Query language substitutions: {no='N', true=1, yes='Y', false=0}
12:11:06,403 INFO SettingsFactory:210 - Second-level cache: enabled
12:11:06,403 INFO SettingsFactory:214 - Query cache: disabled
12:11:06,403 INFO SettingsFactory:344 - Cache provider: org.hibernate.cache.HashtableCacheProvider
12:11:06,403 INFO SettingsFactory:229 - Optimize cache for minimal puts: disabled
12:11:06,403 INFO SettingsFactory:234 - Cache region prefix: hibernate.test
12:11:06,403 INFO SettingsFactory:238 - Structured second-level cache entries: disabled
12:11:06,403 INFO SettingsFactory:265 - Statistics: disabled
12:11:06,403 INFO SettingsFactory:269 - Deleted entity synthetic identifier rollback: disabled
12:11:06,413 INFO SettingsFactory:284 - Default entity-mode: pojo
12:11:06,413 INFO OverrideRepository:113 - Mapping resource: org/hibernate/tool/test/jdbc2cfg/overridetest.reveng.xml
12:11:06,423 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
12:11:06,423 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1
12:11:06,423 INFO DriverManagerConnectionProvider:45 - autocommit mode: false
12:11:06,423 INFO DriverManagerConnectionProvider:80 - using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:.
12:11:06,423 INFO DriverManagerConnectionProvider:86 - connection properties: {user=sa, password=****}
12:11:06,433 INFO SettingsFactory:78 - RDBMS: HSQL Database Engine, version: 1.8.0
12:11:06,433 INFO SettingsFactory:79 - JDBC driver: HSQL Database Engine Driver, version: 1.8.0
12:11:06,433 INFO Dialect:106 - Using dialect: org.hibernate.dialect.HSQLDialect
12:11:06,433 INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
12:11:06,433 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
12:11:06,433 INFO SettingsFactory:126 - Automatic flush during beforeCompletion(): disabled
12:11:06,433 INFO SettingsFactory:130 - Automatic session close at end of transaction: disabled
12:11:06,433 INFO SettingsFactory:137 - JDBC batch size: 15
12:11:06,433 INFO SettingsFactory:140 - JDBC batch updates for versioned data: enabled
12:11:06,433 INFO SettingsFactory:145 - Scrollable result sets: enabled
12:11:06,433 INFO SettingsFactory:153 - JDBC3 getGeneratedKeys(): disabled
12:11:06,433 INFO SettingsFactory:161 - Connection release mode: auto
12:11:06,443 INFO SettingsFactory:185 - Maximum outer join fetch depth: 1
12:11:06,443 INFO SettingsFactory:188 - Default batch fetch size: 8
12:11:06,443 INFO SettingsFactory:192 - Generate SQL with comments: disabled
12:11:06,443 INFO SettingsFactory:196 - Order SQL updates by primary key: enabled
12:11:06,443 INFO SettingsFactory:357 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
12:11:06,443 INFO ASTQueryTranslatorFactory:24 - Using ASTQueryTranslatorFactory
12:11:06,443 INFO SettingsFactory:204 - Query language substitutions: {no='N', true=1, yes='Y', false=0}
12:11:06,443 INFO SettingsFactory:210 - Second-level cache: enabled
12:11:06,443 INFO SettingsFactory:214 - Query cache: disabled
12:11:06,443 INFO SettingsFactory:344 - Cache provider: org.hibernate.cache.HashtableCacheProvider
12:11:06,443 INFO SettingsFactory:229 - Optimize cache for minimal puts: disabled
12:11:06,443 INFO SettingsFactory:234 - Cache region prefix: hibernate.test
12:11:06,443 INFO SettingsFactory:238 - Structured second-level cache entries: disabled
12:11:06,453 INFO SettingsFactory:265 - Statistics: disabled
12:11:06,453 INFO SettingsFactory:269 - Deleted entity synthetic identifier rollback: disabled
12:11:06,453 INFO SettingsFactory:284 - Default entity-mode: pojo
Execute: create table dummy (id numeric(10,0) not null, primary key (id) )
Execute: create table defunct_table ( id numeric(10,0) not null, name varchar(20), shortname varchar(5), flag varchar(1), dumid numeric(10,0), primary key (id), foreign key (dumid) references dummy)
Execute: create table misc_types ( id numeric(10,0) not null, name varchar(20), shortname varchar(5), flag varchar(1), primary key (id) )
Execute: create table inthemiddle ( miscid numeric(10,0), defunctid numeric(10,0), foreign key (miscid) references misc_types, foreign key (defunctid) references defunct_table )
Execute: create table customer ( custid varchar(10), name varchar(20) )
Execute: create table orders ( orderid varchar(10), name varchar(20), custid varchar(10), completed numeric(1) not null, verified numeric(1) )
Execute: create table parent ( id varchar(10), name varchar(20))
Execute: create table children ( id varchar(10), parentid varchar(10), name varchar(20) )
Execute: create table excolumns (id varchar(12), name varchar(20), excolumn numeric(10,0) )
12:11:06,453 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
12:11:06,453 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1
12:11:06,453 INFO DriverManagerConnectionProvider:45 - autocommit mode: false
12:11:06,463 INFO DriverManagerConnectionProvider:80 - using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:.
12:11:06,463 INFO DriverManagerConnectionProvider:86 - connection properties: {user=sa, password=****}
12:11:06,463 INFO SettingsFactory:78 - RDBMS: HSQL Database Engine, version: 1.8.0
12:11:06,463 INFO SettingsFactory:79 - JDBC driver: HSQL Database Engine Driver, version: 1.8.0
12:11:06,463 INFO Dialect:106 - Using dialect: org.hibernate.dialect.HSQLDialect
12:11:06,463 INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
12:11:06,463 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
12:11:06,463 INFO SettingsFactory:126 - Automatic flush during beforeCompletion(): disabled
12:11:06,463 INFO SettingsFactory:130 - Automatic session close at end of transaction: disabled
12:11:06,463 INFO SettingsFactory:137 - JDBC batch size: 15
12:11:06,473 INFO SettingsFactory:140 - JDBC batch updates for versioned data: enabled
12:11:06,473 INFO SettingsFactory:145 - Scrollable result sets: enabled
12:11:06,473 INFO SettingsFactory:153 - JDBC3 getGeneratedKeys(): disabled
12:11:06,473 INFO SettingsFactory:161 - Connection release mode: auto
12:11:06,473 INFO SettingsFactory:185 - Maximum outer join fetch depth: 1
12:11:06,473 INFO SettingsFactory:188 - Default batch fetch size: 8
12:11:06,473 INFO SettingsFactory:192 - Generate SQL with comments: disabled
12:11:06,473 INFO SettingsFactory:196 - Order SQL updates by primary key: enabled
12:11:06,473 INFO SettingsFactory:357 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
12:11:06,473 INFO ASTQueryTranslatorFactory:24 - Using ASTQueryTranslatorFactory
12:11:06,483 INFO SettingsFactory:204 - Query language substitutions: {no='N', true=1, yes='Y', false=0}
12:11:06,483 INFO SettingsFactory:210 - Second-level cache: enabled
12:11:06,483 INFO SettingsFactory:214 - Query cache: disabled
12:11:06,483 INFO SettingsFactory:344 - Cache provider: org.hibernate.cache.HashtableCacheProvider
12:11:06,483 INFO SettingsFactory:229 - Optimize cache for minimal puts: disabled
12:11:06,483 INFO SettingsFactory:234 - Cache region prefix: hibernate.test
12:11:06,483 INFO SettingsFactory:238 - Structured second-level cache entries: disabled
12:11:06,483 INFO SettingsFactory:265 - Statistics: disabled
12:11:06,483 INFO SettingsFactory:269 - Deleted entity synthetic identifier rollback: disabled
12:11:06,483 INFO SettingsFactory:284 - Default entity-mode: pojo
12:11:06,513 WARN JDBCReader:356 - The JDBC driver didn't report any primary key columns in CHILDREN. Asking rev.eng. strategy
12:11:06,513 WARN JDBCReader:368 - Rev.eng. strategy did not report any primary key columns for CHILDREN
12:11:06,513 WARN JDBCReader:356 - The JDBC driver didn't report any primary key columns in CUSTOMER. Asking rev.eng. strategy
12:11:06,513 WARN JDBCReader:368 - Rev.eng. strategy did not report any primary key columns for CUSTOMER
12:11:06,523 WARN JDBCReader:356 - The JDBC driver didn't report any primary key columns in EXCOLUMNS. Asking rev.eng. strategy
12:11:06,523 WARN JDBCReader:368 - Rev.eng. strategy did not report any primary key columns for EXCOLUMNS
12:11:06,523 WARN JDBCReader:356 - The JDBC driver didn't report any primary key columns in INTHEMIDDLE. Asking rev.eng. strategy
12:11:06,523 WARN JDBCReader:368 - Rev.eng. strategy did not report any primary key columns for INTHEMIDDLE
12:11:06,533 WARN JDBCReader:356 - The JDBC driver didn't report any primary key columns in ORDERS. Asking rev.eng. strategy
12:11:06,533 WARN JDBCReader:368 - Rev.eng. strategy did not report any primary key columns for ORDERS
12:11:06,533 WARN JDBCReader:356 - The JDBC driver didn't report any primary key columns in PARENT. Asking rev.eng. strategy
12:11:06,533 WARN JDBCReader:368 - Rev.eng. strategy did not report any primary key columns for PARENT
12:11:06,543 INFO DriverManagerConnectionProvider:147 - cleaning up connection pool: jdbc:hsqldb:.
12:11:06,543 INFO OverrideRepository:113 - Mapping resource: org/hibernate/tool/test/jdbc2cfg/overridetest.reveng.xml
12:11:06,583 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
12:11:06,583 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1
12:11:06,583 INFO DriverManagerConnectionProvider:45 - autocommit mode: false
12:11:06,583 INFO DriverManagerConnectionProvider:80 - using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:.
12:11:06,583 INFO DriverManagerConnectionProvider:86 - connection properties: {user=sa, password=****}
12:11:06,583 INFO SettingsFactory:78 - RDBMS: HSQL Database Engine, version: 1.8.0
12:11:06,583 INFO SettingsFactory:79 - JDBC driver: HSQL Database Engine Driver, version: 1.8.0
12:11:06,593 INFO Dialect:106 - Using dialect: org.hibernate.dialect.HSQLDialect
12:11:06,593 INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
12:11:06,593 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
12:11:06,603 INFO SettingsFactory:126 - Automatic flush during beforeCompletion(): disabled
12:11:06,603 INFO SettingsFactory:130 - Automatic session close at end of transaction: disabled
12:11:06,603 INFO SettingsFactory:137 - JDBC batch size: 15
12:11:06,603 INFO SettingsFactory:140 - JDBC batch updates for versioned data: enabled
12:11:06,603 INFO SettingsFactory:145 - Scrollable result sets: enabled
12:11:06,603 INFO SettingsFactory:153 - JDBC3 getGeneratedKeys(): disabled
12:11:06,603 INFO SettingsFactory:161 - Connection release mode: auto
12:11:06,603 INFO SettingsFactory:185 - Maximum outer join fetch depth: 1
12:11:06,603 INFO SettingsFactory:188 - Default batch fetch size: 8
12:11:06,603 INFO SettingsFactory:192 - Generate SQL with comments: disabled
12:11:06,603 INFO SettingsFactory:196 - Order SQL updates by primary key: enabled
12:11:06,623 INFO SettingsFactory:357 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
12:11:06,623 INFO ASTQueryTranslatorFactory:24 - Using ASTQueryTranslatorFactory
12:11:06,623 INFO SettingsFactory:204 - Query language substitutions: {no='N', true=1, yes='Y', false=0}
12:11:06,623 INFO SettingsFactory:210 - Second-level cache: enabled
12:11:06,623 INFO SettingsFactory:214 - Query cache: disabled
12:11:06,623 INFO SettingsFactory:344 - Cache provider: org.hibernate.cache.HashtableCacheProvider
12:11:06,623 INFO SettingsFactory:229 - Optimize cache for minimal puts: disabled
12:11:06,623 INFO SettingsFactory:234 - Cache region prefix: hibernate.test
12:11:06,623 INFO SettingsFactory:238 - Structured second-level cache entries: disabled
12:11:06,623 INFO SettingsFactory:265 - Statistics: disabled
12:11:06,623 INFO SettingsFactory:269 - Deleted entity synthetic identifier rollback: disabled
12:11:06,623 INFO SettingsFactory:284 - Default entity-mode: pojo
Execute: drop table excolumns
Execute: drop table parent
Execute: drop table children
Execute: drop table customer
Execute: drop table orders
Execute: drop table inthemiddle
Execute: drop table misc_types
Execute: drop table defunct_table
Execute: drop table dummy
12:11:06,633 INFO DriverManagerConnectionProvider:147 - cleaning up connection pool: jdbc:hsqldb:.
org.hibernate.MappingException: property not found: completed on entity Orders
at org.hibernate.mapping.PersistentClass.getProperty(PersistentClass.java:377)
at org.hibernate.mapping.PersistentClass.getProperty(PersistentClass.java:382)
at org.hibernate.tool.test.jdbc2cfg.OverrideBinderTest.testColumnTypeMappings(OverrideBinderTest.java:145)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:32)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)