Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException

 
Rahul Bhalla
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello rancher
In my application after getting the statement object i try to execute give comand

but on server i found given exception
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'taskproject.adminregisteration' doesn't exist
please also tell if table is empty then what happen after executing above command
 
Paul Clapham
Sheriff
Posts: 21149
32
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rahul Bhalla wrote:Hello rancher
In my application after getting the statement object i try to execute give comand

but on server i found given exception
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'taskproject.adminregisteration' doesn't exist


Then the conclusion you should draw from that is that... the table doesn't exist. Really. Programmers try to write code which is useful, so they try to write code which produces error messages which explain the problem. You should assume that is the case when you see an error message.

(My guess is that its name is "adminregistration" instead of "adminregisteration".)

please also tell if table is empty then what happen after executing above command


If the table exists, and is empty, then what happens is that control proceeds to the next line of code after that one. No exceptions are thrown for queries which do not return any rows.
 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the table specified in the exception message exist? Perhaps the name of the table in the DB and the application code don't match up?
 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another thing to check is if your connection is set to use the 'taskproject' database schema by default.
 
Rahul Bhalla
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you are right, there is a spelling mistake now my program runs
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic