Okay, I thought I was on to something but I'm still getting the same errors.
I think you should start from the beginning.
There are two ways to use the JDBC drive,
first is to deploy it (simple add to the deployments directory in standalone mode), in this case you need to reference the JAR file in your DS definition.
The recommended way is to add the JDBC diriver as a module, in this case you can follow
Data Source Configuration in AS 7
You should start as simple as possible and check each step
I finally got it working. I put the entire name of the driver jar like this.
datasource jndi-name="java:jboss/datasources/test" pool-name="test" enabled="true" use-java-context="true">
<connection-url>jdbc:mysql://localhost:3306/test</connection-url>
<driver> mysql-connector-java-5.1.29-bin.jar</driver>
drivers>
<driver name="mysql-connector-java-5.1.29-bin.jar" module="com.mysql"/>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
That is different to the configuration as driver with modules.
You should look ito the doc I linked above and follow the module/driver installation. It works for me without issues.
The doc describes the recommended way for this.
The way I have it works so thats good enough for me.