当前使用版本(必填,否则不予处理)

mybatis-plus-boot-starter 3.3.0 mybatis-plus-annotation 3.3.0 mybatis-plus-extension 3.3.0

该问题是如何引起的?(确定最新版也有问题再提!!!)

*lambdaQuery 进行查询更新操作* boolean saveRet = xxxService.saveOrUpdate(po, Wrappers.lambdaQuery().eq(XxxPO::getUniqueKey, po.getUniqueKey()));

重现步骤(如果有就写完整)

报错信息

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression 'ew.sqlSegment != null and ew.sqlSegment != '' and ew.nonEmptyOfWhere'. Cause: org.apache.ibatis.ognl.OgnlException: sqlSegment [java.lang.OutOfMemoryError: Metaspace] at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:92) at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440) at com.sun.proxy.$Proxy119.update(Unknown Source) at org.mybatis.spring.SqlSessionTemplate.update(SqlSessionTemplate.java:287) at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:65) at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:96) at com.sun.proxy.$Proxy149.update(Unknown Source) at com.baomidou.mybatisplus.extension.service.impl.ServiceImpl.update(ServiceImpl.java:225) at com.baomidou.mybatisplus.extension.service.IService.saveOrUpdate(IService.java:405) at com.baomidou.mybatisplus.extension.service.IService$$FastClassBySpringCGLIB$$f8525d18.invoke() at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:684)

Comment From: miemieYaho

增加 Metaspace 的大小

Comment From: proudcandy

增加 Metaspace 的大小

这个问题,具体怎么导致的? 要调整jvm Metaspace大小吗? 是因为lambdaQuery,解析有问题吗? 不用lambdaQuery,可以避免这个问题吗?

Comment From: qmdx

是因为lambdaQuery,解析有问题吗? 不用lambdaQuery,可以避免这个问题吗?

会有一点内存损耗,加大一点