From: Max R. A. (JIRA) <no...@at...> - 2006-07-20 08:42:13
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1598?page=all ] Max Rydahl Andersen updated HHH-1598: ------------------------------------- Priority: Minor (was: Blocker) not a blocker > SchemaValidator fails when using boolean with HSQL > -------------------------------------------------- > > Key: HHH-1598 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1598 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.1.3 > Environment: HSQL 1.8.0.2 > Reporter: objective > Priority: Minor > Attachments: Cat.zip > > > chemaValidator fails when using boolean with HSQL > Table.validateColumns() fails with table with column type="boolean". The table is created automatically using hbm2ddl. > HSQL 1.8.0.2 > Exception in thread "main" org.hibernate.HibernateException: Wrong column type: abc, expected: bit > at org.hibernate.mapping.Table.validateColumns(Table.java:219) > at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:965) > at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:116) > at HsqlHibernateBit.main(HsqlHibernateBit.java:10) > 20:26:31 [ main] INFO [Environment ] - Hibernate 3.1.3 > 20:26:31 [ main] INFO [Environment ] - hibernate.properties not found > 20:26:31 [ main] INFO [Environment ] - using CGLIB reflection optimizer > 20:26:31 [ main] INFO [Environment ] - using JDK 1.4 java.sql.Timestamp handling > 20:26:32 [ main] INFO [Configuration ] - configuring from resource: hibernate-HSQL.cfg.xml > 20:26:32 [ main] INFO [Configuration ] - Configuration resource: hibernate-HSQL.cfg.xml > 20:26:32 [ main] DEBUG [DTDEntityResolver ] - trying to resolve system-id [http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd] > 20:26:32 [ main] DEBUG [DTDEntityResolver ] - recognized hibernate namespace; attempting to resolve on classpath under org/hibernate/ > 20:26:32 [ main] DEBUG [DTDEntityResolver ] - located [http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd] in classpath > 20:26:32 [ main] DEBUG [Configuration ] - hibernate.connection.driver_class=org.hsqldb.jdbcDriver > 20:26:32 [ main] DEBUG [Configuration ] - hibernate.connection.url=jdbc:hsqldb:mem:cat > 20:26:32 [ main] DEBUG [Configuration ] - hibernate.connection.username=sa > 20:26:32 [ main] DEBUG [Configuration ] - hibernate.connection.password= > 20:26:32 [ main] DEBUG [Configuration ] - hibernate.connection.pool_size=1 > 20:26:32 [ main] DEBUG [Configuration ] - hibernate.dialect=org.hibernate.dialect.HSQLDialect > 20:26:32 [ main] DEBUG [Configuration ] - hibernate.show_sql=false > 20:26:32 [ main] DEBUG [Configuration ] - hibernate.hbm2ddl.auto=update > 20:26:32 [ main] INFO [Configuration ] - Configured SessionFactory: null > 20:26:32 [ main] INFO [Configuration ] - Reading mappings from resource: Cat.hbm.xml > 20:26:32 [ main] DEBUG [DTDEntityResolver ] - trying to resolve system-id [http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd] > 20:26:32 [ main] DEBUG [DTDEntityResolver ] - recognized hibernate namespace; attempting to resolve on classpath under org/hibernate/ > 20:26:32 [ main] DEBUG [DTDEntityResolver ] - located [http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd] in classpath > 20:26:32 [ main] INFO [HbmBinder ] - Mapping class: Cat -> Cat > 20:26:32 [ main] DEBUG [HbmBinder ] - Mapped property: abc -> abc > 20:26:32 [ main] DEBUG [Configuration ] - Preparing to build session factory with filters : {} > 20:26:32 [ main] DEBUG [Configuration ] - processing extends queue > 20:26:32 [ main] DEBUG [Configuration ] - processing collection mappings > 20:26:32 [ main] DEBUG [Configuration ] - processing native query and ResultSetMapping mappings > 20:26:32 [ main] DEBUG [Configuration ] - processing association property references > 20:26:32 [ main] DEBUG [Configuration ] - processing foreign key constraints > 20:26:32 [ main] INFO [riverManagerConnectionProvider] - Using Hibernate built-in connection pool (not for production use!) > 20:26:32 [ main] INFO [riverManagerConnectionProvider] - Hibernate connection pool size: 1 > 20:26:32 [ main] INFO [riverManagerConnectionProvider] - autocommit mode: false > 20:26:32 [ main] INFO [riverManagerConnectionProvider] - using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:mem:cat > 20:26:32 [ main] INFO [riverManagerConnectionProvider] - connection properties: {user=sa, password=} > 20:26:32 [ main] DEBUG [riverManagerConnectionProvider] - total checked-out connections: 0 > 20:26:32 [ main] DEBUG [riverManagerConnectionProvider] - opening new JDBC connection > 20:26:33 [ main] DEBUG [riverManagerConnectionProvider] - created connection to: jdbc:hsqldb:mem:cat, Isolation Level: 0 > 20:26:33 [ main] INFO [SettingsFactory ] - RDBMS: HSQL Database Engine, version: 1.8.0 > 20:26:33 [ main] INFO [SettingsFactory ] - JDBC driver: HSQL Database Engine Driver, version: 1.8.0 > 20:26:33 [ main] DEBUG [riverManagerConnectionProvider] - returning connection to pool, pool size: 1 > 20:26:33 [ main] INFO [Dialect ] - Using dialect: org.hibernate.dialect.HSQLDialect > 20:26:33 [ main] INFO [TransactionFactoryFactory] - Using default transaction strategy (direct JDBC transactions) > 20:26:33 [ main] INFO [ransactionManagerLookupFactory] - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended) > 20:26:33 [ main] INFO [SettingsFactory ] - Automatic flush during beforeCompletion(): disabled > 20:26:33 [ main] INFO [SettingsFactory ] - Automatic session close at end of transaction: disabled > 20:26:33 [ main] INFO [SettingsFactory ] - JDBC batch size: 15 > 20:26:33 [ main] INFO [SettingsFactory ] - JDBC batch updates for versioned data: disabled > 20:26:33 [ main] INFO [SettingsFactory ] - Scrollable result sets: enabled > 20:26:33 [ main] DEBUG [SettingsFactory ] - Wrap result sets: disabled > 20:26:33 [ main] INFO [SettingsFactory ] - JDBC3 getGeneratedKeys(): disabled > 20:26:33 [ main] INFO [SettingsFactory ] - Connection release mode: auto > 20:26:33 [ main] INFO [SettingsFactory ] - Default batch fetch size: 1 > 20:26:33 [ main] INFO [SettingsFactory ] - Generate SQL with comments: disabled > 20:26:33 [ main] INFO [SettingsFactory ] - Order SQL updates by primary key: disabled > 20:26:33 [ main] INFO [SettingsFactory ] - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory > 20:26:33 [ main] INFO [ASTQueryTranslatorFactory] - Using ASTQueryTranslatorFactory > 20:26:33 [ main] INFO [SettingsFactory ] - Query language substitutions: {} > 20:26:33 [ main] INFO [SettingsFactory ] - Second-level cache: enabled > 20:26:33 [ main] INFO [SettingsFactory ] - Query cache: disabled > 20:26:33 [ main] INFO [SettingsFactory ] - Cache provider: org.hibernate.cache.EhCacheProvider > 20:26:33 [ main] INFO [SettingsFactory ] - Optimize cache for minimal puts: disabled > 20:26:33 [ main] INFO [SettingsFactory ] - Structured second-level cache entries: disabled > 20:26:33 [ main] DEBUG [SQLExceptionConverterFactory] - Using dialect defined converter > 20:26:33 [ main] INFO [SettingsFactory ] - Statistics: disabled > 20:26:33 [ main] INFO [SettingsFactory ] - Deleted entity synthetic identifier rollback: disabled > 20:26:33 [ main] INFO [SettingsFactory ] - Default entity-mode: pojo > 20:26:33 [ main] INFO [SessionFactoryImpl ] - building session factory > 20:26:33 [ main] DEBUG [SessionFactoryImpl ] - Session factory constructed with filter configurations : {} > 20:26:33 [ main] DEBUG [SessionFactoryImpl ] - instantiating session factory with properties: > 20:26:33 [ main] DEBUG [CacheManager ] - Creating new CacheManager with default config > 20:26:33 [ main] DEBUG [CacheManager ] - Configuring ehcache from classpath. > 20:26:33 [ main] WARN [Configurator ] - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/idea-workspace/replication/lib/ehcache-1.1.jar!/ehcache-failsafe.xml > 20:26:33 [ main] DEBUG [Configuration$DiskStore] - Disk Store Path: C:\DOCUME~1\obj\LOCALS~1\Temp\ > 20:26:34 [ main] DEBUG [AbstractEntityPersister] - Static SQL for entity: Cat > 20:26:34 [ main] DEBUG [AbstractEntityPersister] - Version select: select id from Cat where id =? > 20:26:34 [ main] DEBUG [AbstractEntityPersister] - Snapshot select: select cat_.id, cat_.abc as abc0_ from Cat cat_ where cat_.id=? > 20:26:34 [ main] DEBUG [AbstractEntityPersister] - Insert 0: insert into Cat (abc, id) values (?, ?) > 20:26:34 [ main] DEBUG [AbstractEntityPersister] - Update 0: update Cat set abc=? where id=? > 20:26:34 [ main] DEBUG [AbstractEntityPersister] - Delete 0: delete from Cat where id=? > 20:26:34 [ main] DEBUG [AbstractEntityPersister] - Identity insert: insert into Cat (abc, id) values (?, null) > 20:26:34 [ main] DEBUG [EntityLoader ] - Static select for entity Cat: select cat0_.id as id0_0_, cat0_.abc as abc0_0_ from Cat cat0_ where cat0_.id=? > 20:26:34 [ main] DEBUG [EntityLoader ] - Static select for entity Cat: select cat0_.id as id0_0_, cat0_.abc as abc0_0_ from Cat cat0_ where cat0_.id=? > 20:26:34 [ main] DEBUG [EntityLoader ] - Static select for entity Cat: select cat0_.id as id0_0_, cat0_.abc as abc0_0_ from Cat cat0_ where cat0_.id=? > 20:26:34 [ main] DEBUG [EntityLoader ] - Static select for entity Cat: select cat0_.id as id0_0_, cat0_.abc as abc0_0_ from Cat cat0_ where cat0_.id=? > 20:26:34 [ main] DEBUG [EntityLoader ] - Static select for action ACTION_MERGE on entity Cat: select cat0_.id as id0_0_, cat0_.abc as abc0_0_ from Cat cat0_ where cat0_.id=? > 20:26:34 [ main] DEBUG [EntityLoader ] - Static select for action ACTION_REFRESH on entity Cat: select cat0_.id as id0_0_, cat0_.abc as abc0_0_ from Cat cat0_ where cat0_.id=? > 20:26:34 [ main] DEBUG [SessionFactoryObjectFactory] - initializing class SessionFactoryObjectFactory > 20:26:34 [ main] DEBUG [SessionFactoryObjectFactory] - registered: 4028810f0a271205010a27120a650000 (unnamed) > 20:26:34 [ main] INFO [SessionFactoryObjectFactory] - Not binding factory to JNDI, no JNDI name configured > 20:26:34 [ main] DEBUG [SessionFactoryImpl ] - instantiated session factory > 20:26:34 [ main] INFO [SchemaUpdate ] - Running hbm2ddl schema update > 20:26:34 [ main] INFO [SchemaUpdate ] - fetching database metadata > 20:26:34 [ main] DEBUG [riverManagerConnectionProvider] - total checked-out connections: 0 > 20:26:34 [ main] DEBUG [riverManagerConnectionProvider] - using pooled JDBC connection, pool size: 0 > 20:26:34 [ main] INFO [SchemaUpdate ] - updating schema > 20:26:34 [ main] DEBUG [Configuration ] - processing extends queue > 20:26:34 [ main] DEBUG [Configuration ] - processing collection mappings > 20:26:34 [ main] DEBUG [Configuration ] - processing native query and ResultSetMapping mappings > 20:26:34 [ main] DEBUG [Configuration ] - processing association property references > 20:26:34 [ main] DEBUG [Configuration ] - processing foreign key constraints > 20:26:34 [ main] INFO [DatabaseMetadata ] - table not found: Cat > 20:26:34 [ main] INFO [DatabaseMetadata ] - table not found: Cat > 20:26:34 [ main] DEBUG [SchemaUpdate ] - create table Cat (id bigint generated by default as identity (start with 1), abc bit, primary key (id)) > 20:26:34 [ main] INFO [SchemaUpdate ] - schema update complete > 20:26:34 [ main] DEBUG [riverManagerConnectionProvider] - returning connection to pool, pool size: 1 > 20:26:34 [ main] DEBUG [SessionFactoryImpl ] - Checking 0 named HQL queries > 20:26:34 [ main] DEBUG [SessionFactoryImpl ] - Checking 0 named SQL queries > 20:26:34 [ main] INFO [Dialect ] - Using dialect: org.hibernate.dialect.HSQLDialect > 20:26:34 [ main] INFO [SchemaValidator ] - Running schema validator > 20:26:34 [ main] INFO [SchemaValidator ] - fetching database metadata > 20:26:34 [ main] INFO [riverManagerConnectionProvider] - Using Hibernate built-in connection pool (not for production use!) > 20:26:34 [ main] INFO [riverManagerConnectionProvider] - Hibernate connection pool size: 1 > 20:26:34 [ main] INFO [riverManagerConnectionProvider] - autocommit mode: false > 20:26:34 [ main] INFO [riverManagerConnectionProvider] - using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:mem:cat > 20:26:34 [ main] INFO [riverManagerConnectionProvider] - connection properties: {user=sa, password=} > 20:26:34 [ main] DEBUG [riverManagerConnectionProvider] - total checked-out connections: 0 > 20:26:34 [ main] DEBUG [riverManagerConnectionProvider] - opening new JDBC connection > 20:26:34 [ main] DEBUG [riverManagerConnectionProvider] - created connection to: jdbc:hsqldb:mem:cat, Isolation Level: 0 > 20:26:34 [ main] DEBUG [Configuration ] - processing extends queue > 20:26:34 [ main] DEBUG [Configuration ] - processing collection mappings > 20:26:34 [ main] DEBUG [Configuration ] - processing native query and ResultSetMapping mappings > 20:26:34 [ main] DEBUG [Configuration ] - processing association property references > 20:26:34 [ main] DEBUG [Configuration ] - processing foreign key constraints > 20:26:34 [ main] INFO [TableMetadata ] - table found: PUBLIC.CAT > 20:26:34 [ main] INFO [TableMetadata ] - columns: [abc, id] > 20:26:34 [ main] DEBUG [riverManagerConnectionProvider] - returning connection to pool, pool size: 1 > 20:26:34 [ main] INFO [riverManagerConnectionProvider] - cleaning up connection pool: jdbc:hsqldb:mem:cat > Exception in thread "main" org.hibernate.HibernateException: Wrong column type: abc, expected: bit > at org.hibernate.mapping.Table.validateColumns(Table.java:219) > at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:965) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |