A query was run and no Result Maps were found
2016-10-09 21:40
435 查看
使用mybatis时出现异常问题:
有如下的错误
Error querying database. Cause: org.apache.ibatis.executor.ExecutorException: A query was run and no Result Maps were found for the Mapped Statement
(后面内容省略)
网上说是oracle不允许插入空值。
但是我没有进行插入操作的,只是进行了查询。
后来看看mybatis的配置文件,漏了一项:resultType属性值
原来的配置是:<select id="countSiteInv" parameterType="Map">
修改之后的配置<select id="countSiteInv" resultType="CamelCaseKeyMap" parameterType="Map">
mybatis中不管什么查询,都必须返回resultType或者resultMap的值,否则就会报错的。
使用mybatis时出现异常问题:
有如下的错误
Error querying database. Cause: org.apache.ibatis.executor.ExecutorException: A query was run and no Result Maps were found for the Mapped Statement
(后面内容省略)
网上说是oracle不允许插入空值。
但是我没有进行插入操作的,只是进行了查询。
后来看看mybatis的配置文件,漏了一项:resultType属性值
原来的配置是:<select id="countSiteInv" parameterType="Map">
修改之后的配置<select id="countSiteInv" resultType="CamelCaseKeyMap" parameterType="Map">
mybatis中不管什么查询,都必须返回resultType或者resultMap的值,否则就会报错的。
相关文章推荐
- A query was run and no Result Maps were found
- Mybatis报错—— A query was run and no Result Maps were found for the Mapped Statement
- FAQ(15):A query was run and no Result Maps were found for the Mapped Statement 'com.smbms.dao.UserMa
- org.apache.ibatis.executor.ExecutorException: A query was run and no Result Maps were found for the
- A query was run and no Result Maps were found for the Mapped Statement
- A query was run and no Result Maps were found
- A query was run and no Result Maps were found for the Mapped Statement
- A query was run and no Result Maps were found for the Mapped Statement
- 使用Mybatis时出错:A query was run and no Result Maps were found for the Mapped Statement
- mybatis报错:A query was run and no Result Maps were found for the Mapped Statement
- A query was run and no Result Maps were found for the Mapped Statement
- org.apache.ibatis.executor.ExecutorException: A query was run and no Result Maps were found for the
- mybatis报错:A query was run and no Result Maps were found for the Mapped Statement
- A query was run and no Result Maps were found for the Mapped Statement 'com.atguigu.atcrowdfunding.p
- mybatis配置文件xxxx.xml中缺失返回类型的后果A query was run and no Result Maps were found
- A query was run and no Result Maps were found for the Mapped Statement
- A query was run and no Result Maps were found for the Mapped Statement 'com.dao.CommentDao.reviewtot
- No default view was found for object type 10201 and query type 2
- Eclipse启动时报错:A Java RunTime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No java virtual machine was found after searching the following locations:…
- content-length bytes were read and there was no trailing null byte