ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Floehr" <Eric.Flo...@3x.com>
Subject Connection is invalid help
Date Thu, 19 Feb 2009 20:39:39 GMT
Hi,

 

I am running into somewhat random "Connection is invalid" issues on
update statements and I am wondering if anyone could point me in the
right direction.  I am definitely using the try/catch/finally pattern
properly in all my transacted statements, so I know it's not that.

 

No single query is immune, and most of the time most queries execute
normally.  It doesn't matter if it is an explicit transaction or a
simple SQLMapClient.update("...").  It seems to happen more frequently
for longer running statements, but that could just be because they have
more time to become invalid.

 

We have numerous instances and it doesn't happen on all.  It seems to
prefer the more heavily loaded/used instances.

 

Any help on determining root cause, or how to avoid/correct would be
much appreciated.  The specific exception is always:

 

java.lang.RuntimeException: Error accessing SimplePooledConnection.
Connection is invalid.

                at
com.ibatis.common.jdbc.SimpleDataSource$SimplePooledConnection.getValidC
onnection(SimpleDataSource.java:913)

                at
com.ibatis.common.jdbc.SimpleDataSource$SimplePooledConnection.invoke(Si
mpleDataSource.java:958)

                at $Proxy0.rollback(Unknown Source)

                at
com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.rollback(JdbcT
ransaction.java:72)

                at
com.ibatis.sqlmap.engine.transaction.TransactionManager.end(TransactionM
anager.java:87)

                at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.endTransaction(SqlM
apExecutorDelegate.java:724)

                at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.endTransaction(SqlMapSes
sionImpl.java:176)

                at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.endTransaction(SqlMapClie
ntImpl.java:153)

                at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.autoEndTransaction(
SqlMapExecutorDelegate.java:825)

                at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecut
orDelegate.java:454)

                at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.update(SqlMapSessionImpl
.java:90)

                at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.update(SqlMapSessionImpl
.java:94)

                at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.update(SqlMapClientImpl.j
ava:70)

 

 

Thanks!

Eric

 


Mime
View raw message