Ask Your Question
0

Putting HSQLDB in server mode with multi-user then Database lock acquisition failure

asked 2017-05-02 10:04:02 +0200

koolninja gravatar image

updated 2017-05-03 05:56:14 +0200

1'st myself converted embedded database into Split database.

Then tried for Server mode is where the data is in one location accessible to multiple users. i used this guideline as below link https://forum.openoffice.org/en/forum...

used pre configured mydb.server.odb for Server Mode

In my network three computer suppose A, B, C(Database stored at A)

with server.START.bat open mydb.server.odb for A or B or C then it's work's fine

when single accessed database from A or B or C then it's work's fine.

Suppose database access from B when same time when accessing from C

shows error --->>Database lock acquisition failure: lockFile: org.hsqldb.persist.LockFile

when any single computer in network used then ok but when another computer tried to multi access to database

then above error shows

so pleases guide where i am doing wrong.

edit retag flag offensive close merge delete

Comments

1

@koolninja Your problem statement all runs together (no punctuation) making understanding it a nightmare. What is your goal? I can use embedded, split and server modes all at once using HSQL, but not on the same DB. Terminology is also important. Server mode is where the data is in one location accessible to multiple users. Split database is just the separation of data from the .odb file - still single user.

Ratslinger gravatar imageRatslinger ( 2017-05-02 14:19:50 +0200 )edit

Maybe I wasn't clear. The Running a "split database..." statement all runs together. I read - 1) Start Server. 2) problem arises single computer (is this using the server DB?). 3) then ok ??? 4) another tried (server DB?) and gets error.

That is what is unclear. The steps in the problem.

Ratslinger gravatar imageRatslinger ( 2017-05-02 14:50:05 +0200 )edit

@koolninja, The best way to get help here is to provide a clear, and crisp question, which has all of the necessary details that lead up to the issue. We're all volunteers here trying to help the next guy along. But this requires that your effort is worthy of the limited help. Try to include not only your exact setup with version numbers and the like, but also what you have done to try and solve your problem. Try to make sure it reads easily. Add screenshots/code/etc if that might clarify .

EasyTrieve gravatar imageEasyTrieve ( 2017-05-02 19:51:23 +0200 )edit

Sorry for poor statement, so tried to correct it most

koolninja gravatar imagekoolninja ( 2017-05-03 05:55:15 +0200 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2017-05-03 06:27:29 +0200

Ratslinger gravatar image

updated 2017-05-03 06:41:02 +0200

As you can tell, I deleted my first answer since you posted new information. This is a lot clearer as to what problem you are having. It appears that you are not starting HSQL in server mode. This would be a line similar to this:

java -cp /home/HSQLDB-2.4.0/hsqldb-2.4.0/hsqldb/lib/hsqldb.jar org.hsqldb.server.Server --database.0 
file:/home/DATABASE-FOLDER/NAME-OF-DATABASE --dbname.0 xdb

You should start the server (on A) and at the A computer connect to the database with Base. Leave that open and, again on A, start another Base file connecting to the same DB. This will tell you if HSQL is running in server mode. If the second connection fails, the problem is in the startup. It doesn't seem to be remote access since B & C can connect singly.

For further information here is my setup: HSQLserver.odt. I have recently reviewed & retested this process. This was tested on Mint 18 system.

edit flag offensive delete link more

Comments

@koolninja In looking at the sample serverSTART.bat file, one line near the end doesn't look right:

"%javapath%" -cp "%jarpath%" org.hsqldb.Server -database.0

My line differs toward the end:

org.hsqldb.server.Server --database.0

If your test shows you are not in server mode, this may be the cause. Keep in mind I am using HSQL v2.4 and not v1.8.

Ratslinger gravatar imageRatslinger ( 2017-05-03 07:15:43 +0200 )edit

Another thought. Make sure each one signing in is not starting the DB (serverStart.bat). The server start should be done once and then users access the enabled DB.

Ratslinger gravatar imageRatslinger ( 2017-05-03 20:37:22 +0200 )edit

A computer connect to the database with Base. Leave that open and, gain on A, start another Base file connecting to the same DB. This will tell you if HSQL is running in server mode. If the second connection fails, the problem is in the startup.

so i cant't start in server mode. please tell me steps to start HSQL in server mode.

koolninja gravatar imagekoolninja ( 2017-05-04 05:31:54 +0200 )edit

Don't know how you are starting your connections, but, make sure that connection is not also starting a server connection. As far as starting the server, the document in my answer is a step-by-step process of setting up an HSQL server in Linux. Don't use Windows anymore, but the only difference I see would be that the startup and shutdown would go in .bat files on Windows where on Linux they are in .sh files. There are instructions in the HSQL manual but a bit hard to grasp.

Ratslinger gravatar imageRatslinger ( 2017-05-04 06:21:40 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-05-02 10:04:02 +0200

Seen: 560 times

Last updated: May 03 '17