You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Carsten Ziegeler <cz...@apache.org> on 2007/01/10 15:47:12 UTC

Problems with hsqldb

Hi,

I'm experiencing problems with later hsqldb versions, the latest version
working for me is 1.8.0.2. Using a later version, everything seems to be
ok (no exceptions, no log statements etc.), but although the code is
executing, the database is not available.

Is anyone else having similar problems or is a newer version working for
someone? The simplest way to test this is replacing the version in 2.1.x
and seeing if the database comes up.

Thanks
Carsten
-- 
Carsten Ziegeler - Chief Architect
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

Re: Problems with hsqldb

Posted by Andreas Hartmann <an...@apache.org>.
Carsten Ziegeler schrieb:
> Andreas Hartmann wrote:
>> Hi Carsten,
>>
>> Carsten Ziegeler schrieb:
>>> Ok, just ignore this - I found the reason: the newer versions seem to
>>> require a call setDatabaseName() in addition to setDatabasePath().
>> no idea if this is related, but the DB samples don't work for me:
>>
>> [Server@a9b5c7]: Database [index=0, id=0,
>> db=file:/Users/nobby/apache/cocoon/BRANCH_2_1_X/build/webapp/WEB-INF/db/cocoondb,
>> alias=cocoondb] opened sucessfully in 2007 ms.
>> [Server@a9b5c7]: Startup sequence completed in 2012 ms.
>> [Server@a9b5c7]: 2007-02-13 15:22:14.596 HSQLDB server 1.8.0 is online
>> [Server@a9b5c7]: To close normally, connect and execute SHUTDOWN SQL
>> [Server@a9b5c7]: From command line, use [Ctrl]+[C] to abort abruptly
>> 15:22:24.935 EVENT  Started SocketListener on 0.0.0.0:8888
>> 15:22:25.039 EVENT  Started org.mortbay.jetty.Server@197bb7
>>
>> [...]
>>
>> [Server@a9b5c7]: [Thread[HSQLDB Connection @5bfd2d,5,HSQLDB Connections
>> @a9b5c7]]: database alias= does not exist
>>
>>
>> For the same reason, the Lenya scheduler (which is based on the
>> cron block) doesn't work with HSQLDB persistence anymore.
>>
>> Is someone else experiencing the same problems?
>>
> I guess/fear that this is related...with newer hsqldb versions you have
> to specify the db name in the connection url. With former versions you
> could define a default database and leave out the db name.

Yes, adding the DB name to the URL solves the issue:


Index: src/blocks/databases/conf/datasources.xconf
===================================================================
--- src/blocks/databases/conf/datasources.xconf (revision 507003)
+++ src/blocks/databases/conf/datasources.xconf (working copy)
@@ -42,7 +42,7 @@
         -
         - The default is true.
         -->
-      <dburl>jdbc:hsqldb:hsql://localhost:9002</dburl>
+      <dburl>jdbc:hsqldb:hsql://localhost:9002/cocoondb</dburl>
       <user>sa</user>
       <password></password>
     </jdbc>


-- Andreas


Re: Problems with hsqldb

Posted by Carsten Ziegeler <cz...@apache.org>.
Andreas Hartmann wrote:
> Hi Carsten,
> 
> Carsten Ziegeler schrieb:
>> Ok, just ignore this - I found the reason: the newer versions seem to
>> require a call setDatabaseName() in addition to setDatabasePath().
> 
> no idea if this is related, but the DB samples don't work for me:
> 
> [Server@a9b5c7]: Database [index=0, id=0,
> db=file:/Users/nobby/apache/cocoon/BRANCH_2_1_X/build/webapp/WEB-INF/db/cocoondb,
> alias=cocoondb] opened sucessfully in 2007 ms.
> [Server@a9b5c7]: Startup sequence completed in 2012 ms.
> [Server@a9b5c7]: 2007-02-13 15:22:14.596 HSQLDB server 1.8.0 is online
> [Server@a9b5c7]: To close normally, connect and execute SHUTDOWN SQL
> [Server@a9b5c7]: From command line, use [Ctrl]+[C] to abort abruptly
> 15:22:24.935 EVENT  Started SocketListener on 0.0.0.0:8888
> 15:22:25.039 EVENT  Started org.mortbay.jetty.Server@197bb7
> 
> [...]
> 
> [Server@a9b5c7]: [Thread[HSQLDB Connection @5bfd2d,5,HSQLDB Connections
> @a9b5c7]]: database alias= does not exist
> 
> 
> For the same reason, the Lenya scheduler (which is based on the
> cron block) doesn't work with HSQLDB persistence anymore.
> 
> Is someone else experiencing the same problems?
> 
I guess/fear that this is related...with newer hsqldb versions you have
to specify the db name in the connection url. With former versions you
could define a default database and leave out the db name.

Carsten

-- 
Carsten Ziegeler
http://www.osoco.org/weblogs/rael/

Re: Problems with hsqldb

Posted by Andreas Hartmann <an...@apache.org>.
Hi Carsten,

Carsten Ziegeler schrieb:
> Ok, just ignore this - I found the reason: the newer versions seem to
> require a call setDatabaseName() in addition to setDatabasePath().

no idea if this is related, but the DB samples don't work for me:

[Server@a9b5c7]: Database [index=0, id=0,
db=file:/Users/nobby/apache/cocoon/BRANCH_2_1_X/build/webapp/WEB-INF/db/cocoondb,
alias=cocoondb] opened sucessfully in 2007 ms.
[Server@a9b5c7]: Startup sequence completed in 2012 ms.
[Server@a9b5c7]: 2007-02-13 15:22:14.596 HSQLDB server 1.8.0 is online
[Server@a9b5c7]: To close normally, connect and execute SHUTDOWN SQL
[Server@a9b5c7]: From command line, use [Ctrl]+[C] to abort abruptly
15:22:24.935 EVENT  Started SocketListener on 0.0.0.0:8888
15:22:25.039 EVENT  Started org.mortbay.jetty.Server@197bb7

[...]

[Server@a9b5c7]: [Thread[HSQLDB Connection @5bfd2d,5,HSQLDB Connections
@a9b5c7]]: database alias= does not exist


For the same reason, the Lenya scheduler (which is based on the
cron block) doesn't work with HSQLDB persistence anymore.

Is someone else experiencing the same problems?

TIA!

-- Andreas


Re: Problems with hsqldb

Posted by Carsten Ziegeler <cz...@apache.org>.
Ok, just ignore this - I found the reason: the newer versions seem to
require a call setDatabaseName() in addition to setDatabasePath().

Carsten

Carsten Ziegeler wrote:
> Hi,
> 
> I'm experiencing problems with later hsqldb versions, the latest version
> working for me is 1.8.0.2. Using a later version, everything seems to be
> ok (no exceptions, no log statements etc.), but although the code is
> executing, the database is not available.
> 
> Is anyone else having similar problems or is a newer version working for
> someone? The simplest way to test this is replacing the version in 2.1.x
> and seeing if the database comes up.
> 
> Thanks
> Carsten


-- 
Carsten Ziegeler - Chief Architect
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/