You need declare dependency to mysql module in gatein/modules/org/gatein/lib/main/module.xml (find "hsqldb" in that which is example)
This worked, thank you.
For anyone who is reading this, my final solution was to copy the mysql connector jar file to modules/com/mysql/main, create the module.xml for it and then update the gatein/modules/org/gatein/lib/main/module.xml to include the dependency on mysql.
this is a much better solution than this one :
For setting the dependency, in the file : JBOSS_HOME/gatein/modules/org/gatein/lib/main/module.xml
.... <module name="org.hsqldb" /> <!-- Added for the MySQL driver to be loaded before GateIn configuration starts. --> <module name="com.mysql.jdbc" /> <module name="org.jboss.common-core" /> ....
(with "com.mysql.jdbc" being the name you put for your MySQL connector driver module).