You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Clinton Begin (JIRA)" <ib...@incubator.apache.org> on 2005/10/03 03:52:48 UTC

[jira] Updated: (IBATIS-165) NPE when using userConnection in SqlMapExecutorDelegate.endTransaction()

     [ http://issues.apache.org/jira/browse/IBATIS-165?page=all ]

Clinton Begin updated IBATIS-165:
---------------------------------

    Issue Type: New Feature  (was: Bug)

> NPE when using userConnection in SqlMapExecutorDelegate.endTransaction()
> ------------------------------------------------------------------------
>
>          Key: IBATIS-165
>          URL: http://issues.apache.org/jira/browse/IBATIS-165
>      Project: iBatis for Java
>         Type: New Feature
>   Components: SQL Maps
>     Versions: 2.1.0
>  Environment: Managed environment - WebSphere 3.5, AIX
>     Reporter: Marc Fleischeuers

>
> I get a NPE in SqlMapExecutorDelegate, when it accesses txManager, see below stacktrace.
> 	at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.endTransaction(SqlMapExecutorDelegate.java:776)
> 	at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.endTransaction(SqlMapSessionImpl.java:141)
> 	at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.endTransaction(SqlMapClientImpl.java:114)
> 	at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.autoEndTransaction(SqlMapExecutorDelegate.java:860)
> 	at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:617)
> 	at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:109)
> 	at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:81)
> txManager is null and it's supposed to be; I'm providing a userConnection and performing transaction management myself. 
> In SqlMapExecutorDelegate.queryForList(...): when I provide a userConnection, trans is set to new UserTransaction() so autoStart is false. This eventually leads to invocation on txManager in endTransaction(), throwing the NPE (there's probably an NPE thrown in startTransaction as well!). I think in the case of a userConnection, txManager should not be called.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira