<!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;">
    jboss driver block
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/derekvinyard">Derek Vinyard</a> in <i>Beginner's Corner</i> - <a href="http://community.jboss.org/message/636288#636288">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hi guys,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I am using JBoss 4.0.2 (and am not in a position to upgrade) to run a Java+Hibernate+Struts+SQL Server 2008 application. Originally it was SQL Server 2005 for which I had a driver sqljdbc.jar, after a while a new server for 2008 was added so the driver was also updated to sqljdbc4.jar. Things worked perfectly for years, I could connect to both servers with the new driver without any problem, just the necessary changes in ds.xml. However for a couple of weeks JBoss get's blocked when using the newer driver whatever DB server I try to connect. Since then I have survived using the older driver and only connecting to the 2005 SQL server but I need access to the 2008 server also.</p><p>There are no errors in the logs, here's an excerpt:</p><table><tbody><tr><td style=";">19:48:09.798 INFO&#160; [&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </td><td style=";">org.hibernate.util.NamingHelper] JNDI InitialContext properties:{}</td></tr></tbody></table><p>19:48:09.798 INFO&#160; [&#160; org.hibernate.connection.DatasourceConnectionProvider] Using datasource: java:comp/env/jdbc/t2br6</p><table><tbody><tr><td style=";">19:48:09.798 DEBUG [&#160;&#160; </td><td style=";">org.jboss.resource.connectionmanager.IdleRemover] internalRegisterPool: registering pool with interval 900000 old interval: 9223372036854775807</td></tr><tr><td style=";">19:48:09.798 DEBUG [&#160;&#160; </td><td style=";">org.jboss.resource.connectionmanager.IdleRemover] internalRegisterPool: about to notify thread: old next: 1321120539798, new next: 1321120539798</td></tr></tbody></table><p>19:48:09.798 DEBUG [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Using properties: {user=****, password=--hidden--}</p><p>19:48:09.798 DEBUG [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Checking driver for URL: jdbc:sqlserver://1.1.2.2:1433;DatabaseName=ABC</p><p>19:48:09.798 DEBUG [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Driver already registered for url: jdbc:sqlserver://1.1.2.2:1433;DatabaseName=ABC</p><table><tbody><tr><td style=";">19:55:39.785 DEBUG [&#160;&#160; </td><td style=";">org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000</td></tr><tr><td style=";">20:03:09.742 DEBUG [&#160;&#160; </td><td style=";">org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000</td></tr></tbody></table><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>It just doesn't do anything after the message "Driver already registered". </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The datasource file looks like this:</p><p>&lt;datasources&gt;</p><p>&#160; &lt;local-tx-datasource&gt;</p><p>&#160;&#160;&#160; &lt;jndi-name&gt;t2br6&lt;/jndi-name&gt;</p><p>&#160;&#160;&#160; &lt;connection-url&gt;jdbc:sqlserver://1.1.2.1:1433;DatabaseName=ABC&lt;/connection-url&gt;</p><p>&#160;&#160;&#160; &lt;driver-class&gt;com.microsoft.sqlserver.jdbc.SQLServerDriver&lt;/driver-class&gt;</p><p>&#160;&#160;&#160; &lt;user-name&gt;ABC&lt;/user-name&gt;</p><p>&#160;&#160;&#160; &lt;password&gt;***&lt;/password&gt;</p><p>&#160;&#160;&#160; &lt;min-pool-size&gt;3&lt;/min-pool-size&gt;</p><p>&#160;&#160;&#160; &lt;max-pool-size&gt;10&lt;/max-pool-size&gt;</p><p>&#160;&#160;&#160; &lt;blocking-timeout-millis&gt;30000&lt;/blocking-timeout-millis&gt;</p><p>&#160;&#160;&#160; &lt;idle-timeout-minutes&gt;15&lt;/idle-timeout-minutes&gt;</p><p>&#160;&#160;&#160; &lt;prepared-statement-cache-size&gt;1000&lt;/prepared-statement-cache-size&gt;</p><p>&#160;&#160;&#160; &lt;set-tx-query-timeout/&gt;</p><p>&#160;&#160;&#160; &lt;query-timeout&gt;300&lt;/query-timeout&gt;</p><p>&#160;&#160;&#160; &lt;new-connection-sql&gt;SET ANSI_WARNINGS OFF;SET LOCK_TIMEOUT 60000;SET CONCAT_NULL_YIELDS_NULL OFF;&lt;/new-connection-sql&gt;</p><p>&#160;&#160;&#160; &lt;check-valid-connection-sql&gt;SELECT 'check valid cnn hib'&lt;/check-valid-connection-sql&gt; </p><p>&#160;&#160;&#160; &lt;track-statements&gt;false&lt;/track-statements&gt;&#160;&#160;&#160;&#160; </p><p>&lt;/local-tx-datasource&gt;</p><p>&#160; &lt;no-tx-datasource&gt;</p><p>&#160;&#160;&#160; &lt;jndi-name&gt;t2br6_plain_jdbc&lt;/jndi-name&gt;</p><p>&#160;&#160;&#160; &lt;connection-url&gt;jdbc:sqlserver://1.1.2.2:1433;DatabaseName=ABC&lt;/connection-url&gt;</p><p>&#160;&#160;&#160; &lt;driver-class&gt;com.microsoft.sqlserver.jdbc.SQLServerDriver&lt;/driver-class&gt;</p><p>&#160;&#160;&#160; &lt;user-name&gt;ABC&lt;/user-name&gt;</p><p>&#160;&#160;&#160; &lt;password&gt;***&lt;/password&gt;</p><p>&#160;&#160;&#160; &lt;min-pool-size&gt;3&lt;/min-pool-size&gt;</p><p>&#160;&#160;&#160; &lt;max-pool-size&gt;10&lt;/max-pool-size&gt;</p><p>&#160;&#160;&#160; &lt;blocking-timeout-millis&gt;30000&lt;/blocking-timeout-millis&gt;</p><p>&#160;&#160;&#160; &lt;idle-timeout-minutes&gt;15&lt;/idle-timeout-minutes&gt;</p><p>&#160;&#160;&#160; &lt;prepared-statement-cache-size&gt;1000&lt;/prepared-statement-cache-size&gt;</p><p>&#160;&#160;&#160; &lt;set-tx-query-timeout/&gt;</p><p>&#160;&#160;&#160; &lt;query-timeout&gt;300&lt;/query-timeout&gt;</p><p>&#160;&#160;&#160; &lt;new-connection-sql&gt;SET ANSI_WARNINGS OFF;SET LOCK_TIMEOUT 60000;SET CONCAT_NULL_YIELDS_NULL OFF;&lt;/new-connection-sql&gt;</p><p>&#160;&#160;&#160; &lt;check-valid-connection-sql&gt;SELECT 'check valid cnn jdbc'&lt;/check-valid-connection-sql&gt; </p><p>&#160;&#160;&#160; &lt;track-statements&gt;false&lt;/track-statements&gt;&#160;&#160;&#160;&#160; </p><p>&#160; &lt;/no-tx-datasource&gt;</p><p>&lt;/datasources&gt;.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Since the problem appeared I have a new computer, fresh jboss installation, fresh Eclipse installation, new everything (except maybe the same internal IP). I don't know where and how to look for the problem. I can't think of no change that could cause this problem. Can you help?</p><p>Regards,</p><p>Derek</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/636288#636288">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in Beginner's Corner at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>