Showing posts with label HSQLDB. Show all posts
Showing posts with label HSQLDB. Show all posts

Sunday, May 13, 2007

Fix AppFuse generated application that couldn't connect HSQLDB database

Step 1: Enable the hibernate show sql features. This for tracing which SQL have problem to execute. If the 1st one has problem, we can going on.

Step 2: Since, the original AppFuse 1.9.x is not well prepare for the HSQLDB. We need to prepare the table creation script for the HSQLDB. i.e., hsql-create.sql, in the metadata folder of the project generated by the AppFuse.


Step 3: Using command "ant db-prepare" or click it the "db-prepare" to execute it in the Ant view of the Eclipse.


Step 4: Using command "ant compile" or click the "compile" in the Ant view of Eclipse.

Step 5: Using command "and deploy-war" or click the "deploy-war" in the Ant view of Eclipse.

Tuesday, May 08, 2007

Eclipse plugins for HSQLDB

When I trying to compare and select between HSQLDB and Apache Derby as the database for my mini application.

I found the Apache Derby has an interesting Eclipse Plugins can help to start and stop the Derby easily.

It caused me going to check any similiar plugins for HSQLDB. Finally, i found a project in source forge web site. I'm exciting and start to try it. However, it disappointed me that the plugins seems couldn't be uses directly extract to the eclipse plugins directory.

I had to agree that i like HSQLDB much more than Derby (just feeling). So, I try to fix it and have this workable version even the official project site is not active since 2004.

This plugin is good and easy enough for development.

You can add nature of HSQLDB in your project by right click on the project and select "HSQLDB > Add Database Engine nature"


And then, start / stop the HSQLDB for your project by right click on the project like this.


If you are interesed about it, just following these procedures to install it in your Eclipse.

1. download it from here

2. cd to ECLIPSE_HOME/plugins/

3. extract the hsqldb eclipse plugins.zip contents in the directory. The "hsqldb.ui" and "hsqldb.core" directories should be extracted into the ECLIPSE_HOME/plugins/ direcotry, like this:

ECLIPSE_HOME/plugins/hsqldb.ui/
ECLIPSE_HOME/plugins/hsqldb.core/

And then, the next time you start Eclipse, everything should work.

Thursday, April 26, 2007

Configure the HSQLDB server to store data in datafile

After you started the HSQLDB in server mode, it stores the data in memory by default. You have necessary to amend the properties file to change the hsqldb.default_table_type value to use cached as below.

With reference to my previous article, the property file name should be, "My-db.properties".

hsqldb.default_table_type=cached

Wednesday, April 25, 2007

Start HSQLDB server in my eclipse project folder

After successfully created my first application with AppFuse on MacOSX, I'm wonder how to make it work work with HSQLDB.

I found this wiki reference is really good as it simple but detail enough for the setup. I put this command in a file with the following contents; and then name it as "startHSQLDB.sh".

java -cp ~/dev/hsqldb/lib/hsqldb.jar org.hsqldb.Server -database.0 ./My-db -dbname.0 MyDB

Then, I change it's execution mode to 755 with following command.

> chmod 755 startHSQLDB.sh

Now, i can start it anytime when i need to have the development.

XML Master Cert Group

Google Groups
XML Master Certification
Visit this group