当前位置:首页 > Java技术 > MyBatis异常——MyBatisSystemException:nested exception is....ReflectionException: ....

MyBatis异常——MyBatisSystemException:nested exception is....ReflectionException: ....

2022年11月09日 20:26:08Java技术6

JDK1.7+Tomcat7.0+SSM+Eclipse 

MyBatis异常——MyBatisSystemException:nested exception is....ReflectionException: .... _ JavaClub全栈架构师技术笔记

严重: Servlet.service() for servlet [SpringMVC] in context with path [/MVCQ] threw exception [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 'name' in 'class java.lang.String'] with root cause
org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'name' in 'class java.lang.String'
	at org.apache.ibatis.reflection.Reflector.getGetInvoker(Reflector.java:333)
	at org.apache.ibatis.reflection.MetaClass.getGetInvoker(MetaClass.java:160)
	at org.apache.ibatis.reflection.wrapper.BeanWrapper.getBeanProperty(BeanWrapper.java:151)
	at org.apache.ibatis.reflection.wrapper.BeanWrapper.get(BeanWrapper.java:44)
	at org.apache.ibatis.reflection.MetaObject.getValue(MetaObject.java:123)
	at org.apache.ibatis.builder.xml.dynamic.DynamicContext$ContextMap.get(DynamicContext.java:89)
	at org.apache.ibatis.builder.xml.dynamic.DynamicContext$ContextAccessor.getProperty(DynamicContext.java:107)
	at org.apache.ibatis.ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1657)
	at org.apache.ibatis.ognl.ASTProperty.getValueBody(ASTProperty.java:92)
	at org.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
	at org.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:210)
	at org.apache.ibatis.ognl.ASTNotEq.getValueBody(ASTNotEq.java:49)
	at org.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
	at org.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:210)
	at org.apache.ibatis.ognl.ASTAnd.getValueBody(ASTAnd.java:56)
	at org.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
	at org.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:210)
	at org.apache.ibatis.ognl.Ognl.getValue(Ognl.java:333)
	at org.apache.ibatis.ognl.Ognl.getValue(Ognl.java:413)
	at org.apache.ibatis.ognl.Ognl.getValue(Ognl.java:395)
	at org.apache.ibatis.builder.xml.dynamic.OgnlCache.getValue(OgnlCache.java:42)
	at org.apache.ibatis.builder.xml.dynamic.ExpressionEvaluator.evaluateBoolean(ExpressionEvaluator.java:32)
	at org.apache.ibatis.builder.xml.dynamic.IfSqlNode.apply(IfSqlNode.java:30)
	at org.apache.ibatis.builder.xml.dynamic.MixedSqlNode.apply(MixedSqlNode.java:29)
	at org.apache.ibatis.builder.xml.dynamic.DynamicSqlSource.getBoundSql(DynamicSqlSource.java:37)
	at org.apache.ibatis.mapping.MappedStatement.getBoundSql(MappedStatement.java:241)
	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:79)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:101)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:95)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:59)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:355)
	at com.sun.proxy.$Proxy14.selectOne(Unknown Source)
	at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:160)
	at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:95)
	at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:40)
	at com.sun.proxy.$Proxy18.getCount(Unknown Source)
	at com.qiu.service.Emp_DepService.getCount(Emp_DepService.java:37)
	at com.qiu.service.Emp_DepService$$FastClassBySpringCGLIB$$9688c854.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:717)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:653)
	at com.qiu.service.Emp_DepService$$EnhancerBySpringCGLIB$$79573629.getCount(<generated>)
	at com.qiu.controller.DepController.list(DepController.java:32)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:777)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:706)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:943)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:868)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

这个异常,很明显的是:“MyBatis系统异常”  (从这异常,就知道,与XxxDAO.xml有关,因为体现MyBatis,主要在DAO的配置文件上) 

MyBatis异常——MyBatisSystemException:nested exception is....ReflectionException: .... _ JavaClub全栈架构师技术笔记

 根据 与“name”有联系的路线,发现getCount()有问题:

MyBatis异常——MyBatisSystemException:nested exception is....ReflectionException: .... _ JavaClub全栈架构师技术笔记

MyBatis异常——MyBatisSystemException:nested exception is....ReflectionException: .... _ JavaClub全栈架构师技术笔记

MyBatis异常——MyBatisSystemException:nested exception is....ReflectionException: .... _ JavaClub全栈架构师技术笔记

MyBatis异常——MyBatisSystemException:nested exception is....ReflectionException: .... _ JavaClub全栈架构师技术笔记

