Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 97699 invoked from network); 24 Apr 2009 16:00:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Apr 2009 16:00:49 -0000 Received: (qmail 26735 invoked by uid 500); 24 Apr 2009 16:00:48 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 26716 invoked by uid 500); 24 Apr 2009 16:00:48 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 26708 invoked by uid 99); 24 Apr 2009 16:00:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Apr 2009 16:00:48 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ashish.kulkarni13@gmail.com designates 209.85.218.177 as permitted sender) Received: from [209.85.218.177] (HELO mail-bw0-f177.google.com) (209.85.218.177) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Apr 2009 16:00:41 +0000 Received: by bwz25 with SMTP id 25so1242287bwz.0 for ; Fri, 24 Apr 2009 09:00:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=NVuXPEIvnyTl0eztUYrB6X12zkviX75Pi34/6UUa660=; b=Jv3eFVipvTc74vGAb/GZmP2sEjRcC76hIwfxmQ7vVRHquncaG9EpshTWwoBjlkLe3V wczkQRo3Qp2nhYzpiOgY7vXY7wBfKhcaWdyYTeop3SR39l/a8z+F8MV0dw0uCZqdPS6Z 5/E/Dy3QqyF/M9gx9qBNFJerp3neXV4Mke8z8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=EZvpKpgeNX5inhf4Muj3JbDvPqQdc2/cteUwHhJcQXwcQpDyeXhYLXNygLbxwLFOeV 11TX0G7mwJgmyyIWzZYnqUgjMyOsusa5hzuYcU5kEYsplKR4kGL+7Da4vTVAs30Hadmv SWrXJOwWrGMebKWL3zdQ9M89CyueEFa4rHmbM= MIME-Version: 1.0 Received: by 10.223.114.74 with SMTP id d10mr809733faq.87.1240588819680; Fri, 24 Apr 2009 09:00:19 -0700 (PDT) In-Reply-To: <535a60b10904240852o69a13d5bh706f5372d3fddc6f@mail.gmail.com> References: <878c6f8e0904240709p1e59242ej8df2aca733bc2d22@mail.gmail.com> <878c6f8e0904240841m4452cd0erfe409fdbacd4d42e@mail.gmail.com> <535a60b10904240852o69a13d5bh706f5372d3fddc6f@mail.gmail.com> Date: Fri, 24 Apr 2009 12:00:19 -0400 Message-ID: <878c6f8e0904240900j519379bam7538984e9f11dd76@mail.gmail.com> Subject: Re: connection link failure issue From: Ashish Kulkarni To: user-java@ibatis.apache.org Content-Type: multipart/alternative; boundary=0016368e2bc9e8cff104684f1788 X-Virus-Checked: Checked by ClamAV on apache.org --0016368e2bc9e8cff104684f1788 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit HiExactly, some thing which will check if the connection is alive, but how to make ibatis do so? On Fri, Apr 24, 2009 at 11:52 AM, Chris O'Connell < oconnell@gorillachicago.com> wrote: > There are certainly wiser minds here, but it sounds like the database is > thinking that the connection has been abandoned (because it hasn't been used > in so long) and so it kills the connection. A new user comes along and > grabs a connection out of the pool. The pool doesn't know that the > connection is dead so it passes it on to the code and you see that error. > At this point, the pool probably realizes that this connection is hosed, so > it creates a new one and so the next call gets the 'good' connection and > everything works. > I would look and see if the pool you are using has some sort of 'ping' that > you could configure. It would do something like select the current system > time or something. This would just let the database know not to kill the > connection in the first place. > > Good luck. > > > On Fri, Apr 24, 2009 at 10:41 AM, Ashish Kulkarni < > ashish.kulkarni13@gmail.com> wrote: > >> HiThere is no SQL error code in log file, and this is all in intranet so >> there is no firewall in between. >> i believe this happens for first transaction in a day, when no one has >> used the application for about 10 hours and starting to use it again >> >> On Fri, Apr 24, 2009 at 10:42 AM, Mario Ds Briggs < >> mario.briggs@in.ibm.com> wrote: >> >>> What's SQL ERROR CODE in the exception. You want to look it up the DB2 >>> on >>> AS400 docs >>> >>> >>> >>> >>> Ashish Kulkarni >>> >> 3@gmail.com> >>> To >>> user-java@ibatis.apache.org >>> 24/04/2009 19:39 cc >>> >>> Subject >>> Please respond to connection link failure issue >>> user-java@ibatis. >>> apache.org >>> >>> >>> >>> >>> >>> >>> >>> >>> Hi >>> I am having some issue with connection dropping, i am using >>> ibatis ibatis-2.3.4.726.jar and creating connection to AS400 using JDBC, >>> but i am seeing these errors in log file, for some reason connection is >>> getting dropped, what may be the reason, the issue is this a high >>> availability system and we cannot let any single transaction fell because >>> of this issue, when we try second time the transaction works, so what >>> should i do, >>> >>> java.sql.SQLException: Communication link failure. (Connection reset) >>> at com.ibm.as400.access.JDError.throwSQLException(JDError.java:528) >>> at >>> >>> com.ibm.as400.access.AS400JDBCConnection.sendAndReceive(AS400JDBCConnection.java:2668) >>> at >>> >>> com.ibm.as400.access.AS400JDBCConnection.sendAndReceive(AS400JDBCConnection.java:2581) >>> at >>> >>> com.ibm.as400.access.JDTransactionManager.rollback(JDTransactionManager.java:440) >>> at >>> >>> com.ibm.as400.access.AS400JDBCConnection.rollback(AS400JDBCConnection.java:2252) >>> at >>> >>> com.ibatis.common.jdbc.SimpleDataSource.popConnection(SimpleDataSource.java:629) >>> at >>> >>> com.ibatis.common.jdbc.SimpleDataSource.getConnection(SimpleDataSource.java:222) >>> at >>> >>> com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48) >>> at >>> >>> com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89) >>> at >>> >>> com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForList(MappedStatement.java:139) >>> at >>> >>> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:567) >>> at >>> >>> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:541) >>> at >>> >>> com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118) >>> at >>> >>> com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:94) >>> >>> >> > > > -- > -- > Chris O'Connell > Application Developer > Gorilla > 312.243.8777 x19 > > --0016368e2bc9e8cff104684f1788 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi
Exactly, some thing which will check if the connection is alive, but= how to make ibatis do so?

