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 6783533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:52:32+00:00 2026-05-26T16:52:32+00:00

I would like to use hsql within my DAO unit tests for a web

  • 0

I would like to use hsql within my DAO unit tests for a web application. The web app is written against mysql and uses three different schemas within the same mysql database. Some schemas has FK relationships with data in the other schemas. If I’m to unit test, I must be able to execute against a database that can hold multiple schemas.

I know that HSQL supports multiple schemas, but I don’t know how to configure hsql to have multiple schemas set up for an in-memory database. I read that I can define multiple schemas in the server.properties file, but the file needs to be in the location of where the java class was called — the junit.jar location? If so, that would be hard to support in my Java Maven application. How can I:

  1. Run an in-memory hsql database to start up with three databases?
  2. Where would I place the server.properties file in my Maven app?
  3. Could I point hsql to use a server.properties file in a location other than where the junit jar is (that’s a showstopper for me)?
  4. Is it possible to configure multiple schemas for an in-memory database just via a tricked out jdbc url?

I wish I could untangle the schemas from each other, but that’s not possible at this time.

Thanks for your help!

  • 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-26T16:52:33+00:00Added an answer on May 26, 2026 at 4:52 pm

    HSQLDB supports multiple schemas in the same database. Foreign keys can reference tables from different schemas. The following apply to the very latest HSQLDB 2.2.6 snapshot available from http://hsqldb.org

    1. Before running your tests, execute CREATE SCHEMA schemaname for each schema.
    2. Doesn’t matter where, you can specify the absolute path on the command line arguments when running. See the HSQLD Guide and JavaDoc on server.
    3. Yes.
    4. No. You use the SQL statement to create the schemas.

    Note you have two options for running HSQLDB, one is as a server, the other is as an embedded database. In the case of server, it must be started before the test run. In both cases, you need to connect to the database and create the schemas before your tests.

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

Sidebar

Related Questions

I would like to use a COM object in my application. How can I
I would like use data annotations to handle validation in my Silverlight app. The
I am using AdoNetAppender (SQL server) in my asp.net application and would like use
I currently have Spring configured to use HSQL, but I would like to use
I would like to use my laptop as a web development (PHP, Python, etc.)
I would like to use the group_by method, but instead of using a column
I would like to use complex numbers as defined in C99, but I need
I would like to use HTML 4.01 Strict, and used a DOCTYPE of it
I would like to use KVO in the following context: 1) In touchesBegan:withEvent: I
I would like to use python to make system calls to programs and time

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.