JBoss Community

How to fix ERROR [STDERR] (pool-152-thread-1660) com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed. in jboss 6.1

created by Ankit Pandey in Datasource Configuration - View the full discussion

Hi,

 

 

I am connecting SQLServer but sometimes I got

 

 

2013-06-17 12:56:00,068 ERROR [STDERR] (pool-152-thread-1660) com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed.

2013-06-17 12:56:00,070 ERROR [STDERR] (pool-152-thread-1660)           at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:171)

2013-06-17 12:56:00,070 ERROR [STDERR] (pool-152-thread-1660)           at com.microsoft.sqlserver.jdbc.SQLServerConnection.checkClosed(SQLServerConnection.java:319)

2013-06-17 12:56:00,070 ERROR [STDERR] (pool-152-thread-1660)           at com.microsoft.sqlserver.jdbc.SQLServerConnection.prepareStatement(SQLServerConnection.java:1839)

2013-06-17 12:56:00,070 ERROR [STDERR] (pool-152-thread-1660)           at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.doPrepareStatement(BaseWrapperManagedConne..................

 

 

 

 

My Jboss Configuration is

 

 

          <local-tx-datasource>

        <jndi-name>jdbc/abc.008</jndi-name>

        <connection-url>jdbc:sqlserver://ip:2499;databaseName=DB</connection-url>

        <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>

        <user-name>sa</user-name>

        <password>pass</password>

          <autoReconnect>true</autoReconnect>

        <failOverReadOnly>false</failOverReadOnly>

        <maxReconnects>50</maxReconnects>

        <initialTimeout>15</initialTimeout>

          <check-valid-connection-sql>select 1 </check-valid-connection-sql>          

    </local-tx-datasource>

 

 

I have to restart JBoss for getting working connection again which is not the real possible solution obviously. I want to avoid this Jboss restart everytime..

It's very urgent...

Please Help...

Reply to this message by going to Community

Start a new discussion in Datasource Configuration at Community