HTTP Status 500 - org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:

type Exception report

message org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:

description The server encountered an internal error that prevented it from fulfilling this request.

exception

java.lang.RuntimeException: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.lang.reflect.UndeclaredThrowableException
### The error may exist in class path resource [mybatis/mapper/SysTradeTradeMapper.xml]
### The error may involve com.zito.b2c.order.mapper.SysTradeTradeMapper.getOperatingSituation-Inline
### The error occurred while setting parameters
### Cause: java.lang.reflect.UndeclaredThrowableException
### Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String

通过查看错误信息,可以发现"The error occurred while setting parameters",错误是参数传入的时候出的错。
Mapper接口方法如下:
public Map<String,String> queryOrder(@Param("shopId") int shopId, @Param("shopName") String shopName);
Mapper.xml中方法的配置:
<select id="queryOrder" parameterType="String" resultType="java.util.Map">

</select>
因为传入的参数既有Sting又有int,而我们在xml中配置的传入参数类型只有Sting,所以会报传入参数类型不匹配。
再由对个参数传入,并且传入参数的类型不一致时,可以去掉 parameterType

HTTP Status 500 - org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:的更多相关文章

  1. 错误信息: Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:

    这个错误主要原因是:数据库的配置出问题,比如写错库名什么的,仔细检查下.

  2. org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 3报错解决

    报错的原因翻译出来: 预期的一个结果(或null)返回selectOne(),但发现:3 意思就是你想得到一个结果值,但是返回了三个结果值. 一般可能测试的时候我们存了几条一样的数据,在登录时,会把同 ...

  3. SpringMvc错误:HTTP Status 500 - Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is n

    HTTP Status 500 - Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemExc ...

  4. 【异常及源码分析】org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping

    一.异常出现的场景 1)异常出现的SQL @Select("SELECT\n" + " id,discount_type ,min_charge, ${cardFee} ...

  5. org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'username' not found. Available parameters are [1, 0, param1, param2]

    Spring+mybatis错误:org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.bi ...

  6. 解决:org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression 'requestMap.maintenancename != null and requestMap.maintenance

    异常如下:org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.Builde ...

  7. 怪事年年有,今天特别多!org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'empno' not found. Available parameters are [emp, deptno, param1, param

    错误: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.Binding ...

  8. org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'userId' not found. Available parameters are [arg1, arg0, param1, param2]

    2018-06-27 16:43:45.552  INFO 16932 --- [nio-8081-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : ...

  9. org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'socialCode' in 'class java.lang.String'

    异常: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.Refl ...

随机推荐

  1. 2010.1.1 CLR 无法从 COM 上下文

    今天做一个程序,sql操作,但是记录数太多,而且sql语句有复杂,就报了这样的错误: CLR 无法从 COM 上下文 0x645e18 转换为 COM 上下文 0x645f88,这种状态已持续 60 ...

  2. 从一个简单的小实例分析JSP+Servelt与JSP+Struts2框架的区别

    最近在学struts2,struts2相比以前的JSP+Servlet,在处理流程上的更简单,我们就一个小实例来具体分析一下. 实例内容如下: 实现一个简单的注册页面包括:用户名.密码.重复密码.年龄 ...

  3. dubbo错误排查之No provider available for the service

    今天搞的一个dubbo服务,暴漏出来了,但是consumer端启动就报这个错,排查过程记录一下 一.启动zkCli 利用命令查看 ls / ls /dubbo 继续查看 ls /dubbo/com.w ...

  4. resin容器更改JDK

    更改resin的jdk版本,找到resin的配置文件:Resin\contrib\init.resin文件,找到 JAVA_HOME=@JAVA_HOME@ RESIN_HOME=@resin_hom ...

  5. solr-用mmseg4j配置同义词索引和检索(IKanlyzer需要修改源码适应solr接口才能使用同义词功能)

    概念说明:同义词大体的意思是指,当用户输入一个词时,solr会把相关有相同意思的近义词的或同义词的term的语段内容从索引中取出,展示给用户,提高交互的友好性(当然这些同义词的定义是要在配置文件中事先 ...

  6. IntelliJ+AntBuild+Tomcat实现Maven站点的热部署

    这段时间要研究WebGL技术,做一下三维建模项目,涉及到较多的前端编码.eclipse编译器那令人着急的编码提示功能,以及丑恶的界面对项目的开展造成了一定的阻碍.为解决这个问题,转向IntelliJ ...

  7. (数组)对数组中的数字加1(plus one)

    题目:https://www.nowcoder.com/practice/4d135ddb2e8649ddb59ee7ac079aa882?tpId=46&tqId=29111&tPa ...

  8. 终极解决傻X阿里钱盾新手开店及老卖家复核身份证照片模糊无法对焦问题

    我小米3阿里钱盾认证拍照无法对焦,后来咨询客服,客服让买新的或借朋友的.然后百度了一下发现模糊现象不是个例,好多比较新的小米5,华为手机什么的也都模糊.真是幸庆,,差点就被客服带坑里去买新手机了. 然 ...

  9. Altium Designer 3D模型的下载与添加

    先 先晒几个图:是不是很逼真啊..  ---------------------------------------教程---------------------------------------- ...

  10. ListView 动态生成 Header

    //取得结果集 DataTable dt = ub.GetUser().Tables[0]; //清空原本的内容 listView1.Items.Clear(); //通过DataTable 得到当前 ...