Error querying database. Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter
Posted lxhk
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Error querying database. Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter相关的知识,希望对你有一定的参考价值。
1.错误信息
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘param1‘ in ‘class com.lxh.mybatis.pojo.User‘
### Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘param1‘ in ‘class com.lxh.mybatis.pojo.User‘
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:111)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:66)
at com.lxh.mybatis.test.MybatisTest.main(MybatisTest.java:55)
Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘param1‘ in ‘class com.lxh.mybatis.pojo.User‘
at org.apache.ibatis.reflection.Reflector.getGetInvoker(Reflector.java:380)
at org.apache.ibatis.reflection.MetaClass.getGetInvoker(MetaClass.java:170)
at org.apache.ibatis.reflection.wrapper.BeanWrapper.getBeanProperty(BeanWrapper.java:152)
at org.apache.ibatis.reflection.wrapper.BeanWrapper.get(BeanWrapper.java:48)
at org.apache.ibatis.reflection.MetaObject.getValue(MetaObject.java:116)
at org.apache.ibatis.executor.BaseExecutor.createCacheKey(BaseExecutor.java:186)
at org.apache.ibatis.executor.CachingExecutor.createCacheKey(CachingExecutor.java:129)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:76)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:108)
... 3 more
2.原因:xml文件中配置参数错误
3.解决:修改过来就好了
以上是关于Error querying database. Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter的主要内容,如果未能解决你的问题,请参考以下文章
[经验栈]Typecho升级(upgrade)失败Database Query Error
搭建Mybatis 出现 Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statement
Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection doe
### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException
Error querying database. Cause: org.apache.ibatis.builder.IncompleteElementException: Could not find
Error querying database. Cause: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][