这里写自定义目录标题

  • 问题起因
    • 错误码代码如下:
  • step 1

问题起因

很简单的id和where mapper标签的使用不知道为什么突然出现无null1getter错误

错误码代码如下:

org.apache.ibatis.exceptions.PersistenceException:
Error querying database. Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘null1’ in ‘class com.sise.po.Freshman’
Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘null1’ in ‘class com.sise.po.Freshman’

at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:153)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:76)
at FreshmanTest.selectTest(FreshmanTest.java:15)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)

Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘null1’ in ‘class com.sise.po.Freshman’
at org.apache.ibatis.reflection.Reflector.getGetInvoker(Reflector.java:374)
at org.apache.ibatis.reflection.MetaClass.getGetInvoker(MetaClass.java:164)
at org.apache.ibatis.reflection.wrapper.BeanWrapper.getBeanProperty(BeanWrapper.java:162)
at org.apache.ibatis.reflection.wrapper.BeanWrapper.get(BeanWrapper.java:49)
at org.apache.ibatis.reflection.MetaObject.getValue(MetaObject.java:122)
at org.apache.ibatis.scripting.xmltags.DynamicContext C o n t e x t M a p . g e t ( D y n a m i c C o n t e x t . j a v a : 102 ) a t o r g . a p a c h e . i b a t i s . s c r i p t i n g . x m l t a g s . D y n a m i c C o n t e x t ContextMap.get(DynamicContext.java:102) at org.apache.ibatis.scripting.xmltags.DynamicContext ContextMap.get(DynamicContext.java:102)atorg.apache.ibatis.scripting.xmltags.DynamicContextContextAccessor.getProperty(DynamicContext.java:113)
at org.apache.ibatis.ognl.OgnlRuntime.getProperty(OgnlRuntime.java:3356)
at org.apache.ibatis.ognl.ASTProperty.getValueBody(ASTProperty.java:121)
at org.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
at org.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:258)
at org.apache.ibatis.ognl.ASTNotEq.getValueBody(ASTNotEq.java:51)
at org.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
at org.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:258)
at org.apache.ibatis.ognl.ASTAnd.getValueBody(ASTAnd.java:61)
at org.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
at org.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:258)
at org.apache.ibatis.ognl.Ognl.getValue(Ognl.java:586)
at org.apache.ibatis.ognl.Ognl.getValue(Ognl.java:550)
at org.apache.ibatis.scripting.xmltags.OgnlCache.getValue(OgnlCache.java:46)
at org.apache.ibatis.scripting.xmltags.ExpressionEvaluator.evaluateBoolean(ExpressionEvaluator.java:32)
at org.apache.ibatis.scripting.xmltags.IfSqlNode.apply(IfSqlNode.java:34)
at org.apache.ibatis.scripting.xmltags.MixedSqlNode.lambda$apply$0(MixedSqlNode.java:32)
at java.util.ArrayList.forEach(ArrayList.java:1249)
at org.apache.ibatis.scripting.xmltags.MixedSqlNode.apply(MixedSqlNode.java:32)
at org.apache.ibatis.scripting.xmltags.DynamicSqlSource.getBoundSql(DynamicSqlSource.java:39)
at org.apache.ibatis.mapping.MappedStatement.getBoundSql(MappedStatement.java:305)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:87)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151)
… 31 more

step 1

debug时发现了是引入Ssqlsession出错,于是加了个log4j,

所以其他博主说是没有getter,那么我到底哪里写了null1?


破案了……太粗心了救命

Error querying database. Cause: org.apache.ibatis.reflection.ReflectionException: There is no gette相关推荐

  1. MyBatis中PersistenceException:Error querying database. Cause: org.apache.ibatis.type.TypeException:

    org.apache.ibatis.exceptions.PersistenceException: Error querying database. Cause: org.apache.ibatis ...

  2. org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.apache.

    在xml文件中碰到这样的报错的时候,有可能是你在里面使用了这种注释,编译会报错,可能这就是约定大于配置 org.apache.ibatis.exceptions.PersistenceExceptio ...

  3. org.apache.ibatis.reflection.ReflectionException: Error instantiating class with invalid types

    大家好,我是烤鸭,记录一个初级异常,百度搜索结果不多: Caused by: org.apache.ibatis.reflection.ReflectionException: Error insta ...

  4. Caused by: org.apache.ibatis.reflection.ReflectionException我碰到的情况,原因不唯一

    映射文件: <select id="selectKeyByUserId"  resultMap="Xxx">         <![CDATA ...

  5. ?????nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for pr

    ?????nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for pr ...

  6. org.apache.ibatis.reflection.ReflectionException: There is no getter for property named XXX

    org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.Reflecti ...

  7. FAQ(31):org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'ues

    进行Spring整合Mybatis时,发生的Bug: 看Log: org.mybatis.spring.MyBatisSystemException: nested exception is org. ...

  8. nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for propert

    nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for propert ...

  9. 使用mybatisplus的insert方法报错:org.apache.ibatis.reflection.ReflectionException: Could not set property

    使用mybatisplus的insert方法报错:org.apache.ibatis.reflection.ReflectionException: Could not set property 'i ...

最新文章

  1. 4 Ways to Make Sure You Always Have Something to Say Online
  2. java 一元一次方程求解_七年级一元一次方程概念和解法,掌握这些就够了!
  3. caffe基础(7): 命令行解析
  4. PHP usort 函数底层排序
  5. nginx负载均衡的5种策略
  6. 年轻人的第一套租房?小米成立新公司或涉房屋租赁业务
  7. 【读书笔记】Java NIO (中文版) 读书笔记
  8. 研究员告警:严重漏洞影响数千万台IoT设备,可远程查看实时音视频并接管设备...
  9. 转:Android ViewPager多页面滑动切换以及动画效果
  10. IntelliJ 平台 2020 年路线图,规划原来这么厉害
  11. Java 根据 Map 的 key 的 ASCII 码从小到大排序
  12. arcgis pro利用python进行空间插值
  13. 【sketchup 2021】草图大师的场景优化工具3【新建材质、材质编辑面板的详细说明】【重要】
  14. qt 二维数组初始化_C++数组初始化方法
  15. vue和bootstrap-switch结合坑
  16. SAR影像辐射定标工程化实现之COSMO-Skymod
  17. 计算机病毒为了隐藏,识别计算机病毒的方法
  18. [数据仓库复习] —— 维度数据模型
  19. python能做些什么事_一起来看看Python能干什么?使用Python能做哪些事
  20. Instruments使用

热门文章

  1. word柱状图垂直轴数值设定_Excel图表中设置坐标轴的字体、图案格式、刻度格式和数字格式的方法...
  2. vuejs中使用vuex的两种方案之一
  3. 领英如何发布动态与查看自己一共发了多少条动态
  4. 记录:rosdep update
  5. rtx3090ti什么水平 rtx3090ti显卡什么级别 rtx3090ti显卡怎么样
  6. Banner在线制作网站介绍以及如何Springboot中使用
  7. android pppd参数介绍,android 3G pppd 调试记录
  8. 记账软件分享,教你如何记账并管理所有账目
  9. 右键新建的文档是wps类型的而不是office类型的解决方案
  10. php跳转到qq界面,PHP实现QQ登录的开原理和实现过程