Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3433804
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T07:37:16+00:00 2026-05-18T07:37:16+00:00

This is semi-related to my previous question . As that previous question states, I

  • 0

This is semi-related to my previous question. As that previous question states, I have a desktop app that calls off to a different Main method that will kick off a particular process. Both the desktop app and the separate Main method will access the same HSQLDB database.

Prior to getting this far, my desktop app had just been accessing the HSQLDB database using a connection URL like this one:

jdbc:hsqldb:file:/some/path/myDatabase

Now this works fine in a single user environment. Now that I’ve got a multi-user environment with the desktop app and the separate Main process wanting to read/write to/from this database, I wanted to make this database a shared resource.

I’ve had a look at the HSQLDB documentation and this post about Creating a shared HSQLDB database but to no avail.

In the post it talks about starting up the server via code. I don’t think this is what I want to do as I would like to have the HSQLDB database up and running all the time as there could be multiple users of the desktop app.

Looking at the official HSQLDB documentation, it states that you can start an HSQLDB server like this:

java -cp ../lib/hsqldb.jar org.hsqldb.Server -database.0 file:mydb -dbname.0 xdb

If I run the above command with my own database file and name, it seems to start up okay:

[Server@6ca1c]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@6ca1c]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@6ca1c]: Startup sequence initiated from main() method
[Server@6ca1c]: Loaded properties from [/some/path/myDatabase/server.properties]
[Server@6ca1c]: Initiating startup sequence...
[Server@6ca1c]: Server socket opened successfully in 16 ms.

I then changed my connection URL to the following:

jdbc:hsqldb:hsql://localhost/xdb

This does not seem to work for me. Any ideas as to what I’ve done wrong or what I could be missing?

Furthermore, when the desktop app calls off to the external Main method the desktop app just hangs as the external Main method notices that the desktop app seems to have a lock on the database. As soon as I shut down the desktop app, the external Main method actually does what I expected it to do.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T07:37:16+00:00Added an answer on May 18, 2026 at 7:37 am

    using jdbc:hsqldb:file:/some/path/myDatabase you are creating a in-process database so this should not be shared between multiple JVM (ideally), however there is a way as per guide

    “In 1.8.0, you can run a server
    instance in a thread from the same
    virtual machine as your application
    and provide external access to your
    in-process database.”

    imho, better way would be to start in server mode in separate jvm.

    update:

    check you log when the hsqlsdb server is starting up:

    [Server@83cc67]: Initiating startup sequence...
    [Server@83cc67]: Server socket opened successfully in 31 ms.
    [Server@83cc67]: Database [index=0, id=0, db=file:test, alias=] opened sucessfully in 250 ms.
    

    match the alias name in the driver url

    Connection c = DriverManager.getConnection("jdbc:hsqldb:hsql://localhost/", "sa", "");
    

    in this case there was no alias. I just tested this and it works fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a semi-related question to question to the following question I just raised:
This is semi-related to this question: How do I get the storage of each
This is semi-programming related. I'm working with more than 1 person on a website.
This question is directly related to this SO question I posed about 15 minutes
I have the following code (this is some semi-sudo code, which may not compile):
Disclaimer: this question is directly related to my programming homework. My C++ assignment consists
I have gotten this semi autogenerated code, but I am uncertain where the Post
I have code in my app that adds a UIView to the root view
I would ask a semi-theorical question about web services and client-server architecture. I have
We have a chunk of code something like this // semi-pseudo code def result

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.