ssm整合意外报空指针
来源:互联网 发布:2016淘宝助理手机版 编辑:程序博客网 时间:2024/06/07 02:38
### The error may exist in file [E:\Myeclipes\apache-tomcat-7.0.62\webapps\message_test\WEB-INF\classes\com\bawei\mapper\TMessageMapper.xml]
### The error may involve com.bawei.mapper.TMessageMapper.getmsg
### The error occurred while handling results
### SQL: select * from t_user u,t_message m where u.uid = m.u_id
### Cause: java.lang.NullPointerException] with root cause
mapper.xml:
<resultMap id="ms" type="com.bawei.pojo.TMessage">
<id column="mid" jdbcType="INTEGER" property="mid" />
<result column="content" jdbcType="VARCHAR" property="content" />
<result column="createtime" jdbcType="TIMESTAMP" property="createtime" />
<result column="u_id" jdbcType="INTEGER" property="uId" />
<association property="tUser" column="t_user">
<id column="uid" jdbcType="INTEGER" property="uid" />
<result column="uname" jdbcType="VARCHAR" property="uname" />
<result column="upass" jdbcType="VARCHAR" property="upass" />
<result column="ugender" jdbcType="VARCHAR" property="ugender" />
</association>
</resultMap>
<select id="getmsg" parameterType="string" resultMap="ms">
select * from t_user u,t_message m where u.uid = m.u_id
<if test="name!=0">
and u.uname=${name}
</if>
</select>
原因不明
-----------------------------------------------
<association property="tUser" column="t_user"> 其中column 手残写错了 应该是javaType属性
同类问题 可以查找resultMap 是否一一对应
- ssm整合意外报空指针
- hibernate4整合spring一直报空指针
- SSM整合报错
- SSM框架整合报错
- SSM框架项目调用查询的方法时 报空指针异常
- 报空指针
- tomcat报空指针
- RecyclerView 报空指针
- Onmeasure报空指针
- ViewHolder报空指针????
- jsp报空指针
- struts2与spring整合时,报空指针NullPointerException异常的解决
- spring整合struts2时action里的service注入不进来,报空指针异常
- mediaController 报空指针异常 VideoView 关闭报空指针
- ssh 总是报空指针
- spring+dwr 报空指针
- setOnClickListener报空指针异常
- getActionBar()报空指针异常
- 中科爱讯WiFi探针在公共安全管理系统的应用
- Matlab中维度的理解
- Switch与ToggleButton
- jemalloc横向分析(三) arena_run_split_large使用分配的chunk存放tcache
- nexus发布项目与创建工厂
- ssm整合意外报空指针
- HDU 6003 Problem Buyer(贪心)
- 51 nod1286三段子串
- spring中reques的运用
- tensorflow的tf.reduce_mean()函数的使用方法
- mybatis入门基础(五)----动态SQL
- 快速排序
- 笨方法学Python 习题 9: 打印,打印,打印
- 上班遇到的坑