-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Update date issue with HSQL 1.7.1
PostPosted: Fri Oct 14, 2005 12:45 pm 
Newbie

Joined: Fri Oct 14, 2005 12:22 pm
Posts: 3
Howdy

I am having an issue with the hbm2ddl.auto=update under hsqldb. I know there is an issue with 1.8 and I have reved back to 1.7.1 but still cant get the update to auto create or modify the ddl.

It was talked about here:
http://forum.hibernate.org/viewtopic.php?t=948369
and I have tried looking it up in jira but have had no success.

It appears that the update is looking for the SYSTEM_SEQUENCES table and failing since that table is a HSQL 1.8 thing. Im wondering if the addition of the SYSTEM_SEQUENCES support to 3.1 broke backwards compatability for HSQL update?

Any help would be apprciated.

Thanks
-=Brian

Hibernate version:
3.1rc1

Mapping documents:
<hibernate-configuration>
<session-factory>
<!-- Database connection settings -->
<property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="connection.url">jdbc:hsqldb:target/testdb/testdb</property>

<property name="connection.username">sa</property>
<property name="connection.password"></property>
<!-- JDBC connection pool (use the built-in) -->
<property name="connection.pool_size">1</property>
<property name="connection.release_mode">after_transaction</property>
<!-- SQL dialect -->
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>
<!-- Echo all executed SQL to stdout -->
<property name="show_sql">false</property>
<!-- Drop and re-create the database schema on startup -->
<property name="hbm2ddl.auto">update</property>
<mapping class="com.novusedge.access.core.objects.Peer"/>
<mapping class="com.novusedge.access.core.objects.Controller"/>
<!-- mapping resource="AccessObjects.hbm.xml"/-->
</session-factory>
</hibernate-configuration>

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:
None except cant find SQL table for insert.

Name and version of the database you are using:
hsqldb 1.7.1

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:
INFO - Running hbm2ddl schema update
INFO - fetching database metadata
DEBUG - total checked-out connections: 0
DEBUG - using pooled JDBC connection, pool size: 0
ERROR - could not get database metadata
java.sql.SQLException: Table not found: SYSTEM_SEQUENCES in statement [select sequence_name from system_sequences]
at org.hsqldb.Trace.getError(Unknown Source)
at org.hsqldb.jdbcResultSet.<init>(Unknown Source)
at org.hsqldb.jdbcConnection.executeStandalone(Unknown Source)
at org.hsqldb.jdbcConnection.execute(Unknown Source)
at org.hsqldb.jdbcStatement.fetchResult(Unknown Source)
at org.hsqldb.jdbcStatement.executeQuery(Unknown Source)
at org.hibernate.tool.hbm2ddl.DatabaseMetadata.initSequences(DatabaseMetadata.java:119)
at org.hibernate.tool.hbm2ddl.DatabaseMetadata.<init>(DatabaseMetadata.java:45)
at org.hibernate.tool.hbm2ddl.DatabaseMetadata.<init>(DatabaseMetadata.java:38)
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:133)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:298)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1145)
at com.novusedge.access.core.persistence.HibernateUtil.<clinit>(HibernateUtil.java:33)
at HibernateHacklet.run(HibernateHacklet.java:20)
at HibernateHacklet.main(HibernateHacklet.java:16)
ERROR - could not complete schema update
java.sql.SQLException: Table not found: SYSTEM_SEQUENCES in statement [select sequence_name from system_sequences]
at org.hsqldb.Trace.getError(Unknown Source)
at org.hsqldb.jdbcResultSet.<init>(Unknown Source)
at org.hsqldb.jdbcConnection.executeStandalone(Unknown Source)
at org.hsqldb.jdbcConnection.execute(Unknown Source)
at org.hsqldb.jdbcStatement.fetchResult(Unknown Source)
at org.hsqldb.jdbcStatement.executeQuery(Unknown Source)
at org.hibernate.tool.hbm2ddl.DatabaseMetadata.initSequences(DatabaseMetadata.java:119)
at org.hibernate.tool.hbm2ddl.DatabaseMetadata.<init>(DatabaseMetadata.java:45)
at org.hibernate.tool.hbm2ddl.DatabaseMetadata.<init>(DatabaseMetadata.java:38)
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:133)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:298)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1145)
at com.novusedge.access.core.persistence.HibernateUtil.<clinit>(HibernateUtil.java:33)
at HibernateHacklet.run(HibernateHacklet.java:20)
at HibernateHacklet.main(HibernateHacklet.java:16)
INFO - cleaning up connection pool: jdbc:hsqldb:target/testdb/testdb
INFO - Checking 0 named queries


can dump full debug log if you need it


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 14, 2005 12:52 pm 
Newbie

Joined: Fri Oct 14, 2005 12:22 pm
Posts: 3
my bad on the topic should be just "Update issue"


Top
 Profile  
 
 Post subject: Found jira entry
PostPosted: Fri Oct 14, 2005 1:19 pm 
Newbie

Joined: Fri Oct 14, 2005 12:22 pm
Posts: 3
Found the Jira entry which says this is supposed to work in 3.1rc1 which is what im using.

http://opensource2.atlassian.com/projects/hibernate/browse/HHH-608

Not sure whats going on then.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.