There is no READABLE property named 'userName' in class 'java.lang.String'

iBatis做模糊查询时,报如下错误,不知道各位有没遇到过?如何处理?

错误:
com.ibatis.common.beans.ProbeException: There is no READABLE property named 'userName' in class 'java.lang.String'
at com.ibatis.common.beans.ClassInfo.getGetter(ClassInfo.java:259)
at com.ibatis.common.beans.ComplexBeanProbe.getProperty(ComplexBeanProbe.java:304)
at com.ibatis.common.beans.ComplexBeanProbe.getObject(ComplexBeanProbe.java:199)
at com.ibatis.common.beans.GenericProbe.getObject(GenericProbe.java:74)

SQL为:
  <!-- 用户名模糊查询 -->
    <select id="getUserByName" resultMap="UserResult" parameterClass="String" resultClass="List" cacheModel="user-cache">
           select A.userId,
           A.userName,
           A.companyId,
           A.userBH,
           A.userPassword,
           A.userFunction,
           B.companyName,
           A.createUser,
           A.createDate,
           A.updateUser,
           A.updateDate
    from userTable A left outer join company B on A.companyId=B.companyId
       <dynamic prepend="where">
            <isNotEmpty prepend="and" property="userName">
                userName like '%$userName$%'
            </isNotEmpty>
        </dynamic>
    </select>

你可能感兴趣的:(sql,ibatis)