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. 2015.2.27 UltraEdit中显示XML结构

    1选择菜单项 "视图"->"显示方式(着色文件类型)"->"XML": 2选择菜单项 "格式"->&q ...

  2. 如何设置linux在出现kernel panic后自动重启 (ZT)

    Automatic reboot after Linux kernel panic http://www.syn-ack.org/centos-linux/automatic-reboot-after ...

  3. CSS3 高级属性

    尽管现代浏览器已经支持了众多的CSS3属性,但是大部分设计师和开发人员貌似依然在关注于一些很“主流”的属性,如border-radius.box-shadow或者transform等.它们有良好的文档 ...

  4. Git实用技巧

    1.关于版本控制系统 (1)本地版本控制系统 (2)集中化的版本控制系统 (3)分布式版本控制系统 2.Git的三种状态 对于任何一个文件,在 Git 内都只有三种状态: 已提交(committed) ...

  5. Qt creator 使用qwt

    .pro中添加 LIBS += -L”C:\Qt\Qt5.3.2\5.3\msvc2013_opengl\lib” -lqwt INCLUDEPATH += "C:\Qt\Qt5.3.2\5 ...

  6. c#.net常用字符串函数 字符串常用方法 string

    RegionsStr = RegionsStr.Remove(RegionsStr.LastIndexOf(","), 1);   //去掉最后一个逗号 string html = ...

  7. Python之tuple的创建以及使用

    tuple又是一种有序列表,它与list只有两种不同:1.创建后不能更改.2.创建时得用() 在使用tuple的时候我们需要进行那个添加一个“,” 如果不加的话就是一个整数. 但是tuple作为一个不 ...

  8. WINFORM 无边框窗体 阴影与移动

    //窗体移动API[DllImport("user32.dll")]public static extern bool ReleaseCapture();[DllImport(&q ...

  9. CF 671D Roads in Yusland

    弄完之后点进去一看,竟然是div1的D题……最近真是天天被题虐哭 推荐这一篇博客 https://www.cnblogs.com/Sakits/p/8085598.html 感觉讲清楚了,也是基本照着 ...

  10. Linux之tcpdump使用详解

    1.1  三种关键字 关于类型的关键字 第一种是关于类型的关键字,主要包括host,net,port, 例如 host 210.27.48.2,指明 210.27.48.2是一台主机,net 202. ...