<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Jboss 7.1.1 FAILED MySql datasource test-connection-in-pool
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/ffabreti">Fernando Fabreti</a> in <i>Datasource Configuration</i> - <a href="https://community.jboss.org/message/729652#729652">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>I have installed MySql JDBC Driver following directions at <a class="" href="https://community.jboss.org/docs/DOC-16657">https://community.jboss.org/wiki/DataSourceConfigurationInAS7</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>When I try to test it, this happens:</p><blockquote class="jive-quote"><p style="padding-left: 30px;"><span style="font-family: courier new,courier; font-size: 8pt;">[standalone@localhost:9999 /] /subsystem=datasources/data-source=java\:jboss\/datasources\/MySqlDS:test-connection-in-pool </span></p><p style="padding-left: 30px;"><span style="font-family: courier new,courier; font-size: 8pt;">{</span></p><p style="padding-left: 30px;"><span style="font-family: courier new,courier; font-size: 8pt;">    "outcome" => "<strong>failed</strong>",</span></p><p style="padding-left: 30px;"><span style="font-family: courier new,courier; font-size: 8pt;">    "failure-description" => "JBAS014807: <strong>Management resource</strong> '[</span></p><p style="padding-left: 30px;"><span style="font-family: courier new,courier; font-size: 8pt;">    (\"subsystem\" => \"datasources\"),</span></p><p style="padding-left: 30px;"><span style="font-family: courier new,courier; font-size: 8pt;">    (\"data-source\" => \"java:jboss/datasources/MySqlDS\")</span></p><p style="padding-left: 30px;"><span style="font-family: courier new,courier; font-size: 8pt;">]' <strong>not found</strong>",</span></p><p style="padding-left: 30px;"><span style="font-family: courier new,courier; font-size: 8pt;">    "rolled-back" => true</span></p><p style="padding-left: 30px;"><span style="font-family: courier new,courier; font-size: 8pt;">}</span></p></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I'm completely stuck on this, I've double-checked, I've searched the forum and goggled.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>My configs are:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><blockquote class="jive-quote"><p>/usr/local/jboss# <strong>ls -la modules/com/mysql/main</strong></p><p><span style="font-family: courier new,courier; font-size: 8pt;">drwxr-xr-x 2 jboss jboss   4096 2012-04-12 13:06 ./</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">drwxr-xr-x 3 jboss jboss   4096 2012-04-12 10:49 ../</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">-rw-r--r-- 1 jboss jboss    263 2012-04-12 10:53 module.xml</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">-rw-r--r-- 1 jboss jboss 801912 2012-04-12 09:54 mysql-connector-java-5.1.19-bin.jar</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">-rw-r--r-- 1 jboss jboss    461 2012-04-12 11:03 mysql-connector-java-5.1.19-bin.jar.index</span></p></blockquote><blockquote class="jive-quote"><p>/usr/local/jboss# cat modules/com/mysql/main/<strong>module.xml</strong></p><p><span style="font-family: courier new,courier; font-size: 8pt;"><?xml version="1.0" encoding="UTF-8"?></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;"><module xmlns="urn:jboss:module:1.0" name="com.mysql"></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">  <resources></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">    <resource-root path="mysql-connector-java-5.1.19-bin.jar"/></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">  </resources></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">  <dependencies></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">    <module name="javax.api"/></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">  </dependencies></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;"></module></span></p></blockquote><blockquote class="jive-quote"><p>/usr/local/jboss# cat standalone/configuration/<strong>standalone.xml</strong></p><p>[..]</p><p><span style="font-family: courier new,courier; font-size: 8pt;"> <subsystem xmlns="urn:jboss:domain:datasources:1.0"></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">            <datasources></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true"></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                    <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                    <driver>h2</driver></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                    <security></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                        <user-name>sa</user-name></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                        <password>sa</password></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                    </security></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                </datasource></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">        <<strong>datasource jndi-name="java:/MySqlDS" enabled="true" use-java-context="true" pool-name="MySqlDS"</strong>></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                <connection-url>jdbc:mysql://localhost:3306/sfitx_development</connection-url></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                    <driver>com.mysql</driver></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                <driver-class></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                    com.mysql.jdbc.Driver</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                </driver-class></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                    <pool></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">            <min-pool-size>10</min-pool-size></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                <max-pool-size>100</max-pool-size></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                <prefill>true</prefill></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">            </pool></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                    <security></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                        <user-name>jruby</user-name></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                        <password>123456</password></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                    </security></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                    <validation></validation></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                    <timeout></timeout></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                    <statement></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                <prepared-statement-cache-size>32</prepared-statement-cache-size></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                <share-prepared-statements/></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">            </statement></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                </datasource></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                <drivers></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                    <driver name="h2" module="com.h2database.h2"></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                        <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                    </driver></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                    <driver name="com.mysql" module="com.mysql"> </span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">            <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class> </span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                <!--driver-class>com.mysql.jdbc.Driver</driver-class--></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">            </driver></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">                </drivers></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">            </datasources></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">        </subsystem></span></p></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><blockquote class="jive-quote"><p><span style="font-size: 8pt; font-family: courier new,courier;">/usr/local/jboss# bin/standalone.sh </span></p><p><span style="font-size: 8pt; font-family: courier new,courier;">=========================================================================</span></p><p> <span style="font-size: 8pt; font-family: courier new,courier;">  JBoss Bootstrap Environment</span></p><p> <span style="font-size: 8pt; font-family: courier new,courier;"> JBOSS_HOME: /usr/local/jboss</span></p><p> <span style="font-size: 8pt; font-family: courier new,courier;"> JAVA: java</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-size: 8pt; font-family: courier new,courier;">  JAVA_OPTS:  -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml</span></p><p> <span style="font-size: 8pt; font-family: courier new,courier;">=========================================================================</span></p><p> <span style="font-size: 8pt; font-family: courier new,courier;">13:08:51,951 INFO  [org.jboss.modules] JBoss Modules version 1.1.1.GA</span></p><p><span style="font-size: 8pt; font-family: courier new,courier;">13:08:52,096 INFO  [org.jboss.msc] JBoss MSC version 1.0.2.GA</span></p><p><span style="font-size: 8pt; font-family: courier new,courier;">13:08:52,135 INFO  [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting</span></p><p><span style="font-size: 8pt; font-family: courier new,courier;">13:08:52,854 INFO  [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)</span></p><p><span style="font-size: 8pt; font-family: courier new,courier;">13:08:52,855 INFO  [org.xnio] XNIO Version 3.0.3.GA</span></p><p><span style="font-size: 8pt; font-family: courier new,courier;">13:08:52,871 INFO  [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA</span></p><p><span style="font-size: 8pt; font-family: courier new,courier;">13:08:52,883 INFO  [org.jboss.remoting] JBoss Remoting version 3.2.3.GA</span></p><p><span style="font-size: 8pt; font-family: courier new,courier;">13:08:52,912 INFO  [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers</span></p><p><span style="font-size: 8pt; font-family: courier new,courier;">13:08:52,921 INFO  [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem</span></p><p><span style="font-size: 8pt; font-family: courier new,courier;">13:08:52,950 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.</span></p><p><span style="font-size: 8pt; font-family: courier new,courier;">13:08:53,021 INFO  [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem</span></p><p><span style="font-size: 8pt; font-family: courier new,courier;">13:08:53,023 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem</span></p><p><span style="font-size: 8pt; font-family: courier new,courier;">13:08:53,029 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem</span></p><p><span style="font-size: 8pt; font-family: courier new,courier;">13:08:53,032 INFO  [org.jboss.as.security] (MSC service thread 1-4) JBAS013100: Current PicketBox version=4.0.7.Final</span></p><p><span style="font-size: 8pt; font-family: courier new,courier;">13:08:53,066 INFO  [org.jboss.as.naming] (MSC service thread 1-3) JBAS011802: Starting Naming Service</span></p><p><span style="font-size: 8pt; font-family: courier new,courier;">13:08:53,077 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension</span></p><p><span style="font-size: 8pt; font-family: courier new,courier;">13:08:53,084 INFO  [org.jboss.as.connector] (MSC service thread 1-8) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)</span></p><p><span style="font-size: 8pt; font-family: courier new,courier;">13:08:53,085 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-2) JBAS015400: Bound mail session [java:jboss/mail/Default]</span></p><p><span style="font-size: 8pt; font-family: courier new,courier;">13:08:53,137 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)</span></p><p><span style="font-size: 8pt; font-family: courier new,courier;">13:08:53,173 INFO  <strong>[org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)</strong></span></p><p><span style="font-size: 8pt; font-family: courier new,courier;">13:08:53,275 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-5) Starting Coyote HTTP/1.1 on http--0.0.0.0-8080</span></p><p><span style="font-size: 8pt; font-family: courier new,courier;">13:08:53,279 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-8) JBoss Web Services - Stack CXF Server 4.0.2.GA</span></p><p><span style="font-size: 8pt; font-family: courier new,courier;">13:08:53,540 INFO  [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100: Listening on /127.0.0.1:9999</span></p><p><span style="font-size: 8pt; font-family: courier new,courier;">13:08:53,540 INFO  [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on /0.0.0.0:4447</span></p><p><span style="font-size: 8pt; font-family: courier new,courier;">13:08:53,541 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-6) JBAS015012: Started FileSystemDeploymentService for directory /usr/local/jboss/standalone/deployments</span></p><p><span style="font-size: 8pt; font-family: courier new,courier;">13:08:53,643 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-6) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]</span></p><p><span style="font-size: 8pt; font-family: courier new,courier;">13:08:53,652 INFO  <strong>[org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) JBAS010400: Bound data source [java:/MySqlDS]</strong></span></p><p><span style="font-size: 8pt; font-family: courier new,courier;"><span>13:08:53,690 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on </span><a class="jive-link-external-small" href="http://127.0.0.1:9990" target="_blank">http://127.0.0.1:9990</a></span></p><p><span style="font-size: 8pt; font-family: courier new,courier;">13:08:53,691 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 1925ms - Started 137 of 213 services (74 services are passive or on-demand)</span></p></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><blockquote class="jive-quote"><p><a class="jive-link-external-small" href="http://localhost:9990/console/App.html#ds-metrics" target="_blank">http://localhost:9990/console/App.html#ds-metrics</a></p><p><span> Captura de tela em 2012-04-12 13:18:34.png </span></p></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><blockquote class="jive-quote"><p>MySql Instance on same machine:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: courier new,courier; font-size: 8pt;">mysql> use mysql;</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">Database changed</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">mysql> select host, db, user, select_priv from db;</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">+------+-------------------+-------+-------------+</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">| host | db                | user  | select_priv |</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">+------+-------------------+-------+-------------+</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">| %    | sfitx             | jruby | Y           |</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">| %    | <strong>sfitx_development</strong> | jruby | Y           |</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">+------+-------------------+-------+-------------+</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">2 rows in set (0.00 sec)</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-family: courier new,courier; font-size: 8pt;">mysql> select host  from user where <strong>user='jruby'</strong>;</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">+-----------+</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">| host      |</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">+-----------+</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">| <strong>localhost</strong> |</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">+-----------+</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">1 row in set (0.00 sec)</span></p></blockquote></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/729652#729652">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in Datasource Configuration at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2077">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>