ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Butler" <jeffgbut...@gmail.com>
Subject Re: Trying to use iBatis's connection
Date Thu, 10 May 2007 13:24:03 GMT
This error doesn't seem to be related to iBATIS.  See here:

http://www-1.ibm.com/support/docview.wss?uid=swg21208123

Jeff Butler


On 5/9/07, Tom Henricksen <TomH@a-t-g.com> wrote:
>
>  We are adding some non iBatis code and trying to tap in to the iBatis
> connection for some code analysis purposes.  This works when we run our code
> but through builds unit test we get an exception.  Here is some code
> examples:
>
>
>
> Connection connection = mapSession.getCurrentConnection();
>
>
>
> if (connection == null) {
>
>             mapSession.startTransaction();
>
>             startedTransaction = true;
>
> }
>
>
>
>             // SAVE SOME things.
>
>
>
>             if (startedTransaction) {
>
>                                                 connection =
> mapSession.getCurrentConnection();
>
>                                                 connection.commit();
>
>                                     }
>
>
>
>                         } finally {
>
>                                     if (startedTransaction && mapSession
> != null) {
>
>                                                 mapSession.endTransaction
> ();
>
>                                                 mapSession.close();
>
>                                                 mapSession = null;
>
>                                                 connection.close();
>
>                                                 connection = null;
>
>                                     }
>
>                         }
>
>
>
> This is the exceptions we get from our unit tests:
>
>
>
> : com.ibm.db2.jcc.a.SqlException: DB2 SQL error: SQLCODE: -805, SQLSTATE:
> 51002, SQLERRMC: NULLID.SYSLH203 0X5359534C564C3031  at
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback
> (GeneralStatement.java:180)  at
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForList
> (GeneralStatement.java:118)  at
> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(
> SqlMapExecutorDelegate.java:610)
>
>
>
> I realize this is kind of a kludge.  I am guessing this isn't recommended
> use?  Would you suggest getting our own connection outside of iBatis?  Is it
> possible to pull the connection string info (username and password, etc) out
> of the iBatis connection?
>
>
>
> Thanks,
>
> Tom
>
>
>

Mime
View raw message