ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 郑王力 <zwan...@gmail.com>
Subject question: complex query
Date Tue, 01 Feb 2005 06:32:31 GMT
hi:

    I am developing projects using spring 1.1.3 + iBATIS 2.0.9. All is ok, but complex query.
code just like:


  <resultMap id="roleMap" class="roleVO">
     <result property="id" column="ROLEID" />
     <result property="roleName" column="ROLENAME" />
     <result property="menus" column="ROLEID" select="queryMenuByRoleId"/>
  </resultMap>

 error:
java.lang.NullPointerException
 com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.endTransaction(SqlMapExecutorDelegate.java:776)
 com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.endTransaction(SqlMapSessionImpl.java:141)
 com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.endTransaction(SqlMapClientImpl.java:114)
 com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.autoEndTransaction(SqlMapExecutorDelegate.java:860)
 com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:617)
 com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:584)

 
I think that it is because I don't set transactionManager in sqlmap-config.xml, because I
control transcation in spring framework.

I try to add <transactionManager type="EXTERNAL" /> in sqlmap-config.xml, but the transactionManager
element must have the datasource element. 

Why should I do?
Mime
View raw message