I've managed to get JBoss talking to mySQL and am trying to run the Gangsters Template.
However I'm hitting a problem when jBoss tries to create the tables for the template (other tables like jms_transactions are created ok).
What I see is:
12:29:04,792 INFO [EntityContainer] Starting
12:29:04,808 INFO [EntityContainer] Started
12:29:04,808 INFO [EntityContainer] Starting
12:29:04,854 ERROR [EntityContainer] Starting failed
org.jboss.deployment.DeploymentException: Error while creating table; - 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 'desc VARCHAR(250) BINARY NOT NULL, the_boss INTEGER, CONSTRAINT")
Which implies that the CREATE TABLE SQL is not correctly formed for this version of mySQL.
What I havn't been able to figure out is where this syntax is defined.
JDBCStartCommand.java which causes mySQl to break does not appear to have any mySQL specific information, whereas JDBCMySQLCreateCommand.java is mySQL specific but just seems to do INSERT
So my question is do I need to write an equivalent:
JDBCMySQLStartCommand or am i going in the wrong direction?
Thanks in advance
Solution was far simpler than I anticipated :-)
jbosscmp-jdbc in the template maps the description field to a column called 'desc'
mySQL has 'desc' as a reserved word, so just change the mapping and all is OK.