mybits异常总结

开始进行mybatis的异常总结,碰到再进行添加!(仅用于个人学习,欢迎指正,不喜勿喷!)

1、

org.apache.ibatis.builder.IncompleteElementException: Could not find parameter map cn.itcast.ssm.mapper.UserMapper.user

at org.apache.ibatis.builder.MapperBuilderAssistant.setStatementParameterMap(MapperBuilderAssistant.java:319)

at org.apache.ibatis.builder.MapperBuilderAssistant.addMappedStatement(MapperBuilderAssistant.java:283)

at org.apache.ibatis.builder.xml.XMLStatementBuilder.parseStatementNode(XMLStatementBuilder.java:107)

大体意思是说:这是一个不完整元素的异常,重点是后半句,不能找到参数map,一般是咱们配置*Mapper.xml时,错误的将

parameterMap参数写上了!

那解决思路就很明确的了,将配置文件中错误的参数进行更改!

--------------------------------------------------------------------------------------------------------------------------------

2、

org.apache.ibatis.binding.BindingException: Type interface cn.itcast.ssm.mapper.OrderMapper is not known to the MapperRegistry.

at org.apache.ibatis.binding.MapperRegistry.getMapper(MapperRegistry.java:47)

at org.apache.ibatis.session.Configuration.getMapper(Configuration.java:655)

at ,

大体意思:接口不认识mapper的注册表,

    一般是namespace写错了!!!(这样还不行的话,检查web。xml文件加载配置文件的语句正确与否)




你可能感兴趣的:(mybits异常总结)