On Fri, Apr 24= , 2009 at 11:52 AM, Chris O'Connell <oconnell@gorillachicago.com> wrote:
There are certainly wiser minds here, but i= t sounds like the database is thinking that the connection has been abandon= ed (because it hasn't been used in so long) and so it kills the connect= ion. =A0A new user comes along and grabs a connection out of the pool. =A0T= he pool doesn't know that the connection is dead so it passes it on to = the code and you see that error. =A0At this point, the pool probably realiz= es that this connection is hosed, so it creates a new one and so the next c= all gets the 'good' connection and everything works.

I would look and see if the pool you are using has some sort= of 'ping' that you could configure. =A0It would do something like = select the current system time or something. =A0This would just let the dat= abase know not to kill the connection in the first place.

Good luck.=A0


=
On Fri, Apr 24, 2009 at 10:41 AM, Ashish Kulkarn= i <ashish.kulkarni13@gmail.com> wrote:
Hi
There is no SQL error code in log fil= e, and this is all in intranet so there is no firewall in between.
i believe this happens for first transaction in =A0a day, when no one has u= sed the application for about 10 hours and starting to use it again

On Fri, Apr 24, 2009 at 10:42 AM, Mario Ds B= riggs <mario.briggs@in.ibm.com> wrote:
What's =A0SQL ERROR CODE in the exception. You want to look it up the D= B2 on
AS400 docs




=A0 =A0 =A0 =A0 =A0 =A0 Ashish Kulkarni
=A0 =A0 =A0 =A0 =A0 =A0 <ashish.kulkarni1
=A0 =A0 =A0 =A0 =A0 =A0 3= @gmail.com> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 To
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 user-j= ava@ibatis.apache.org
=A0 =A0 =A0 =A0 =A0 =A0 24/04/2009 19:39 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 cc

=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Subject
=A0 =A0 =A0 =A0 =A0 =A0 Please respond to =A0 =A0 =A0 =A0 connection link = failure issue
=A0 =A0 =A0 =A0 =A0 =A0 user-java@ibatis.
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0apache.org








Hi
I am having some issue with connection dropping, i am using
ibatis=A0ibatis-2.3.4.726.jar and creating connection to AS400 using JDBC,<= br> but i am seeing these errors in log file, for some reason connection is
getting dropped, what may be the reason, the issue is this a high
availability system and we cannot let any single transaction fell because of this issue, when we try second time the transaction works, so what
should i do,

java.sql.SQLException: Communication link failure. (Connection reset)
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:528)
at
com.ibm.as400.access.AS400JDBCConnection.sendAndReceive(AS400JDBCConnection= .java:2668)
at
com.ibm.as400.access.AS400JDBCConnection.sendAndReceive(AS400JDBCConnection= .java:2581)
at
com.ibm.as400.access.JDTransactionManager.rollback(JDTransactionManager.jav= a:440)
at
com.ibm.as400.access.AS400JDBCConnection.rollback(AS400JDBCConnection.java:= 2252)
at
com.ibatis.common.jdbc.SimpleDataSource.popConnection(SimpleDataSource.java= :629)
at
com.ibatis.common.jdbc.SimpleDataSource.getConnection(SimpleDataSource.java= :222)
at
com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransact= ion.java:48)
at
com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(Jdb= cTransaction.java:89)
at
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForL= ist(MappedStatement.java:139)
at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExe= cutorDelegate.java:567)
at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExe= cutorDelegate.java:541)
at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionI= mpl.java:118)
at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImp= l.java:94)





= --
--
Chris O'Connell
Application Developer
Gorilla
31= 2.243.8777 x19


--0016368e2bc9e8cff104684f1788--