@[TOC](2023-07-10 20:22:13.962 ERROR 30664 — [nio-7777-exec-7] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression ‘ew.sqlSegment != null and ew.sqlSegment != ‘’ and ew.nonEmptyOfNormal’. Cause: org.apache.ibatis.ognl.OgnlException: sqlSegment [java.lang.NoClassDefFoundError: Could not initialize class com.baomidou.mybatisplus.core.toolkit.support.SerializedLambdaMeta]] with root cause
word count: 84, token estimate: 206
)
先说解决方案
检查你的jdk
版本
检查你的jdk
版本
检查你的jdk
版本
以jdk1.8为例
具体有三个地方:
可以观察运行窗口的jdk版本有无改变
原因分析
我使用idea时遇到了复制的内容和粘贴的内容不一致,然后通过chatGPT了解
到将目录中的.idea目录删除后重新导入项目可以解决。
在我删除后我的问题得到了解决,但在我开发登录模块时,我发现我的mybatisplus
所有查询语句都失效了,提示上面这个错误
在删除了2次maven依赖重装后,依然没有解决,在排除了依赖版本问题后发现启动项目的jdk是18,这才想起.idea可能包含了jdk的配置,再删除后idea默认给我设置了jdk18导致这个错误的发生。泪目(解决花了3个小时)
后记
切勿轻信chatGPT
切勿轻信chatGPT
切勿轻信chatGPT