I am using JBoss 7.1.1. When I try to start the server, I get an exception. I have tried many solutions but nothing seems to work.
The following line appears in the logs -
New missing/unsatisfied dependencies:
service jboss.jdbc-driver.com_mysql (missing) dependents: [service jboss.data-source.java:jboss/MyDB]
Here is my standalone.xml:
</datasource>
<datasource jta="true" jndi-name="java:jboss/MyDB" pool-name="MyDB_Pool" enabled="true" use-java-context="true" use-ccm="true">
<connection-url>jdbc:mysql://localhost:3306/test</connection-url>
<driver>com.mysql</driver>
<security>
<user-name>root</user-name>
<password>root</password>
</security>
<timeout>
<idle-timeout-minutes>0</idle-timeout-minutes>
<query-timeout>600</query-timeout>
</timeout>
<statement>
<prepared-statement-cache-size>100</prepared-statement-cache-size>
<share-prepared-statements>true</share-prepared-statements>
</statement>
</datasource>
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
<driver name="com.mysql" module="com.mysql">
<xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
This is my module.xml:
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="com.mysql">
<resources>
<resource-root path="mysql-connector-java-5.1.24-bin.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
<module name="javax.servlet.api" optional="true"/>
<module name="javax.validation.api"/>
</dependencies>
</module>
But i still got this exception
Here is my web.xml(a part of it):
<resource-ref id="ResourceRef_1">
<res-ref-name>MyDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
<lookup-name>java:jboss/datasources/MyDB</lookup-name>
</resource-ref>
Can anyone help?