出现此异常,一般是动态sql的问题,根据后面的提示信息,找到对应的sql,检查动态sql语法。
异常信息:
nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression 'ides'. Return value (806) was not iterable.
根据异常提示信息,找到ides所在的 动态sql语句。
<foreach collection="ides" index="index" item="ides" open="(" separator="," close=")">
</foreach>
...
<foreach collection="ides" index="index" item="ides" open="(" separator="," close=")">
</foreach>
最后发现
两个<foreach></foreach>语句 对同一item变量进行操作,导致后者动态sql拼接失败。
将任一语句中item属性更改为不同值。
<foreach collection="ides" index="index" item="idess" open="(" separator="," close=")">
</foreach>
...
<foreach collection="ides" index="index" item="ides" open="(" separator="," close=")">
</foreach>
nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression 异常
出现此异常,一般是动态sql的问题,根据后面的提示信息,找到对应的sql,检查动态sql语法。问题描述异常信息:nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression 'ides'. Return value (806) was not iterable.根据异常提示信息,找到ides所在的 动态sql语句。<foreach collection="ides"
SpringMVC4.3.6配置json所需要的jar包,不是使用最新最高的版本可以的,我尝试了,有错误:严重: Servlet.service() for servlet [springMVC] in context with path [/30-returnVoid-ajax] threw exception [Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/lang/exception/NestableRuntimeException] with root cause
java.lang.ClassNotFoundException: org.apache.commons.lang.exception.NestableRuntimeException
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
at java.lang.ClassLoader.defineClass1(Native Method)
以下的问题是由于java的堆内存已满,需要java运行时加大java的堆内存空间
2019-10-09 18:02:32.858 [http-nio-8239-exec-6] ERROR c.a.b.c.exceptionHandler.CodeBaseExceptionHandler:69 - Handler dispatch failed; nested exception is java.lang.OutOfMemoryError: Java heap space
org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.OutOfMemoryError: Java heap space
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1006)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:877)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.github.xiaoymin.swaggerbootstrapui.filter.SecurityBasicAuthFilter.doFilter(SecurityBasicAuthFilter.java:80)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.github.xiaoymin.swaggerbootstrapui.filter.ProductionSecurityFilter.doFilter(ProductionSecurityFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:387)
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1468)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.OutOfMemoryError: Java heap space
Mybatis-plus配置
重点:解决save时乱码,解决mybatis映射时日期格式问题
为什么不用mybatis-plus-boot-starter?配置多数据源时,要让spring-boot不自动注入data-source和sqlSessionFactory。 。
1,出现了如下BUG
org.mybatis.spring.MyBatisSystemException:
nested exception is org.apache.ibatis.reflection.ReflectionException:
There is no getter for property named 'statement' in 'class org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy'
at org.apac
mapper:
List<DetailVO> findList(Page<DetailVO> page, @Param("q") Map<String, Object> params);
通过myBatis自带功能foreach,直接把逗号分隔的字符串传到mapper.xml即可,后台不用过多操作,Mapper.xml拼接部分sql如下:
<if test="q.buType != nu
nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression 的解决办法
HTTP Status 500 – Request processing failed; nested exception is com.sun.jersey.api.client.UniformInterfaceException: PUT http://localhost:8090/picServer/uploads/QQ截图20200220003029.png returned a response status of 400 Bad Request
type Exception report
message Request processing failed; nested
org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted
at org.springframework.jdbc.dataso
JOY PATRICIA BURKE STEPHEN T. DEJIERS
l’itiilersity of .\orth Carolina at Chapel Hill 7 . tL iw-s4y sf Xebraska at Oniahu
For the school psychologist, interviewing is a commonly used but. little under-
st.ood asswment technique, often appreciated for its apparent simplicit
and flexibilit but criticized for its frequent lack of psychometric rigor. W i d
few stand
### 回答1:
嵌套异常是org.apache.ibatis.builder.builderexception。这个异常通常是由MyBatis框架中的XML映射文件配置错误引起的。可能是SQL语句语法错误、参数类型不匹配、映射文件中的标签错误等。需要仔细检查映射文件中的配置,确保语法正确、标签匹配、参数类型正确等。
### 回答2:
这是一个MyBatis Builder异常,通常是由于配置文件中的语法错误或其中参数的名称错误导致的。开发人员应该仔细检查MyBatis的XML配置文件以查找并修复错误。一些常见错误包括:SQL语句中的变量名拼写错误、参数数量不匹配、未定义的参数或没有正确的映射。如果开发人员没有找到解决方案,可以尝试以下步骤:
1、检查Mapper文件的正确性,确保SQL语句的正确性以及包括了所有的参数。
2、确认 Java Bean 中所有属性的名称与 Mapper 文件中的 #{property} 一致。
3、查看MyBatis的日志,以了解更多信息。在MyBatis的配置文件中将这个日志级别设置成"DEBUG"可以提供更多调试信息。
4、如果以上几步没有解决问题,可以在项目中使用栈跟踪工具来找到问题所在。
总之,这个异常通常是由于XML配置文件中的语法错误或者Java Bean的变量名与XML配置文件中的参数名不匹配导致的。开发人员应该进行仔细的检查和排查以解决这个问题。
### 回答3:
这个异常通常出现在使用MyBatis框架时,表示MyBatis在解析Mapper XML文件时出现了错误。
其中的“nested exception”意为内嵌异常,提示实际错误是在一个更深层次的异常中被抛出的。具体地说,这个异常还提到了“org.apache.ibatis.builder.builderexception”这一类异常,说明问题可能出在MyBatis构建器上。
通常情况下,这个异常的引发原因可能包括以下几种:
1. Mapper XML文件中存在语法错误或标签未闭合等问题;
2. 在使用自定义类型参数时,未正确设置类型处理器或声明别名;
3. 对MyBatis的配置文件中存在配置错误等问题;
4. 已经添加的jar包版本冲突;
5. 其他未知问题。
针对这个异常,可以通过以下几个步骤来排查:
1. 检查Mapper XML文件中是否存在语法错误或标签未闭合等明显问题;
2. 检查自定义的类型处理器和别名是否设置正确;
3. 检查MyBatis的配置文件是否正确配置;
4. 检查已经添加的jar包版本是否与当前应用程序的MyBatis版本冲突;
5. 如果以上排查方法都无法解决问题,可以尝试在MyBatis日志中查看更详细的错误信息。
总之,MyBatis抛出的异常信息非常有用,对于排查MyBatis应用程序的问题非常有帮助。通过仔细检查异常信息和排除所有可能出现的问题,可以最终找到根本原因并解决问题。
nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression 异常
10639