MS SQL Server 2000 connection reset problem

2005-03-17 Thread Brent Ryan
Title: Message



I'm using Ibatis 2 
with a web app and I get the following error after connecting to the data source 
and then letting it sit for 2 minutes and then retrying my web 
applicaiton.

ERROR:2005-03-17 
10:35:57,379 - Failed to queryForList - id [getUsers], parameterObject 
[null]. Cause: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver 
for JDBC]Connection reset by peer: socket write error

Here's my sql map 
config:

 
transactionManager type="JDBC" 
dataSource type="DBCP" 
property name="JDBC.Driver" 
value="${driver}"/ 
property name="JDBC.ConnectionURL" 
value="${url}"/ property 
name="JDBC.Username" 
value="${username}"/ 
property name="JDBC.Password" 
value="${password}"/ 
property name="JDBC.DefaultAutoCommit" 
value="true"/ property 
name="Pool.MaximumActiveConnections" 
value="20"/ property 
name="Pool.MaximumIdleConnections" 
value="5"/ property 
name="Pool.MaximumWait" 
value="12"/ property 
name="Pool.TimeToWait" 
value="500"/ property 
name="Pool.PingQuery" value="select 1 from 
BBEXTRACT.USERS"/ property 
name="Pool.PingEnabled" 
value="true"/ property 
name="Pool.PingConnectionsOlderThan" 
value="1"/ property 
name="Pool.PingConnectionsNotUsedFor" value="1"/ 
/dataSource 
/transactionManager


Thanks,


Brent 
Ryan
Don't miss the 2005 Blackboard Users Conference April 12-14 in Baltimore, MD! Visit http://www.blackboard.com/about/events/BbUC05/index.htm for more information.
This e-mail is intended only for the personal and confidential use of the recipient(s) named above. It may include Blackboard confidential and proprietary information, and is not for redistribution.


Re: MS SQL Server 2000 connection reset problem

2005-03-17 Thread Abdullah Kauchali
Some guesses:
*  If you are using transactions, make sure you are commiting/rolling 
back the transactions.
*  Perhaps connection pool is not working and the number of server 
connection hits maximum:  check sql server connection property, set 
Maximum Allowable Connection to zero (0) = no maximum.
*  Do sp_who on the server to see number of concurrent connections
*  Do netstat -n to see live TCP/IP connection on the client (many 
connections for a single user is telltale sign of leaky connection objects)

HTH,
Abdullah
Brent Ryan wrote:
 Message I'm using Ibatis 2 with a web app and I get the following
 error after connecting to the data source and then letting it sit for
 2 minutes and then retrying my web applicaiton.
 ERROR:2005-03-17 10:35:57,379 - Failed to queryForList - id
 [getUsers], parameterObject [null]. Cause: java.sql.SQLException:
 [Microsoft][SQLServer 2000 Driver for JDBC]Connection reset by peer:
 socket write error
 Here's my sql map config:
 transactionManager type=JDBC dataSource type=DBCP property
 name=JDBC.Driver value=${driver}/ property
 name=JDBC.ConnectionURL value=${url}/ property
 name=JDBC.Username value=${username}/ property
 name=JDBC.Password value=${password}/ property
 name=JDBC.DefaultAutoCommit value=true/ property
 name=Pool.MaximumActiveConnections value=20/ property
 name=Pool.MaximumIdleConnections value=5/ property
 name=Pool.MaximumWait value=12/ property
 name=Pool.TimeToWait value=500/ property name=Pool.PingQuery
 value=select 1 from BBEXTRACT.USERS/ property
 name=Pool.PingEnabled value=true/ property
 name=Pool.PingConnectionsOlderThan value=1/ property
 name=Pool.PingConnectionsNotUsedFor value=1/ /dataSource
 /transactionManager
 Thanks, !-- A.psl { TEXT-DECORATION: none; COLOR: #4e81c4;
 FONT-FAMILY: Verdana,Arial,fixed } A:hover { TEXT-DECORATION:
 underline } A.psl:hover { COLOR: #99 } .noro { FONT-SIZE: 8pt;
 COLOR: #4e81c4; FONT-FAMILY: Verdana,Arial,fixed } .logotext {
 TEXT-DECORATION:none; FONT-SIZE: 10pt; FONT-FAMILY:
 Verdana,Arial,fixed } A.brand { COLOR: #77; FONT-SIZE: 7pt;
 FONT-FAMILY: Verdana,Arial,fixed; TEXT-DECORATION: none } -- Brent
 Ryan
 *Don't miss the 2005 Blackboard Users Conference April 12-14 in
 Baltimore, MD! Visit
 **http://www.blackboard.com/about/events/BbUC05/index.htm** for more
 information.*
 This e-mail is intended only for the personal and confidential use of
 the recipient(s) named above. It may include Blackboard confidential
 and proprietary information, and is not for redistribution.



Re: MS SQL Server 2000 connection reset problem

2005-03-17 Thread Abdullah Kauchali
Brent Ryan wrote:
For some reason the datasource isn't running the ping command to check
the connections.  They seem to be timing out. Is there a setting in SQL
Server that causes connections to timeout?
What version of SQL Server are you using?


Re: MS SQL Server 2000 connection reset problem

2005-03-17 Thread Abdullah Kauchali

Brent Ryan wrote:
* The commiting/rolling back is handled by the datasource automatically.
* The max allowable connection is set to 0
* netstat -n on client and server show 3 connections established.
If I set this property to 0 then it works, but then this means there is
nothing in the pool. Right?
property name=Pool.MaximumIdleConnections value=0/
Also, can you post the SQL statement?


Re: MS SQL Server 2000 connection reset problem

2005-03-17 Thread Abdullah Kauchali
Hi Brent,
I think your best bet would be to talk to the folks at the JDBC forum on 
the Microsoft newsgroups.  I've had a terrible week with SQL Server too. :)

Sorry I couldn't be of further help,
Abdullah
Brent Ryan wrote:
 I'm running SQL Server 2000 8.00.760. The connection reset problem
 happens for any sql statement, but the ones that I'm testing are:
 select id=getUsers resultMap=userResult select * from
 BBEXTRACT.USERS /select
 select id=getRoles resultMap=roleResult select * from
 BBEXTRACT.ROLES /select
 I never had this problem when connection to a Oracle DB. This only
 happens when connecting to MS SQL Server.
  Brent Ryan

 -Original Message- From: Abdullah Kauchali
 [mailto:[EMAIL PROTECTED] Sent: Thursday, March 17, 2005
 11:22 AM To: ibatis-user-java@incubator.apache.org Subject: Re: MS
 SQL Server 2000 connection reset problem

 Brent Ryan wrote:
 * The commiting/rolling back is handled by the datasource
 automatically.

 * The max allowable connection is set to 0 * netstat -n on client
 and server show 3 connections established.

 If I set this property to 0 then it works, but then this means
 there is
 nothing in the pool. Right? property
 name=Pool.MaximumIdleConnections value=0/

 Also, can you post the SQL statement?
 Don't miss the 2005 Blackboard Users Conference April 12-14 in
 Baltimore, MD! Visit
 http://www.blackboard.com/about/events/BbUC05/index.htm for more
 information.
 This e-mail is intended only for the personal and confidential use of
 the recipient(s) named above. It may include Blackboard confidential
 and proprietary information, and is not for redistribution.