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

  • Home
  • SEARCH
  • 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 6181321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:59:56+00:00 2026-05-24T00:59:56+00:00

I use HSQLDB and Hibernate. I have to implement some functionality on database level

  • 0

I use HSQLDB and Hibernate. I have to implement some functionality on database level (trigger …) and because of this I have to execute some native SQL. I create a new table (works) and then try to insert some data (fails). I do this as SA such there should be no access right violation. Someone can guess why the user lacks privilege or object not found: A492Interface is thrown?

This is my code (simplified):

session.createSQLQuery("CREATE TABLE entity_table_map (entity_name VARCHAR(50) NOT NULL PRIMARY KEY,table_name VARCHAR(50) NOT NULL)").executeUpdate();
session.createSQLQuery("INSERT INTO entity_table_map (entity_name,table_name) VALUES (\"A429Interface\",\"interface\")").executeUpdate();

Here is the relevant log:

[Server@19616c7]: 0:SQLCLI:SQLPREPARE CREATE TABLE entity_table_map (entity_name VARCHAR(50) NOT NULL PRIMARY KEY,table_name VARCHAR(50) NOT NULL)
[Server@19616c7]: 0:SQLCLI:SQLEXECUTE:5
[Server@19616c7]: 0:SQLCLI:SQLFREESTMT:5
[Server@19616c7]: 0:HSQLCLI:GETSESSIONATTR
[Server@19616c7]: 0:SQLCLI:SQLPREPARE INSERT INTO entity_table_map (entity_name,table_name) VALUES ("A492Interface","interface")
[Server@19616c7]: [Thread[HSQLDB Connection @13adc56,5,HSQLDB Connections @19616c7]]: 0:disconnected SA

And here the exception:

Exception in thread "main" org.hibernate.exception.SQLGrammarException: could not execute native bulk manipulation query
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
    at org.hibernate.engine.query.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:219)
    at org.hibernate.impl.SessionImpl.executeNativeUpdate(SessionImpl.java:1310)
    at org.hibernate.impl.SQLQueryImpl.executeUpdate(SQLQueryImpl.java:396)
    at version.api.VersionAPI.setupDatabase(VersionAPI.java:38)
    at test.ui.VersionUI.setupDatabase(VersionUI.java:107)
    at test.SetupDatabase.main(SetupDatabase.java:9)
Caused by: java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: A492Interface
    at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
    at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
    at org.hsqldb.jdbc.JDBCPreparedStatement.<init>(Unknown Source)
    at org.hsqldb.jdbc.JDBCConnection.prepareStatement(Unknown Source)
    at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534)
    at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:116)
    at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:109)
    at org.hibernate.engine.query.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:202)
    ... 5 more

Update: It seems I can’t execute any insert statement. If I try to insert data into an other table this fails, too. I must be doing something realy dumb … but didn’t see it …

  • 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-24T00:59:58+00:00Added an answer on May 24, 2026 at 12:59 am

    Details of the error mentioned by OP.

    session.createSQLQuery("INSERT INTO entity_table_map (entity_name,table_name) 
    VALUES (\"A429Interface\",\"interface\")").executeUpdate();
    

    In the SQL statement above, the two inserted values are strings, therefore the single quote (SQL quote character for strings) must be used.

    When the double quote (SQL quote character for variable, column and table names) is used, the engine expects to find variables named “A429Interface”, “interface” to insert into the table. As no such variables exist, it reports user lacks privilege or object not found: A492Interface

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

Sidebar

Related Questions

My unit tests use Hibernate to connect to an in-memory HSQLDB database. I was
In my web app,I am using hibernate and hsqldb for database operations..and use Ant
At the moment we use HSQLDB as an embedded database, but we search for
I am working on a Java application that will use some Hibernate (annotated by
i'm working on a project in which i use JPA, Hibernate and all this
I have an open source Java application that uses Hibernate and HSQLDB for persistence.
I have just started using Hibernate with HSQLDB. In the tutorial they tell me
I use hsqldb to run my unit tests that need a database access. For
use this website a lot but first time posting. My program creates a number
Use case: I've just entered insert mode, and typed some text. Now I want

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.