为了账号安全,请及时绑定邮箱和手机立即绑定

报错求解决MYbaits

报错求解决MYbaits

### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'Messageresult'.  Cause: java.lang.ClassNotFoundException: Cannot find class: Messageresult at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26) at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:54) at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:38) at com.gjh.db.DbAcess.getSqlSession(DbAcess.java:19) at com.gjh.dao.MessageDao.queryMessageList(MessageDao.java:21) at com.gjh.service.ListService.queryMessageList(ListService.java:11) at com.gjh.servlet.ListServlet.doGet(ListServlet.java:31) at com.gjh.servlet.ListServlet.doPost(ListServlet.java:39) at javax.servlet.http.HttpServlet.service(HttpServlet.java:646) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE mapper    PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"    "http://mybatis.org/dtd/mybatis-3-mapper.dtd"><mapper namespace="Message">  <resultMap type="com.gjh.bean.Message" id="Messageresult">    <id column="id" jdbcType="INTEGER" property="id"/>    <result column="command" jdbcType="VARCHAR" property="command"/>    <result column="description" jdbcType="VARCHAR" property="description"/>    <result column="content" jdbcType="VARCHAR" property="content"/>  </resultMap>    <select id="queryMessage" parameterType="com.gjh.bean.Message" resultType="Messageresult" >    SELECT  id,  command, description, content FROM message  <where>    <if test="command != null and !&quot;&quot;.equals(command.trim())">     and command=#{command}    </if>    <if test="description != null and !&quot;&quot;.equals(description.trim())">     and description like '%' #{description} '%'    </if>    </where>  </select></mapper>
查看完整描述

3 回答

?
qq_画个圈圈诅咒你_03164602

TA贡献1条经验 获得超0个赞

发现错误了,resultmap弄成resultype了

查看完整回答
反对 回复 2016-12-30
?
慕瓜4807886

TA贡献25条经验 获得超9个赞

不就是报Could not resolve type alias 'Messageresult'.  Cause: java.lang.ClassNotFoundException: Cannot find class: Messageresult找不到类嘛,仔细检查一下名字和路径

查看完整回答
反对 回复 2016-12-29
  • 3 回答
  • 0 关注
  • 3956 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信