-->
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.  [ 2 posts ] 
Author Message
 Post subject: hibernate and HSQLDB 1.8.0
PostPosted: Thu Aug 11, 2005 5:45 am 
Newbie

Joined: Thu Aug 11, 2005 5:26 am
Posts: 1
I downloaded the hibernate package and ran the eg example with hsqldb
1.8.0. This worked fine, however when I altered the example so the
tables were created and stored in one run and read in another run of the
program

(by commenting away the lines
.setProperty(Environment.HBM2DDL_AUTO, "create");
and
test.createTestAuctions();
)

the tables were no longer there. It seemed like hsqldb only kept them in
memory and did not store them on file. I tried to download the hsqldb jar
file for version 1.7.3 and try again. This time the tables were stored on file
and the problem was fixed.
Is it a bug that hibernate does not persist database tables when using
hsqldb 1.8.0 but works for 1.7.3?


Another thing i noticed
when looking at the .properties file created by hsqldb I saw that the property
modified=yes
however on the webpage
http://hsqldb.sourceforge.net/doc/guide/apc.html
it says that after a clean database shutdown modified should be false.
It was set to true for both hsqldb versions i tried.


System information
java version "1.5.0_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode, sharing)

OS: windows 2000 professional


Daniel


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 04, 2005 6:23 pm 
Newbie

Joined: Fri Sep 02, 2005 9:41 am
Posts: 1
Hello,

To store data in a HSQLDB v 1.8.0, you must "explicitly" execute a shutdown of the database:
Code:
session.connection().createStatement().execute("SHUTDOWN");


Moreover the URL of the database have to end by ;shutdown=true. Here is an example:
Code:
jdbc:hsqldb:file:data/localBD;shutdown=true


Regards

Bibounde


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.