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

原文地址:https://www.cnblogs.com/xiufengchen/p/10349873.html

时间: 2024-08-25 11:01:58

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

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

这个错误主要原因是:数据库的配置出问题,比如写错库名什么的,仔细检查下. 原文地址:https://www.cnblogs.com/chaoqi/p/10727167.html

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.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'ItemsCustom' in 'class com.mybati

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping...

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='createTime', mode=IN, javaType=class java.util.Date, jdbcType=null, numericScale=nul

【异常及源码分析】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} AS actualDiscountPrice , discount_price AS discountPrice ,status ,name \n" + "FROM\n" + "\tuser_coupon \n" + "WHERE\n" +

Mybatis缓存报错org.apache.ibatis.exceptions.PersistenceException

错误信息如下: org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.apache.ibatis.cache.CacheException: Error deserializing object. Cause: java.lang.ClassNotFoundException: com.kytsoft.model.Adminlink ### Cause: org.apa

[springMVC - 1A] - Request processing failed; nested exception is org.apache.ibatis.builder.IncompleteElementException

一月 14, 2016 1:30:07 下午 org.apache.catalina.core.StandardWrapperValve invoke严重: Servlet.service() for servlet [springMVC] in context with path [/ExceptionManageSystem] threw exception [Request processing failed; nested exception is org.apache.ibatis.b

Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):

原因是mybatis的mapper.xml文件没有在输出资源中 原文地址:https://www.cnblogs.com/gqzdev/p/12322499.html

Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException:

七月 17, 2014 4:56:01 下午 org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet [dispatcher] in context with path [] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemExc

springboot+mybatis 的org.mybatis.spring.MyBatisSystemException 解决方法

"nested exception is org.apache.ibatis.exceptions.PersistenceException: \r\n### Error querying database.  Cause: java.lang.UnsupportedOperationException\r\n### The error may exist in com/hiteamtech/uws/dao/AppsDao.java (best guess)\r\n### The error m