i have this error:
Database created !
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
When the error message says that you have a syntax error in your SQL, then what you should do is to look at your SQL and see what's wrong with it. That should be fairly obvious, no? So why not put in a debugging statement which outputs the SQL to the console so you can see it (and not just some Java code which builds it)?