I have had similar issues, you have to be careful what you name your tables.
They cant be reserved words!
Why there is no list of reserved words defined?
anything in ejbql is reserved, and if you use hibernate, hql as well. Of course, you can change the name of the table without changing the name of the class.