Solved - scroll downHi _Guidi and all,
it's obviously been a long time since the last post on that topic, hopefully so. can help. I' m running hibernate 3.3.2 with hsqldb v. 1.9 in standalone mode. Hibernate configured as follows.
Code:
<property name="hibernate.connection.url">jdbc:hsqldb:file:./db/default/;shutdown=true</property>
<property name="hibernate.connection.username">sa</property>
<property name="hibernate.connection.password"></property>
<property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="hibernate.connection.writedelay">0</property>
<property name="hibernate.connection.autocommit">false</property>
<property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
<property name="hibernate.hbm2ddl.auto">update</property>
Important for me is the hbm2ddl.auto set to update, since i wanna reuse existing databases. Referring to your post i closed my session and sessionfactory before terminating my app. During next run's startup, the following exception would appear:
Code:
java.sql.SQLException: error in script file line: 23 unexpected token: NOT required: :
at org.hsqldb.jdbc.Util.sqlException(Util.java:365)
at org.hsqldb.jdbc.Util.sqlException(Util.java:103)
at org.hsqldb.jdbc.JDBCConnection.<init>(JDBCConnection.java:3236)
at org.hsqldb.jdbc.JDBCDriver.getConnection(JDBCDriver.java:285)
at org.hsqldb.jdbc.JDBCDriver.connect(JDBCDriver.java:245)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:133)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:111)
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2119)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2115)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1339)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
at de.laliluna.hibernate.SessionFactoryUtil.configureSession(SessionFactoryUtil.java:65)
at de.laliluna.hibernate.SessionFactoryUtil.<clinit>(SessionFactoryUtil.java:26)
at de.laliluna.example.TestExample.createHoney(TestExample.java:120)
at de.laliluna.example.TestExample.main(TestExample.java:34)
Caused by: org.hsqldb.HsqlException: error in script file line: 23 unexpected token: NOT required: :
.
.
.
Don't think, the rest is important.
As i said, closing the session and -factory causes the problem. When not closing, changes won't be stored. I couldnt find any solution. Maybe, you already had similar problems.
Thanks. Regards,
luko
I finally solved that. It really f***** me up. Seems to be a problem with the rc of hsqldb 1.9. Didn't really notice i was using that. Switched to 1.8 stable now and it works just fine.
Cya