Complete error message:
Severity: Servlet.service () forservlet [SPRINGMVC]inchContext withpath [/xinghe-Platform-web] threw exception [Request processing failed; Nested exception is org.mybatis.spring.MyBatisSystemException:nested E Xception is org.apache.ibatis.builder.BuilderException:The expression' list 'Evaluated to a NULL value.] withRoot Causeorg.apache.ibatis.builder.BuilderException:The expression' list 'Evaluated to a NULL value. atOrg.apache.ibatis.scripting.xmltags.ExpressionEvaluator.evaluateIterable (Expressionevaluator.java: +) atOrg.apache.ibatis.scripting.xmltags.ForEachSqlNode.apply (Foreachsqlnode.java: Wu) atOrg.apache.ibatis.scripting.xmltags.MixedSqlNode.apply (Mixedsqlnode.java: +) atORG.APACHE.IBATIS.SCRIPTING.XMLTAGS.DYNAMICSQLSOURCE.GETBOUNDSQL (Dynamicsqlsource.java: +) atORG.APACHE.IBATIS.MAPPING.MAPPEDSTATEMENT.GETBOUNDSQL (Mappedstatement.java:278) atOrg.apache.ibatis.executor.BaseExecutor.query (Baseexecutor.java:118) atSun.reflect.GeneratedMethodAccessor67.invoke (Unknown Source) atSun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source) atJava.lang.reflect.Method.invoke (Unknown Source) atOrg.apache.ibatis.plugin.Invocation.proceed (Invocation.java: the) atCom.xinghe.frame.mybatis.FlushCacheInterceptor.intercept (Flushcacheinterceptor.java: A) atOrg.apache.ibatis.plugin.Plugin.invoke (Plugin.java: -) atCom.sun.proxy. $Proxy 24.query (Unknown Source) atSun.reflect.GeneratedMethodAccessor67.invoke (Unknown Source) atSun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source) atJava.lang.reflect.Method.invoke (Unknown Source) atOrg.apache.ibatis.plugin.Invocation.proceed (Invocation.java: the) atCom.xinghe.frame.mybatis.OffsetLimitInterceptor.intercept (Offsetlimitinterceptor.java: -) atOrg.apache.ibatis.plugin.Plugin.invoke (Plugin.java: -) atCom.sun.proxy. $Proxy 24.query (Unknown Source) atOrg.apache.ibatis.session.defaults.DefaultSqlSession.selectList (Defaultsqlsession.java:108) atOrg.apache.ibatis.session.defaults.DefaultSqlSession.selectList (Defaultsqlsession.java:102) atSun.reflect.GeneratedMethodAccessor71.invoke (Unknown Source) atSun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source) atJava.lang.reflect.Method.invoke (Unknown Source) atOrg.mybatis.spring.sqlsessiontemplate$sqlsessioninterceptor.invoke (Sqlsessiontemplate.java:358) atCom.sun.proxy. $Proxy 17.selectList (Unknown Source) atOrg.mybatis.spring.SqlSessionTemplate.selectList (Sqlsessiontemplate.java:198) atCom.xinghe.Platform. Dao. Resscoredao.getbyresourcelocalid (Resscoredao.java: +) atCom.xinghe.Platform. Service. Resscoremanager.getbyresourcelocalid (Resscoremanager.java: A) atCom.xinghe.Platform. Service. resscoremanager$ $FastClassBySpringCGLIB $$ theBa2513.invoke (<generated>) atOrg.springframework.cglib.proxy.MethodProxy.invoke (Methodproxy.java:204) atOrg.springframework.aop.framework.cglibaopproxy$cglibmethodinvocation.invokejoinpoint (CglibAopProxy.java:717) atOrg.springframework.aop.framework.ReflectiveMethodInvocation.proceed (Reflectivemethodinvocation.java:157) atorg.springframework.transaction.interceptor.transactioninterceptor$1.Proceedwithinvocation (Transactioninterceptor.java: About) atOrg.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction ( Transactionaspectsupport.java:281) atOrg.springframework.transaction.interceptor.TransactionInterceptor.invoke (Transactioninterceptor.java: the) atOrg.springframework.aop.framework.ReflectiveMethodInvocation.proceed (Reflectivemethodinvocation.java:179) atOrg.springframework.aop.framework.cglibaopproxy$dynamicadvisedinterceptor.intercept (CglibAopProxy.java:653) atCom.xinghe.Platform. Service. resscoremanager$ $EnhancerBySpringCGLIB $$9B94cd4.getbyresourcelocalid (<generated>) atCom.xinghe.Platform. Action. Resresourcepublic.getscore (Resresourcepublic.java:433) atSUN.REFLECT.NATIVEMETHODACCESSORIMPL.INVOKE0 (Native Method) atSun.reflect.NativeMethodAccessorImpl.invoke (Unknown Source) atSun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source) atJava.lang.reflect.Method.invoke (Unknown Source) atOrg.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod ( Handlermethodinvoker.java:177) atOrg.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod ( Annotationmethodhandleradapter.java:446) atOrg.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle ( Annotationmethodhandleradapter.java:434) atOrg.springframework.web.servlet.DispatcherServlet.doDispatch (Dispatcherservlet.java:943) atOrg.springframework.web.servlet.DispatcherServlet.doService (Dispatcherservlet.java:877) atOrg.springframework.web.servlet.FrameworkServlet.processRequest (Frameworkservlet.java:966) atOrg.springframework.web.servlet.FrameworkServlet.doGet (Frameworkservlet.java:857) atJavax.servlet.http. Httpservlet.service (Httpservlet.java:622) atOrg.springframework.web.servlet.FrameworkServlet.service (Frameworkservlet.java:842) atJavax.servlet.http. Httpservlet.service (Httpservlet.java:729) atOrg.apache.catalina.core.ApplicationFilterChain.internalDoFilter (Applicationfilterchain.java:291) atOrg.apache.catalina.core.ApplicationFilterChain.doFilter (Applicationfilterchain.java:206) atOrg.apache.tomcat.websocket.server.WsFilter.doFilter (Wsfilter.java: the) atOrg.apache.catalina.core.ApplicationFilterChain.internalDoFilter (Applicationfilterchain.java:239) atOrg.apache.catalina.core.ApplicationFilterChain.doFilter (Applicationfilterchain.java:206) atCom.auth.Filter. Authorizationfilter.dofilterinternal (Authorizationfilter.java: the) atOrg.springframework.web.Filter. Onceperrequestfilter.dofilter (Onceperrequestfilter.java:107) atOrg.springframework.web.Filter. Delegatingfilterproxy.invokedelegate (Delegatingfilterproxy.java:344) atOrg.springframework.web.Filter. Delegatingfilterproxy.dofilter (Delegatingfilterproxy.java:261) atOrg.apache.catalina.core.ApplicationFilterChain.internalDoFilter (Applicationfilterchain.java:239) atOrg.apache.catalina.core.ApplicationFilterChain.doFilter (Applicationfilterchain.java:206) atCom.auth.Filter. Authenticationfilter.dofilterinternal (Authenticationfilter.java: the) atOrg.springframework.web.Filter. Onceperrequestfilter.dofilter (Onceperrequestfilter.java:107) atOrg.springframework.web.Filter. Delegatingfilterproxy.invokedelegate (Delegatingfilterproxy.java:344) atOrg.springframework.web.Filter. Delegatingfilterproxy.dofilter (Delegatingfilterproxy.java:261) atOrg.apache.catalina.core.ApplicationFilterChain.internalDoFilter (Applicationfilterchain.java:239) atOrg.apache.catalina.core.ApplicationFilterChain.doFilter (Applicationfilterchain.java:206) atCom.xinghe.activate.Filter. Activatefilter.dofilterinternal (Activatefilter.java: the) atOrg.springframework.web.Filter. Onceperrequestfilter.dofilter (Onceperrequestfilter.java:107) atOrg.springframework.web.Filter. Delegatingfilterproxy.invokedelegate (Delegatingfilterproxy.java:344) atOrg.springframework.web.Filter. Delegatingfilterproxy.dofilter (Delegatingfilterproxy.java:261) atOrg.apache.catalina.core.ApplicationFilterChain.internalDoFilter (Applicationfilterchain.java:239) atOrg.apache.catalina.core.ApplicationFilterChain.doFilter (Applicationfilterchain.java:206) atOrg.springframework.web.Filter. Characterencodingfilter.dofilterinternal (Characterencodingfilter.java: the) atOrg.springframework.web.Filter. Onceperrequestfilter.dofilter (Onceperrequestfilter.java:107) atOrg.apache.catalina.core.ApplicationFilterChain.internalDoFilter (Applicationfilterchain.java:239) atOrg.apache.catalina.core.ApplicationFilterChain.doFilter (Applicationfilterchain.java:206) atOrg.apache.catalina.core.StandardWrapperValve.invoke (Standardwrappervalve.java:219) atOrg.apache.catalina.core.StandardContextValve.invoke (Standardcontextvalve.java:106) atOrg.apache.catalina.authenticator.AuthenticatorBase.invoke (Authenticatorbase.java:502) atOrg.apache.catalina.core.StandardHostValve.invoke (Standardhostvalve.java:142) atOrg.apache.catalina.valves.ErrorReportValve.invoke (Errorreportvalve.java: -) atOrg.apache.catalina.valves.AbstractAccessLogValve.invoke (Abstractaccesslogvalve.java:617) atOrg.apache.catalina.core.StandardEngineValve.invoke (Standardenginevalve.java: the) atOrg.apache.catalina.connector.CoyoteAdapter.service (Coyoteadapter.java:518) atOrg.apache.coyote.http11.AbstractHttp11Processor.Process(Abstracthttp11processor.java:1091) atOrg.apache.coyote.abstractprotocol$abstractconnectionhandler.Process(Abstractprotocol.java:668) atOrg.apache.tomcat.util.net.nioendpoint$socketprocessor.dorun (Nioendpoint.java:1521) atOrg.apache.tomcat.util.net.nioendpoint$socketprocessor.run (Nioendpoint.java:1478) atJava.util.concurrent.ThreadPoolExecutor.runWorker (Unknown Source) atJava.util.concurrent.threadpoolexecutor$worker.run (Unknown Source) atOrg.apache.tomcat.util.threads.taskthread$wrappingrunnable.run (Taskthread.java: A) atJava.lang.Thread.run (Unknown Source)
* * Environment: **java project, Springmvc+mybatis framework,
source location for this error:
When you see Mybatissystemexception, the first thing you think of is that the error may occur in the Resscoremapper.xml file, but the DAO layer is associated directly with the Mapper.xml file, and viewing the error message can see the following information:
Com.xinghe.platform.dao.ResScoreDao.getByResourceLocalId (resscoredao.java:43)
That's the mistake I've ever had.
cause of error:
Speaking of the cause of the error, here made a pediatric error, from other DAO files copied from the code, the method name changed, SelectOne in the call of the mapper in the command space and the method name forgot to change, so caused this error;
Corrected as follows:
Because SelectOne SQL returns multiple records with an exception, this is used instead: SelectList.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Mybatis:the expression ' list ' evaluated to a null value