Datasource Configuration
swilliams7996 Jan 28, 2014 2:01 AMI'm trying to configure my MySQL database with Jboss and keep getting this error.
JBAS014775: New missing/unsatisfied dependencies:
service jboss.jdbc-driver.com_mysql (missing) dependents: [service jboss.data-source.java:jboss/datasources/test]
16:22:45,623 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss AS 7.1.0.Final "Thunder" started (with errors) in 4932ms - Started 135 of 209 services (2 services failed or missing dependencies, 70 services are passive or on-demand)
This is my module:
<?xmlversion= "1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="com.mysql">
<resources>
<resource-root path="mysql-connector-java-5.1.26-bin.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
<module name="javax.servlet.api" optional="true"/>
</dependencies>
</module>
This is my Persistence XML:
xml version="1.0" encoding="UTF-8"?>
persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="HelloWorld">
<jta-data-source>java:jboss/datasources/test</jta-data-source>
<class>model.MyUser</class>
</persistence-unit>
persistence>
My standalone XML:
xml version='1.0' encoding='UTF-8'?>
server xmlns="urn:jboss:domain:1.1">
<subsystem xmlns="urn:jboss:domain:datasources:1.0">
<datasources>
<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>
<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>com.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>sa</user-name>
<password>sa</password>
</security>
<statement>
<prepared-statement-cache-size>32</prepared-statement-cache-size>
<share-prepared-statements/>
</statement>
</datasource>
<drivers>
<driver name="com.mysql" module="com.mysql">
</driver>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
I hope someone can help me with this.
Thank you in advance.