In the conf/standardjbosscmp-jdbc.xml file, at the bottom, there is a list of "reserved-words", add the extra reserved words to this list.
It creates the table... but now it appears to be another problem... it chrashes at the following EJB-QL string :
ERROR [EntityContainer] Starting failed org.jboss.deployment.DeploymentException: Error compiling EJB-QL statement 'SELECT DISTINCT Object (u) FROM User AS u WHERE u.name = ?1 AND u.password = ?2'; - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.TokenMgrError: Lexical error at line 1, column 53. Encountered: " " (32), after : "")
(note: I have included the word user in the "reserved words")
Can you give me an advice?
Sorry about my last question, it was a silly one, but I was so tired that I didn`t saw the bug... The specified error mentioned that afther the table "u." it was a space (0x20) and then the rest of the querry (though I copied it right here because I modified, actualiy deleted, the CR/LF from the debug screen, from the command prompt)
But now I am facing another stupid error : Afther I have mentioned that the words : user, group and key; as reserved by msql and Jboss generated the table names with an X in front of them, at a table that relates the tables user and group, the Jboss throws as colum names the reserved words (with no x in front). The error is :
ERROR [EntityContainer] Starting failed org.jboss.deployment.DeploymentException: Error while creating table User_groups_Group_users; - nested throwable: (java.sql.SQLException: Syntax error or access violation, message from server: "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 'Group INTEGER NOT NULL, User INTEGER NOT NULL, CONSTRAINT pk_Us")
Is there any posibility to prevent Jboss from using the reserved words from the colum names?