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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T11:11:36+00:00 2026-05-28T11:11:36+00:00

Folks, My Issue Why is an HSQLDB file-based database I have pre-populated with a

  • 0

Folks,

My Issue

Why is an HSQLDB file-based database I have pre-populated with a schema and data not populated when I connect to it later?

I think I’m missing some small, but HUGELY IMPORTANT configuration.

My Environment

  1. HSQLDB setup with the Maven Sql plugin and Maven Liquibase plugin.
  2. Spring / Hibernate Webapp

Steps to Populate the Database and Run the App

  1. Run the Sql Maven plugin to create 3 schemas in the HSQL database

  2. Run the Maven liquibase plugin, populating with ddl and lookup data

The jdbc url I’m using within Maven to setup hsql is: jdbc:hsqldb:file:${project.basedir}/target/db/build;shutdown=true.
It translates to: jdbc:hsqldb:file:/Users/myHomeDir/work/myProj/target/db/build;shutdown=true

I have confirmed the the hsql database files are created and populated — insert statements in the build.script file are present as expected. I can connect to the database using RazorSQL and see the data and tables present.

Running the App

I’ve configured my DataSource in my Spring config as follows:

<bean class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close" id="dataSource">
        <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
        <property name="url" value="jdbc:hsqldb:file:/Users/myHomeDir/work/myProj/target/db/build;shutdown=true" />
        <property name="username" value="sa" />
        <property name="password" value="" />

I’ve fired up the app and see that Hibernate/Spring makes the connection to the database. A database.lck file is created so I know the app has made a connection. (Also, I’ve ensured that RazorSQL is shutdown and not using the database at the same time).

The Error

The error indicates that the database entities don’t exist:

[INFO] Started Jetty Server
Hibernate: 
    select
        this_.id as id5_2_,
        this_.created_date as created2_5_2_,
        this_.creating_user_id as creating3_5_2_,
        this_.email as email5_2_,
        this_.first_name as first5_5_2_,
        this_.is_enabled as is6_5_2_,
        this_.last_login_date as last7_5_2_,
        this_.last_modified_date as last8_5_2_,
        this_.last_modifying_user_id as last9_5_2_,
        this_.last_name as last10_5_2_,
        this_.login as login5_2_,
        this_.middle_initial as middle12_5_2_,
        this_.password_hash as password13_5_2_,
        this_.password_history as password14_5_2_,
        this_.suffix as suffix5_2_,
        roles2_.user_id as user1_5_4_,
        role3_.id as role2_4_,
        role3_.id as id3_0_,
        role3_.code as code3_0_,
        role3_.description as descript3_3_0_,
        role3_.name as name3_0_,
        role3_.type_id as type5_3_0_,
        roletype4_.id as id4_1_,
        roletype4_.description as descript2_4_1_ 
    from
        security.user this_ 
    left outer join
        security.user_role roles2_ 
            on this_.id=roles2_.user_id 
    left outer join
        security.role role3_ 
            on roles2_.role_id=role3_.id 
    left outer join
        security.role_type roletype4_ 
            on role3_.type_id=roletype4_.id 
    where
        this_.login=?
[01/20/2012 17:30:18,440] WARN : org.hibernate.util.JDBCExceptionReporter - SQL Error: -5501, SQLState: 42501
[01/20/2012 17:30:18,440] ERROR: org.hibernate.util.JDBCExceptionReporter - user lacks privilege or object not found: USER
2012-01-20 17:30:18.443:WARN::/my-webapp/j_spring_security_check
org.hibernate.exception.SQLGrammarException: could not execute query
  • 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-28T11:11:37+00:00Added an answer on May 28, 2026 at 11:11 am

    Just to make sure, can’t it be caused by conflict of table name (USER) with SQL keyword?

    Try to use different table name instead, or at least configure Hibernate to escape it (@Table(name = "\"user\"")).

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

Sidebar

Related Questions

I have a schema in an Oracle 11g R2 database that I'm trying to
Folks, I'm having an interesting issue with Silverlight DataGrid data binding. It may be
Good morning folks, I'm just that beginner in json, I have a formated data
I have looked at the other posts from the other folks regarding this issue
Hello folks, I've got the issue to add a browser event to some input
Folks, I connect to a large number of SQL Server 2005 databases through SQL
Folks, We have been using OpenXml APIs found in System.IO.Packaging for creating a package
Folks, I'm tryning to extract data from web page using C#.. for the moment
Update: fixed delta calculations in code, still the issue remains Folks, could you please
Ok fine folks of Stack Overflow, I have a question and I can't seem

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.