ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henry Lu <z...@umich.edu>
Subject ibatis 2.3.0 error
Date Fri, 04 Jan 2008 20:11:33 GMT
my maps are:

<resultMap id="selectTraining_grant_roles" 
class="edu.umich.med.umms.mtrain.domain.TrainingGrantRole">
    <result property="trainingGrantRoleCode" column="TG_ROLE_CODE"/>
    <result property="trainingGrantRoleDesc" column="TG_ROLE_DESC"/>
    <result property="percentEffort"          column="PERCENT_EFFORT"/>
    <result property="dateUpdated"              column="DATE_UPDATED"/>
    <result property="uniqnameUpdated"           column="UNIQNAME_UPDATED"/>

    <result property="trainingGrantParticipants" column="TG_ROLE_CODE" 
select="selectTraining_Grant_Participants"/>
</resultMap>

   <!-- selectTraining_Grant_Participants -->
   <resultMap id="selectTraining_Grant_Participants" 
class="edu.umich.med.umms.mtrain.domain.TrainingGrantParticipant">
      <result property="trainingGrantId"             
 column="TRAINING_GRANT_ID" />
      <result property="facultyId"                     
 column="FACULTY_ID" />
      <result property="trainingGrantRoleCode"       
 column="TG_ROLE_CODE" />
      <result property="uniqnameUpdated"             
 column="UNIQNAME_UPDATED" />
      <result property="dateUpdated"                 
 column="DATE_UPDATED"/>
      <result property="percentEffort"               
 column="PERCENT_EFFORT" />
      <result property="trainingGrantParticipantId"  column="TGP_ID" />
   </resultMap>
  
   <!-- ======================================================== -->
   <!-- ======================================================== -->

   <!-- ======================================================== -->
   <!-- ======================================================== -->

   <!-- Select a given Training_grant_roles -->
   <select id="selectTraining_grant_roles" 
resultMap="selectTraining_grant_roles">
      SELECT
         TG_ROLE_CODE,
         TG_ROLE_DESC,
         PERCENT_EFFORT,
         DATE_UPDATED,
         UNIQNAME_UPDATED
      FROM TRAINING_GRANT_ROLES
      WHERE TG_ROLE_CODE=#value#
   </select>

the errors are:

[14:02:01.984] --- Cause: java.lang.NullPointerException; nested 
exception is co
m.ibatis.common.jdbc.exception.NestedSQLException:
[14:02:01.984] --- The error occurred in 
edu/umich/med/umms/mtrain/dao/ibatis_ma
p/training_grant_roles.xml.
[14:02:01.984] --- The error occurred while applying a result map.
[14:02:01.984] --- Check the 
Training_grant_roles.selectTraining_grant_roles.
[14:02:01.984] --- Check the result mapping for the 
'trainingGrantParticipants'
property.
[14:02:01.984] --- Cause: java.lang.NullPointerException
[14:02:01.984] Caused by: 
com.ibatis.common.jdbc.exception.NestedSQLException:

[14:02:01.984] --- The error occurred in 
edu/umich/med/umms/mtrain/dao/ibatis_ma
p/training_grant_roles.xml.
[14:02:01.984] --- The error occurred while applying a result map.
[14:02:01.984] --- Check the 
Training_grant_roles.selectTraining_grant_roles.
[14:02:01.984] --- Check the result mapping for the 
'trainingGrantParticipants'
property.
[14:02:01.984] --- Cause: java.lang.NullPointerException
[14:02:01.984]  at 
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.e
xecuteQueryWithCallback(GeneralStatement.java:188)
[14:02:01.984]  at 
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.e
xecuteQueryForList(GeneralStatement.java:123)
[14:02:01.984]  at 
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryFor
List(SqlMapExecutorDelegate.java:615)
[14:02:01.984]  at 
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryFor
List(SqlMapExecutorDelegate.java:589)
[14:02:01.984]  at 
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(
SqlMapSessionImpl.java:118)
[14:02:01.984]  at 
org.springframework.orm.ibatis.SqlMapClientTemplate$3.doInSql
MapClient(SqlMapClientTemplate.java:269)
[14:02:01.984]  at 
org.springframework.orm.ibatis.SqlMapClientTemplate.execute(S
qlMapClientTemplate.java:194)
[14:02:01.984]  at 
org.springframework.orm.ibatis.SqlMapClientTemplate.executeWi
thListResult(SqlMapClientTemplate.java:220)
[14:02:01.984]  at 
org.springframework.orm.ibatis.SqlMapClientTemplate.queryForL
ist(SqlMapClientTemplate.java:267)
[14:02:01.984]  at 
edu.umich.med.umms.mtrain.dao.sql.TrainingGrantRoleDAOSql.sel
ectTrainingGrantRole(TrainingGrantRoleDAOSql.java:46)

...

Any idea?

-Henry




Mime
View raw message