I have created database using hsql and also added one table using UI interface of swingmanager in java and hsql.
Point 1:
I created data base using the following details
Type : HSQL Database Engine Standalone
Driver: org.hsqldb.jdbcDriver
URL: jdbc:hsqldb:file:mydb
UserName: SA
Password: SA
Point 2: Have insterted some data from UI of hsql.
Point 3: hsql Connection is working
Point 4: Trying to read data using java code but getting exception saying - user lacks privilege or object not found error
- Similar issue -https://sourceforge.net/p/hsqldb/mailman/message/28944633/
- Tried with providing capital "SA" in while connecting to DB and also in code
- As hsql is case sensitive, try query like- SELECT ID FROM DOMAIN or SELECT ID FROM "DOMAIN"
- GO to this path -C:\hsqldb-2.4.1\hsqldb\data check that you don't have multiple copies of these files: mydb.log, mydb.lck, mydb.properties, etc in your workspace
- Tried this query in single quotes 'SELECT ID FROM DOMAIN'
- This link has one more solution - HSQLDB user lacks privilege or object not found error when making select statements with where
You can try with creating different table with unique name instead of domain
Resultset rs=stmt.executequery("Select * from testdemo");
This line throwing exception saying -user lacks privilege or object not found error
Actual Result:
user lacks privilege or object not found error
Expected Result: It should read data from table