ZK - Open Source Ajax Java FrameworkZK - Open Source Ajax Java Framework

todo db sample - can't get the hsqldb working

harald
3 Jun 2010 02:25:36 GMT
3 Jun 2010 02:25:36 GMT

Hi folks !

I'm trying to get my feet wet by testing the todo app. It's up and running but without db connection. I'm confused on how to install the database files. I'am using Netbeans and Tomcat.

In the readme file it says

2.Copy hsqldb folder (database files) to the root of the development directory.(ex.C:\)

My Netbean project is under documents (C:). Should I copy database files to the root of C:? In Windows 7 this is not allowed.

Thanks for any tip

terrytornadoTop Contributor
3 Jun 2010 09:06:01 GMT
3 Jun 2010 09:06:01 GMT

Hmmmm, i don't know that sample, but i mean with development directory they mean the project root.

harald
3 Jun 2010 12:49:04 GMT
3 Jun 2010 12:49:04 GMT

Hello.

the sample is found here.

http://www.zkoss.org/doc/step%20by%20step.dsp

I tested putting the folder in the project root, but it wont work. I get the impression something is missing. Maby I missed some text, but I have looked over and over agan. I'll guess I'm stuck.

Do you know the HSQLDB database? In this case it's a file based access (no server), but I can't understand how the separate things (db and interface) works together. And there is a script for creating a table, but no explaination on how to use it.

Tricky...

terrytornadoTop Contributor
3 Jun 2010 15:35:54 GMT
3 Jun 2010 15:35:54 GMT

We have an H2 Database as inMemory DB in our sample app here . It's most like the HSQL DB. You can have a look on it.
But its a bigger sample with several framework integrations.

harald
4 Jun 2010 06:28:42 GMT
4 Jun 2010 06:28:42 GMT

Great - thanks !

harald
6 Jun 2010 00:17:33 GMT
6 Jun 2010 00:17:33 GMT

OK, solved the HSQLDB access problem.

in the Java Class EventDAO, the url pointing to the database looked like "jdbc:hsqldb:file:/hsqldb/event". So, where is that pointing to? The description says, the root of the development directory, but I can't get it to work in places that I think must be the root of the development directory.

Solution (work around). Qualify the url (in my case to d:):

"jdbc:hsqldb:file:d:/hsqldb/event"

Now put the hsqldb library at the driver "d:" root

=================================================================================================
The problem has actually nothing to do with zk, but how Netbeans deply a project. Where is the project root during run time? Well, I'll leave that for now.