<!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="http://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;">
    AS7: Wrong Driver Class for Postgresql
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/akpramod">zaq xsw</a> in <i>Datasource Configuration</i> - <a href="http://community.jboss.org/message/643777#643777">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Dear JBoss users,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I am facing an issue with creating the postgresql connection pool with postgres 9.1 + AS7.</p><p>I deployed the postgres jdbc driver in the deployments folder and then when the standalone server is started, I see the following exceptions.</p><p>The postgres database is up and running.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>=====</p><p>08:29:03,281 INFO&#160; [org.jboss.as.jpa] (MSC service thread 1-1) added javax.persistence.api dependency to postgresql-9.1-901.jdbc4.jar</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>08:29:03,312 INFO&#160; [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 9.1)</p><p>08:29:03,328 INFO&#160; [org.jboss.as.server.controller] (Controller Boot Thread) Deployed "postgresql-9.1-901.jdbc4.jar"</p><p>08:29:03,515 INFO&#160; [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) Bound data source [java:jboss/datasources/myDS]</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="color: #ff0000;">08:29:03,546 WARN&#160; [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (JCA PoolFiller) IJ000610: Unable to fill pool: javax.resource.ResourceException: Could not create connection</span></p><p><span style="color: #ff0000;">&#160;&#160;&#160; at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:277)</span></p><p><span style="color: #ff0000;">&#160;&#160;&#160; at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:235)</span></p><p><span style="color: #ff0000;">&#160;&#160;&#160; at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:706) [ironjacamar-core-impl-1.0.3.Final.jar:1.0.3.Final]</span></p><p><span style="color: #ff0000;">&#160;&#160;&#160; at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.fillToMin(SemaphoreArrayListManagedConnectionPool.java:653) [ironjacamar-core-impl-1.0.3.Final.jar:1.0.3.Final]</span></p><p><span style="color: #ff0000;">&#160;&#160;&#160; at org.jboss.jca.core.connectionmanager.pool.mcp.PoolFiller.run(PoolFiller.java:97) [ironjacamar-core-impl-1.0.3.Final.jar:1.0.3.Final]</span></p><p><span style="color: #ff0000;">&#160;&#160;&#160; at java.lang.Thread.run(Thread.java:662) [:1.6.0_30]</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="color: #ff0000;">Caused by: javax.resource.ResourceException: <strong>Wrong driver class [class org.postgresql.Driver] for this connection URL [jdbc:postgres://localhost:5432/mydb]</strong></span></p><p><span style="color: #ff0000;">&#160;&#160;&#160; at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:251)</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="color: #ff0000;">&#160;&#160;&#160; ... 5 more</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>08:29:03,578 INFO&#160; [org.jboss.as] (Controller Boot Thread) JBoss AS 7.0.2.Final "Arc" started in 8782ms - Started 108 of 165 services (57 services are passive or on-demand)</p><p>=====</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>My datasource configuration in standalone.xml is as below.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>=====</p><p><span style="color: #0000ff;"><em>&lt;datasources&gt;</em></span></p><p><span style="color: #0000ff;"><em>&#160;&#160;&#160; &lt;datasource jndi-name="java:jboss/datasources/myDS" pool-name="myDS" enabled="true" jta="true" use-java-context="true" use-ccm="true"&gt;</em></span></p><p><span style="color: #0000ff;"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;connection-url&gt; jdbc:postgres://localhost:5432/mydb &lt;/connection-url&gt;</em></span></p><p><span style="color: #0000ff;"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;driver-class&gt; org.postgresql.Driver &lt;/driver-class&gt;</em></span></p><p><span style="color: #0000ff;"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;driver&gt; postgresql-9.1-901.jdbc4.jar &lt;/driver&gt;</em></span></p><p><span style="color: #0000ff;"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;pool&gt;</em></span></p><p><span style="color: #0000ff;"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;min-pool-size&gt; 10 &lt;/min-pool-size&gt;</em></span></p><p><span style="color: #0000ff;"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;max-pool-size&gt; 100 &lt;/max-pool-size&gt;</em></span></p><p><span style="color: #0000ff;"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;prefill&gt; true &lt;/prefill&gt;</em></span></p><p><span style="color: #0000ff;"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;use-strict-min&gt; false &lt;/use-strict-min&gt;</em></span></p><p><span style="color: #0000ff;"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;flush-strategy&gt; FailingConnectionOnly &lt;/flush-strategy&gt;</em></span></p><p><span style="color: #0000ff;"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/pool&gt;</em></span></p><p><span style="color: #0000ff;"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;security&gt;</em></span></p><p><span style="color: #0000ff;"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;user-name&gt; admin &lt;/user-name&gt;</em></span></p><p><span style="color: #0000ff;"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;password&gt; abc123 &lt;/password&gt;</em></span></p><p><span style="color: #0000ff;"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/security&gt;</em></span></p><p><span style="color: #0000ff;"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;statement&gt;</em></span></p><p><span style="color: #0000ff;"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;prepared-statement-cache-size&gt; 32 &lt;/prepared-statement-cache-size&gt;</em></span></p><p><span style="color: #0000ff;"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;share-prepared-statements/&gt;</em></span></p><p><span style="color: #0000ff;"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/statement&gt;</em></span></p><p><span style="color: #0000ff;"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/datasource&gt;</em></span></p><p><span style="color: #0000ff;"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;drivers&gt;</em></span></p><p><span style="color: #0000ff;"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;driver name="postgresql-9.1-901.jdbc4.jar" module="org.postgresql"&gt;</em></span></p><p><span style="color: #0000ff;"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;driver-class&gt; org.postgresql.Driver &lt;/driver-class&gt;</em></span></p><p><span style="color: #0000ff;"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;xa-datasource-class&gt; org.postgresql.xa.PGXADataSource &lt;/xa-datasource-class&gt;</em></span></p><p><span style="color: #0000ff;"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/driver&gt;</em></span></p><p><span style="color: #0000ff;"><em>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/drivers&gt;</em></span></p><p><span style="color: #0000ff;"><em>&lt;/datasources&gt;</em></span></p><p>=====</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Thanks.</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/643777#643777">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in Datasource Configuration at <a href="http://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>