aspose file tools
The moose likes JDBC and the fly likes java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: EMPLOYEE Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: EMPLOYEE" Watch "java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: EMPLOYEE" New topic
Author

java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: EMPLOYEE

Vinod Vijay
Ranch Hand

Joined: Sep 13, 2011
Posts: 114

Hi, I'm trying to connect my java program with HSQLDB. I'm getting following error:-



I can easily access my HSQL db with HSQL DB manager and can insert data directly into that. Even I have inserted one record using HSQL db manager directly but not through java program.
Any suggestion


Vinod Vijay Nair
Sumit Patil
Ranch Hand

Joined: May 25, 2009
Posts: 296

What is the sql you are running in your java program?
Have you tried running the same query directly in HSQL db manager?
Please try that.

Thanks.


Thanks & Regards, Sumeet
SCJP 1.4, SCWCD 5, LinkedIn Profile
Vinod Vijay
Ranch Hand

Joined: Sep 13, 2011
Posts: 114

Sumit Patil wrote:What is the sql you are running in your java program?
Have you tried running the same query directly in HSQL db manager?
Please try that.

Thanks.


Here is my code:-



Yes! I tried the same sql in HSQL DB manager directly and it worked.
Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1098

and you connected as the same user? as in the hibernate config files
Vinod Vijay
Ranch Hand

Joined: Sep 13, 2011
Posts: 114

Wendy Gibbons wrote:and you connected as the same user? as in the hibernate config files


I'm not using hibernate here. I'm trying to access with username 'SA'.
Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1098

Vinod Vijay wrote:
Wendy Gibbons wrote:and you connected as the same user? as in the hibernate config files


I'm not using hibernate here. I'm trying to access with username 'SA'.


sorry you mentioned HSQL i thought that was hibernate
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: EMPLOYEE
 
Similar Threads
HSQLDB - user lacks privilege or object not found
Cannot conect to mySql DB after changing DB from HSQL to mySql in JBOSS 5
HSQL embedded database giving "user lacks privilege or object not found"
How to view HSQL database built-into JBoss?