[jboss-user] [Beginner's Corner] - jboss driver block

Derek Vinyard do-not-reply at jboss.com
Sat Nov 12 14:33:36 EST 2011


Derek Vinyard [http://community.jboss.org/people/derekvinyard] created the discussion

"jboss driver block"

To view the discussion, visit: http://community.jboss.org/message/636288#636288

--------------------------------------------------------------
Hi guys,

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.
There are no errors in the logs, here's an excerpt:
| 19:48:09.798 INFO  [                     | org.hibernate.util.NamingHelper] JNDI InitialContext properties:{} |
19:48:09.798 INFO  [  org.hibernate.connection.DatasourceConnectionProvider] Using datasource: java:comp/env/jdbc/t2br6
| 19:48:09.798 DEBUG [    | org.jboss.resource.connectionmanager.IdleRemover] internalRegisterPool: registering pool with interval 900000 old interval: 9223372036854775807 |
| 19:48:09.798 DEBUG [    | org.jboss.resource.connectionmanager.IdleRemover] internalRegisterPool: about to notify thread: old next: 1321120539798, new next: 1321120539798 |
19:48:09.798 DEBUG [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Using properties: {user=****, password=--hidden--}
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
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
| 19:55:39.785 DEBUG [    | org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000 |
| 20:03:09.742 DEBUG [    | org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000 |

It just doesn't do anything after the message "Driver already registered". 

The datasource file looks like this:
<datasources>
  <local-tx-datasource>
    <jndi-name>t2br6</jndi-name>
    <connection-url>jdbc:sqlserver://1.1.2.1:1433;DatabaseName=ABC</connection-url>
    <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
    <user-name>ABC</user-name>
    <password>***</password>
    <min-pool-size>3</min-pool-size>
    <max-pool-size>10</max-pool-size>
    <blocking-timeout-millis>30000</blocking-timeout-millis>
    <idle-timeout-minutes>15</idle-timeout-minutes>
    <prepared-statement-cache-size>1000</prepared-statement-cache-size>
    <set-tx-query-timeout/>
    <query-timeout>300</query-timeout>
    <new-connection-sql>SET ANSI_WARNINGS OFF;SET LOCK_TIMEOUT 60000;SET CONCAT_NULL_YIELDS_NULL OFF;</new-connection-sql>
    <check-valid-connection-sql>SELECT 'check valid cnn hib'</check-valid-connection-sql> 
    <track-statements>false</track-statements>     
</local-tx-datasource>
  <no-tx-datasource>
    <jndi-name>t2br6_plain_jdbc</jndi-name>
    <connection-url>jdbc:sqlserver://1.1.2.2:1433;DatabaseName=ABC</connection-url>
    <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
    <user-name>ABC</user-name>
    <password>***</password>
    <min-pool-size>3</min-pool-size>
    <max-pool-size>10</max-pool-size>
    <blocking-timeout-millis>30000</blocking-timeout-millis>
    <idle-timeout-minutes>15</idle-timeout-minutes>
    <prepared-statement-cache-size>1000</prepared-statement-cache-size>
    <set-tx-query-timeout/>
    <query-timeout>300</query-timeout>
    <new-connection-sql>SET ANSI_WARNINGS OFF;SET LOCK_TIMEOUT 60000;SET CONCAT_NULL_YIELDS_NULL OFF;</new-connection-sql>
    <check-valid-connection-sql>SELECT 'check valid cnn jdbc'</check-valid-connection-sql> 
    <track-statements>false</track-statements>     
  </no-tx-datasource>
</datasources>.

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?
Regards,
Derek
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/636288#636288]

Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20111112/30be57f8/attachment.html 


More information about the jboss-user mailing list