[Hibernate-JIRA] Resolved: (HHH-176) Incorrect binding of parameters in HQL query with []
by Diego Pires Plentz (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-176?page=co... ]
Diego Pires Plentz resolved HHH-176.
------------------------------------
Assignee: Diego Pires Plentz
Resolution: Duplicate
This issue is older then HHH-1423, but has less info. Closing as dup.
> Incorrect binding of parameters in HQL query with []
> ----------------------------------------------------
>
> Key: HHH-176
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-176
> Project: Hibernate3
> Issue Type: Bug
> Components: core
> Affects Versions: 3.0 rc 1
> Environment: MySQL 4.1.7
> Reporter: William Drai
> Assignee: Diego Pires Plentz
> Priority: Minor
>
> The bindings of the named parameters are
> completely inverted in the following query, where props is just a map of integers indexed by integers.
> select user from User user where user.propsIds[:moduleId] = :propId and user.serviceId = :serviceId and user.serviceDb = :serviceDb
> With the classic HQL parser, the generated SQL is something like :
> select u.xxx, .. from USER u, USER_PROPERTY up where up.PROP_ID = ? and u.USER_ID = u.ID and up.MODULE_ID = ? and u.SERVICE_ID = ? and u.SERVICE_DB = ?
> In this case, the parameter :moduleId is binded at position 0, and the parameter :propId is binded at position 1.
> This is not the right order but as I also made a mistake in my code, the end result was right... This bug was certainly present in all the versions of HB 2.1 we have used so far and in fact we have been living with it without even knowing it.
> Since we are migrating to HB3, we are trying the new AST parser and this bug has not been corrected, but it behaves differently, so we could discover it.
> The new parser produces the following SQL :
> select u.xxx, .. from USER u, USER_PROPERTY up where up.PROP_ID = ?
> and u.USER_ID = u.id and u.SERVICE_ID = ? and u.SERVICE_DB = ? and up.MODULE_ID = ?
> The parameter :moduleId is binded at position 0, propId at 1, serviceId at 2 and serviceDb at 3. Everything is messed up.
> Fortunately, as all of these parameters are integers, we still have the ability to find a workaround by inverting the values we set but
> it would of course be better to have a patch.
--
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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 3 months
[Hibernate-JIRA] Created: (HHH-2496) Parameter binding in wrong order when filter adds params
by David Sheldon (JIRA)
Parameter binding in wrong order when filter adds params
--------------------------------------------------------
Key: HHH-2496
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2496
Project: Hibernate3
Type: Bug
Components: query-hql
Environment: Hibernate version: 3.2
Database: Postgresql 8.1.6
Reporter: David Sheldon
it seems that if you use a filter in the "order by" clause of your query, it binds the parameters in the wrong order. I've been looking through the code, and couldn't work out where the binding of filter parameters take place. Am I doing something wrong here, or is this a bug? I don't get an exception, but the query returns the wrong data because the parameters are sent to the database in the wrong order.
Mapping documents:
<hibernate-mapping>
<class name="bug.Event" table="events">
<id name="id" column="event_id">
<generator class="native"/>
</id>
<property name="date" type="timestamp" column="timestamp" />
</class>
<class name="bug.Thing" table="things">
<id name="id" column="id">
<generator class="native"/>
</id>
<property name="name" type="string" />
<list name="events" lazy="true" table="things_to_events" cascade="save-update,delete,delete-orphan">
<key column="thing_id"/>
<list-index column="index"/>
<many-to-many class="bug.Event" column="event_id"/>
<filter name="dateFilter" condition="event_id in (select events.event_id from events where events.timestamp between :startDate and :endDate)"/>
</list>
</class>
<filter-def name="dateFilter">
<filter-param name="startDate" type="date"/>
<filter-param name="endDate" type="date"/>
</filter-def>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
Thing t = new Thing();
t.setName("bob");
Event e = new Event();
e.setDate(new Date());
t.setEvents(Collections.singletonList(e));
session.save(e);
session.save(t);
session.enableFilter("dateFilter").setParameter("startDate", new GregorianCalendar(2007, 1, 20).getTime()).setParameter("endDate", new GregorianCalendar(2007, 2, 20).getTime());
Query query = session.createQuery("From Thing Where name = :name order by size(events)");
query.setParameter("name", "bob");
System.err.println("Size: " + query.list().size());
The generated SQL (show_sql=true):
Hibernate: select thing0_.id as id1_, thing0_.name as name1_ from things thing0_ where thing0_.name=? order by (select count(events1_.thing_id) from things_to_events events1_ where thing0_.id=events1_.thing_id and events1_.event_id in (select events.event_id from events where events.timestamp between ? and ?))
Debug level Hibernate log excerpt:
[java] 11:21:31,176 DEBUG AbstractBatcher:476 - preparing statement
[java] 11:21:31,177 DEBUG DateType:133 - binding '20 February 2007' to parameter: 1
[java] 11:21:31,178 DEBUG DateType:133 - binding '20 March 2007' to parameter: 2
[java] 11:21:31,179 DEBUG StringType:133 - binding 'bob' to parameter: 3
As you can see, "bob" should be bound to parameter 1, 20th Feb to 2, and 20th March to 3.
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
18 years, 3 months
[Hibernate-JIRA] Created: (HHH-2018) Cannot map views in postgres unless hbm2ddl.auto is unset
by Dave E Martin (JIRA)
Cannot map views in postgres unless hbm2ddl.auto is unset
---------------------------------------------------------
Key: HHH-2018
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2018
Project: Hibernate3
Type: Bug
Versions: 3.2.0.cr2
Environment: hibernate 3.2cr2 annotations 3.2cr1 postgresql 8.1 with postgresql-8.1-404.jdbc3.jar
This is also a problem in hibernate 3.1
Reporter: Dave E Martin
Attempting to map a view with hibernate results in:
Exception in thread "main" org.hibernate.HibernateException: Missing table: monthly_block_totals_utc
Even though this exists (as a view) in the database.
making sure hbm2ddl.auto is not set allows the application to work, but at the expense of being unable to update or validate the schema (or allow the end user to control whether the schema should be updated or not).
Furthermore, there doesn't appear to be a 'none' or any documented way to set .auto to something which would be the equivalent of it not being set. (or to clear it out of the properties, and setting it to null doesn't work either).
This appears to be related to HHH-1329 and HHH-1473.
Stepping into the process reveals that postgres apparently reports views as views and not tables, causing them to be overlooked by Hibernate when its validating.
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
18 years, 3 months
[Hibernate-JIRA] Updated: (HHH-1329) SchemaValidator fail when views are involved
by Diego Pires Plentz (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1329?page=c... ]
Diego Pires Plentz updated HHH-1329:
------------------------------------
Assignee: Diego Pires Plentz
Issue Type: Bug (was: Improvement)
Summary: SchemaValidator fail when views are involved (was: SchemaValidator skips views on Oracle)
> SchemaValidator fail when views are involved
> --------------------------------------------
>
> Key: HHH-1329
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1329
> Project: Hibernate3
> Issue Type: Bug
> Components: metamodel
> Affects Versions: 3.1
> Environment: database: oracle9i
> hibernate: 3.1
> jdbc driver: ojdbc14-10.2.0.1.0
> Reporter: Yariv Yaari
> Assignee: Diego Pires Plentz
>
> All calls in org.hibernate.tool.hbm2ddl.DatabaseMetadata.getTableMetadata to java.sql.DatabaseMetaData.getTables set the fourth parameter (types) to {"TABLE"} (defined as a class-level constant).
> In the documentation of getTables it is not defined what are the meanings of the types passed as parameter, only that all the strings must be in java.sql.DatabaseMetaData.getTablesTypes return value. In oracle9i with ojdbc14-10.2.0.1.0.jar views are returned if types contains "VIEW" and not if its {"TABLE"}. It is a major problem only if hibernate.hbm2ddl.auto is set to validate, if it's set to update it will log some errors (since it can't create or alter the table, there is a view with this name) but it won't fail the deployment, and since in SQL views are treated as tables, there will be no more problems.
> It should be checked for more databases/jdbc drivers.
> It is not obvious what should be the solution.
> Pass {"TABLE","VIEW"} always? Pass them if they are in getTableTypes?
> Put it as part of the dialect, default to {"TABLE"} and change it in oreacle-dialects?
--
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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 3 months
[Hibernate-JIRA] Resolved: (HHH-1473) hbm2ddl validate seems to fail when views are involved
by Diego Pires Plentz (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1473?page=c... ]
Diego Pires Plentz resolved HHH-1473.
-------------------------------------
Assignee: Diego Pires Plentz
Resolution: Duplicate
> hbm2ddl validate seems to fail when views are involved
> ------------------------------------------------------
>
> Key: HHH-1473
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1473
> Project: Hibernate3
> Issue Type: Bug
> Components: metamodel
> Affects Versions: 3.1
> Reporter: Emmanuel Bernard
> Assignee: Diego Pires Plentz
> Priority: Minor
>
> http://forum.hibernate.org/viewtopic.php?t=955341&start=0&postdays=0&post...
> CategoryRanking is a view
> org.hibernate.HibernateException: Missing table: CategoryRating
> at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:953)
> at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:116)
> at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:299)
> at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1145)
> at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:358)
> at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:484)
> at org.hibernate.ejb.Ejb3Configuration.createContainerEntityManagerFactory(Ejb3Configuration.java:202)
> at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:78)
> at org.jboss.ejb3.Ejb3Deployment.initializeManagedEntityManagerFactory(Ejb3Deployment.java:512)
> at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:253)
> at org.jboss.ejb3.Ejb3JmxDeployment.create(Ejb3JmxDeployment.java:230)
> at org.jboss.ejb3.Ejb3Module.createService(Ejb3Module.java:34)
> at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:245)
> at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:228)
> 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 org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
> at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
> at $Proxy0.create(Unknown Source)
> at org.jboss.system.ServiceController.create(ServiceController.java:341)
> at org.jboss.system.ServiceController.create(ServiceController.java:284)
> at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
> at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
> at $Proxy10.create(Unknown Source)
> at org.jboss.ejb3.EJB3Deployer.create(EJB3Deployer.java:208)
> 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 org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
> at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
> at $Proxy11.create(Unknown Source)
> at org.jboss.deployment.MainDeployer.create(MainDeployer.java:935)
> at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:789)
> at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
> at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
> at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
> at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
> at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
> at $Proxy6.deploy(Unknown Source)
> at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:319)
> at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:489)
> at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:192)
> at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:203)
> at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:182)
> 09:13:51,528 INFO [EJB3Deployer] Deployed: file:/C:/work/jboss-4.0.3SP1/server/default/deploy/bizmerit.ejb3
--
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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 3 months
[Hibernate-JIRA] Commented: (HHH-1329) SchemaValidator skips views on Oracle
by Diego Pires Plentz (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1329?page=c... ]
Diego Pires Plentz commented on HHH-1329:
-----------------------------------------
I think that passing {"TABLE","VIEW"} always, will solve this issue, since the javadocs
http://java.sun.com/j2se/1.4.2/docs/api/java/sql/DatabaseMetaData.html#ge...
say:
TABLE_TYPE String => table type. Typical types are "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
> SchemaValidator skips views on Oracle
> -------------------------------------
>
> Key: HHH-1329
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1329
> Project: Hibernate3
> Issue Type: Improvement
> Components: metamodel
> Affects Versions: 3.1
> Environment: database: oracle9i
> hibernate: 3.1
> jdbc driver: ojdbc14-10.2.0.1.0
> Reporter: Yariv Yaari
>
> All calls in org.hibernate.tool.hbm2ddl.DatabaseMetadata.getTableMetadata to java.sql.DatabaseMetaData.getTables set the fourth parameter (types) to {"TABLE"} (defined as a class-level constant).
> In the documentation of getTables it is not defined what are the meanings of the types passed as parameter, only that all the strings must be in java.sql.DatabaseMetaData.getTablesTypes return value. In oracle9i with ojdbc14-10.2.0.1.0.jar views are returned if types contains "VIEW" and not if its {"TABLE"}. It is a major problem only if hibernate.hbm2ddl.auto is set to validate, if it's set to update it will log some errors (since it can't create or alter the table, there is a view with this name) but it won't fail the deployment, and since in SQL views are treated as tables, there will be no more problems.
> It should be checked for more databases/jdbc drivers.
> It is not obvious what should be the solution.
> Pass {"TABLE","VIEW"} always? Pass them if they are in getTableTypes?
> Put it as part of the dialect, default to {"TABLE"} and change it in oreacle-dialects?
--
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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 3 months
[Hibernate-JIRA] Resolved: (HHH-1598) SchemaValidator fails when using boolean with HSQL
by Diego Pires Plentz (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1598?page=c... ]
Diego Pires Plentz resolved HHH-1598.
-------------------------------------
Assignee: Diego Pires Plentz
Resolution: Won't Fix
A workaround for this issue is to extend(or replace) the HSQLDialect, registering Types.BIT as "boolean":
registerColumnType(Types.BIT, "boolean");
By the way, I think it can't be done "out-of-the-box" because it may break existing applications (those who uses Types.BIT as "bit").
> SchemaValidator fails when using boolean with HSQL
> --------------------------------------------------
>
> Key: HHH-1598
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1598
> Project: Hibernate3
> Issue Type: Bug
> Components: core
> Affects Versions: 3.1.3
> Environment: HSQL 1.8.0.2
> Reporter: objective
> Assignee: Diego Pires Plentz
> 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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 3 months