MyBatis异常——MyBatisSystemException:nested exception is....ReflectionException: .... _ JavaClub全栈架构师技术笔记

MyBatis异常——MyBatisSystemException:nested exception is....ReflectionException: .... _ JavaClub全栈架构师技术笔记

MyBatis异常——MyBatisSystemException:nested exception is....ReflectionException: .... _ JavaClub全栈架构师技术笔记

 改为:

MyBatis异常——MyBatisSystemException:nested exception is....ReflectionException: .... _ JavaClub全栈架构师技术笔记

MyBatis异常——MyBatisSystemException:nested exception is....ReflectionException: .... _ JavaClub全栈架构师技术笔记

 所以不要“粗心”!!! 

作者:Yvette_QIU
来源链接:https://blog.csdn.net/qq_41042595/article/details/86094635

版权声明:
1、JavaClub(https://www.javaclub.cn)以学习交流为目的,由作者投稿、网友推荐和小编整理收藏优秀的IT技术及相关内容,包括但不限于文字、图片、音频、视频、软件、程序等,其均来自互联网,本站不享有版权,版权归原作者所有。

2、本站提供的内容仅用于个人学习、研究或欣赏,以及其他非商业性或非盈利性用途,但同时应遵守著作权法及其他相关法律的规定,不得侵犯相关权利人及本网站的合法权利。
3、本网站内容原作者如不愿意在本网站刊登内容,请及时通知本站(javaclubcn@163.com),我们将第一时间核实后及时予以删除。


本文链接:https://www.javaclub.cn/java/69003.html

分享给朋友:

“MyBatis异常——MyBatisSystemException:nested exception is....ReflectionException: ....” 的相关文章

Android程序报IOException和ConnectException

写的是Android程序作为客户端访问Java Web应用程序, android应用程序是用通过URL,HttpPost request = new HttpPost(url) ; HttpResponse response=DefaultHttpCli...

error与exception的区别

Error(错误) 是系统中的错误,程序员是不能改变的和处理的,是在程序编译时出现的错误,只能通过修改程序才能修正。一般是指与虚拟机相关的问题,如系统崩溃,虚拟机错误,内存空间不足,方法调用栈溢等。对于这类错误的导致的应用程序中断,仅靠程序本身无法恢复和和预防,遇到这样的错误,建...

解决ADT不显示javadoc An exception occurred while getting the javadoc

这几天发现ADT在网速特别差的情况下,鼠标悬停不会显示javadoc,而自己写的注释则没有问题. 在网络畅通的时候又会显示javadoc. 所以我猜测ADT会在本地查找文档失败时候尝试联网查找. 一般来说,如果你之前鼠标悬停会显示javadoc,最近突然不显示了...

Android 混淆问题排查

Android 混淆问题排查

问题 近期在开发过程中,突然出现混淆后程序出现运行时异常,编译是正常的,不混淆也是正常的, 错误信息如下提示 12-07 14:10:27.056 10603-10603/? E/AndroidRuntime: FATAL EXCEPTION...

Spring5:@Autowired注解、@Resource注解和@Service注解

什么是注解 传统的Spring做法是使用.xml文件来对bean进行注入或者是配置aop、事物,这么做有两个缺点: 1、如果所有的内容都配置在.xml文件中,那么.xml文件将会十分庞大;如果按需求分开.xml文件,那么.xml文件又会非常多。总之这将导致配置文件的可读性与...

springboot集成activiti工作流时容易出现的问题

No.1 启动报错 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.activiti.spring.boot.SecurityAutoCo...

Error creating bean with name ‘sqlSessionFactory’ defined in class path resource

Error creating bean with name ‘sqlSessionFactory’ defined in class path resource

原文链接:这里 0.报错描述 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in...

如何在android style文件中使用自定义属性

      前几天我在项目中遇到了这样一个问题:我为项目编写了一个自定义控件,这个控件会被大量复用,所以我准备在style.xml文件中定义一个style来减少重复xml布局内容的编写,但是里面有一个自定义的控件属性,问题出现在这里,虽然自定...

org.springframework.beans.factory.BeanCreationException

错误:org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/company/list': Injection of resource fields failed;...

JNI DETECTED ERROR IN APPLICATION: JNI NewGlobalRef called with pending exception java.lang.UnsatisfiedLinkError: method:makesureAuthed, sig:(Ljava/lang/String;)Z

JNI DETECTED ERROR IN APPLICATION: JNI NewGlobalRef called with pending exception java.lang.UnsatisfiedLinkError: method:makesureAuthed, s...

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。