You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Ashish Kulkarni <as...@gmail.com> on 2009/04/24 16:09:38 UTC

connection link failure issue

HiI 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)

Re: connection link failure issue

Posted by Chris O'Connell <oc...@gorillachicago.com>.
Is there a firewall between the application server and the database server?

On Fri, Apr 24, 2009 at 9:09 AM, Ashish Kulkarni <
ashish.kulkarni13@gmail.com> wrote:

> HiI 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

Re: connection link failure issue

Posted by Larry Meadors <la...@gmail.com>.
Use a "ping query" (google and/or the user guide will tell you all you
need to know). ;-)

Larry

Re: connection link failure issue

Posted by Ashish Kulkarni <as...@gmail.com>.
HiSo if i add the following to the SimpleDataSource properties will it work,
will Ping Connections older then 30 minutes,  or connections not used for 30
minutes and then recreate them if required or have issue?

<property name="Pool.PingEnabled" value="TRUE"/>

<property name="Pool.PingConnectionsOlderThan" value="300000"/>

<property name="Pool.PingConnectionsNotUsedFor" value="300000"/>


On Mon, Apr 27, 2009 at 3:43 PM, Chris O'Connell <
oconnell@gorillachicago.com> wrote:

> Configuring your 'ping' query will be specific to whatever database
> connection pool you are using.  See if there is some documentation you can
> find for your pool.  In general, what this will do is just have the pool
> execute some very simple query at some configurable time.  This shouldn't
> execute every time a user needs a connection from the pool.  Instead, this
> should execute every 15 minutes or 30 minutes (or whatever).  Basically, you
> are executing these queries every so often so that the systems around you
> are reminded that these connections are active and shouldn't be closed.
>
>
> On Mon, Apr 27, 2009 at 2:39 PM, Ashish Kulkarni <
> ashish.kulkarni13@gmail.com> wrote:
>
>> HiHow does the performance get affected if i add a ping query, or what is
>> the best way to do it
>>
>> On Fri, Apr 24, 2009 at 1:10 PM, Chema <de...@gmail.com> wrote:
>>
>>> Logs show that he's using a SimpleDataSource , so I guess, the
>>> connection pool is implemented by iBatis
>>>
>>> I bet for a "firewall issue". Some is resetting the connection.
>>> (Connection reset)
>>>
>>>
>>>
>>> 2009/4/24 Chris O'Connell <oc...@gorillachicago.com>:
>>> > I think the issue is within the database pool you are using, with is an
>>> > entity separate from iBatis.
>>>
>>
>>
>
>
> --
> --
> Chris O'Connell
> Application Developer
> Gorilla
> 312.243.8777 x19
>
>

Re: connection link failure issue

Posted by Chris O'Connell <oc...@gorillachicago.com>.
Configuring your 'ping' query will be specific to whatever database
connection pool you are using.  See if there is some documentation you can
find for your pool.  In general, what this will do is just have the pool
execute some very simple query at some configurable time.  This shouldn't
execute every time a user needs a connection from the pool.  Instead, this
should execute every 15 minutes or 30 minutes (or whatever).  Basically, you
are executing these queries every so often so that the systems around you
are reminded that these connections are active and shouldn't be closed.

On Mon, Apr 27, 2009 at 2:39 PM, Ashish Kulkarni <
ashish.kulkarni13@gmail.com> wrote:

> HiHow does the performance get affected if i add a ping query, or what is
> the best way to do it
>
> On Fri, Apr 24, 2009 at 1:10 PM, Chema <de...@gmail.com> wrote:
>
>> Logs show that he's using a SimpleDataSource , so I guess, the
>> connection pool is implemented by iBatis
>>
>> I bet for a "firewall issue". Some is resetting the connection.
>> (Connection reset)
>>
>>
>>
>> 2009/4/24 Chris O'Connell <oc...@gorillachicago.com>:
>> > I think the issue is within the database pool you are using, with is an
>> > entity separate from iBatis.
>>
>
>


-- 
-- 
Chris O'Connell
Application Developer
Gorilla
312.243.8777 x19

Re: connection link failure issue

Posted by Ashish Kulkarni <as...@gmail.com>.
HiHow does the performance get affected if i add a ping query, or what is
the best way to do it

On Fri, Apr 24, 2009 at 1:10 PM, Chema <de...@gmail.com> wrote:

> Logs show that he's using a SimpleDataSource , so I guess, the
> connection pool is implemented by iBatis
>
> I bet for a "firewall issue". Some is resetting the connection.
> (Connection reset)
>
>
>
> 2009/4/24 Chris O'Connell <oc...@gorillachicago.com>:
> > I think the issue is within the database pool you are using, with is an
> > entity separate from iBatis.
>

Re: connection link failure issue

Posted by Chema <de...@gmail.com>.
Logs show that he's using a SimpleDataSource , so I guess, the
connection pool is implemented by iBatis

I bet for a "firewall issue". Some is resetting the connection.
(Connection reset)



2009/4/24 Chris O'Connell <oc...@gorillachicago.com>:
> I think the issue is within the database pool you are using, with is an
> entity separate from iBatis.

Re: connection link failure issue

Posted by Chris O'Connell <oc...@gorillachicago.com>.
I think the issue is within the database pool you are using, with is an
entity separate from iBatis.

On Fri, Apr 24, 2009 at 11:00 AM, Ashish Kulkarni <
ashish.kulkarni13@gmail.com> wrote:

> 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
>>>>             <ashish.kulkarni1
>>>>             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
>>
>>
>


-- 
-- 
Chris O'Connell
Application Developer
Gorilla
312.243.8777 x19

Re: connection link failure issue

Posted by Ashish Kulkarni <as...@gmail.com>.
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
>>>             <ashish.kulkarni1
>>>             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
>
>

Re: connection link failure issue

Posted by Chris O'Connell <oc...@gorillachicago.com>.
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
>>             <ashish.kulkarni1
>>             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

Re: connection link failure issue

Posted by Ashish Kulkarni <as...@gmail.com>.
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
<ma...@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
>             <ashish.kulkarni1
>             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)
>
>

Re: connection link failure issue

Posted by Mario Ds Briggs <ma...@in.ibm.com>.
What's  SQL ERROR CODE in the exception. You want to look it up the DB2 on
AS400 docs



                                                                           
             Ashish Kulkarni                                               
             <ashish.kulkarni1                                             
             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)