8 Replies Latest reply on Mar 11, 2014 3:26 AM by Wolf-Dieter Fink

    Unable to setup MySQL data source in JBoss 7.1.1

    Joachim Altmeyer Newbie

      I have been trying to setup MySQL database datasource in JBoss 7.1.1 as well and - as well as others - I am not able to do it successfully. Here the error I am getting:

       

      JBAS014775:    New missing/unsatisfied dependencies:

            service jboss.jdbc-driver.mysql (missing) dependents: [service jboss.data-source.java:jboss/datasources/MySqlDS]

       

      and the driver was not deployed.

       

      Here my modules.xml file located in $JBOSS_HOME/modules/com/mysql/main :

      <?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.29-bin.jar"/>

          </resources>

          <dependencies>

              <module name="javax.api"/>

        <module name="javax.transaction.api"/>

              <module name="javax.servlet.api" optional="true"/>

          </dependencies>

      </module>

       

      and the database source configuration of standalone.xml:

                  <datasources>

                      <datasource jta="true" jndi-name="java:jboss/datasources/MySqlDS" pool-name="MySqlDS" enabled="true" use-java-context="true" use-ccm="true">

                          <connection-url>jdbc:mysql://localhost:3306/MySqlDS</connection-url>

                          <driver>mysql</driver>

                          <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>

                          <pool>

                              <min-pool-size>10</min-pool-size>

                              <max-pool-size>100</max-pool-size>

                              <prefill>true</prefill>

                          </pool>

                          <security>

                              <user-name>ABC</user-name>

                              <password>ABC</password>

                          </security>

                          <statement>

                              <prepared-statement-cache-size>32</prepared-statement-cache-size>

                              <share-prepared-statements>true</share-prepared-statements>

                          </statement>

                      </datasource>

                      <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">

                          <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>

                          <driver>h2</driver>

                          <security>

                              <user-name>sa</user-name>

                              <password>sa</password>

                          </security>

                      </datasource>

                      <drivers>

                          <driver name="mysql" module="com.mysql">

                              <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>

                          </driver>

                          <driver name="h2" module="com.h2database.h2">

                              <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>

                          </driver>

                      </drivers>

                  </datasources>

       

       

       

      I appreciate any help.