Problem with MySQL JBoss 7 data source

I am trying to create a data source in JBOSS 7.

My standalone .xml excerpts:

<subsystem xmlns="urn:jboss:domain:datasources:1.0">
<datasources>
    <datasource jndi-name="MySqlDS" pool-name="MySqlDS" enabled="true" jta="true" use-java-context="true" use-ccm="true">
         <connection-url>jdbc:mysql://localhost:3306/sampledb</connection-url>
          <driver>mysql</driver>
          <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
          <pool>
            <prefill>true</prefill>
            <use-strict-min>false</use-strict-min>
            <flush-strategy>FailingConnectionOnly</flush-strategy>
          </pool>
          <security>
            <user-name>root</user-name>
            <password>matrix</password>
          </security>
    </datasource>
    <drivers>
        <driver name="mysql" module="com.mysql">
         <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
        </driver>
    </drivers>
</datasources>

and I created the module / com / mysql / main directory and put the mysql jar there along with module.xml, which looks like this:

<module xmlns="urn:jboss:module:1.0" name="com.mysql">
    <resources>
        <resource-root path="mysql-connector-java-3.0.17-ga-bin.jar"/>
            <!-- Insert resources here -->
    </resources>
    <dependencies>
      <module name="javax.api"/>
      <module name="javax.transaction.api"/>
    </dependencies>
</module>

and my persistence.xml uses this data source

 <jta-data-source>java:/MySqlDS</jta-data-source>

But the server starts to generate an error message, as shown below.

New missing/unsatisfied dependencies:
      service jboss.jdbc-driver.mysql (missing)

Could you help me?

Thank.

+5
source share
4 answers

This will help you fix the problem.

Jboss and mysql connector

+4
source

. . , ! mysql-connector-java-5.0.4-bin.jar mysql-connector-java-5.1.25-bin.jar, .

+1
source

For me, after checking again and again, all the parameters module.xml and standalone.xml, where it is correct. I realized that I used mysql-connector-java-xxx-bin.jar ... Changed it in non-bin-bank, and it MAGICALLY worked: D

0
source

All Articles