jboss 7 mysql subsystem connecton problem
gjerich Oct 1, 2013 2:27 AMhi,
1. i would like to create mysql base as default for jboss 6.1. i assume i should put mysql connector jar (5.1.15) in jboss/modules/system/layers/base/com/mysql/main directory(?)
2. i create in same directory module.xml with this code:
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="com.mysql">
<resources>
<resource-root path="mysql-connector-java-5.1.15.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
<module name="javax.servlet.api" optional="true"/>
</dependencies>
</module>
3. and finally i include module in standalone.xml like this:
<datasources>
<datasource jndi-name="java:jboss/datasources/MySqlDS" pool-name="MySqlDS" enabled="true" use-java-context="true">
<connection-url>jdbc:mysql://localhost:3306/EJB3</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>username</user-name>
<password>password</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">
<xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
so in admin console i see MySqlDS (java:jboss/datasources/MySqlDS), but it is not connected correctly. Pool Usage is empty, so there is any pool size.. console return an error:
Unknown error
Unexpected HTTP response: 500 Request { "address" => [ ("subsystem" => "datasources"), ("data-source" => "MySqlDS"), ("statistics" => "jdbc") ], "operation" => "read-resource", "include-runtime" => true } Response Internal Server Error { "outcome" => "failed", "failure-description" => "JBAS014883: No resource definition is registered for address [ (\"subsystem\" => \"datasources\"), (\"data-source\" => \"MySqlDS\"), (\"statistics\" => \"jdbc\") ]", "rolled-back" => true }
log error:
ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 25) JBAS014613: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("jdbc-driver" => "com.mysql")
]) - failure description: "JBAS010441: Failed to load module for driver [com.mysql]"
JBAS014775: New missing/unsatisfied dependencies:
service jboss.jdbc-driver.com_mysql (missing) dependents: [service jboss.data-source.java:jboss/datasources/MySqlDS, service jboss.driver-demander.java:jboss/datasources/MySqlDS]
path definition problem(?)
thanks in advanced.
gasper
Message was edited by: gasper jeric