org.mybatis.spring.MyBatisSystemException: null
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:97)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:439)
at jdk.proxy2/jdk.proxy2.$Proxy111.insert(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:272)
at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:59)
at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:152)
at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)
at jdk.proxy2/jdk.proxy2.$Proxy128.insert(Unknown Source)
at com.baomidou.mybatisplus.extension.service.IService.save(IService.java:60)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:354)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:716)
at com.pea.business.sys.service.impl.SysOperationLogServiceImpl$$SpringCGLIB$$0.save()
at com.pea.common.manager.factory.AsyncFactory$1.run(AsyncFactory.java:26)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: org.apache.ibatis.exceptions.PersistenceException:
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:199)
at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:184)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:425)
... 19 common frames omitted
Caused by: com.pea.common.exception.GlobalException: 暂未登录或token已经过期
at com.pea.common.utils.SecurityUtil.getSysUser(SecurityUtil.java:23)
at com.pea.common.mybatis.config.MybatisPlusMetaObjectHandler.insertFill(MybatisPlusMetaObjectHandler.java:31)
at com.baomidou.mybatisplus.core.MybatisParameterHandler.lambda$insertFill$0(MybatisParameterHandler.java:177)
at java.base/java.util.Optional.ifPresent(Optional.java:178)
at com.baomidou.mybatisplus.core.MybatisParameterHandler.insertFill(MybatisParameterHandler.java:175)
at com.baomidou.mybatisplus.core.MybatisParameterHandler.process(MybatisParameterHandler.java:128)
at java.base/java.util.Collections$SingletonSet.forEach(Collections.java:5125)
at com.baomidou.mybatisplus.core.MybatisParameterHandler.processParameter(MybatisParameterHandler.java:96)
at com.baomidou.mybatisplus.core.MybatisParameterHandler.(MybatisParameterHandler.java:85)
at com.baomidou.mybatisplus.core.MybatisXMLLanguageDriver.createParameterHandler(MybatisXMLLanguageDriver.java:46)
at org.apache.ibatis.session.Configuration.newParameterHandler(Configuration.java:700)
at org.apache.ibatis.executor.statement.BaseStatementHandler.(BaseStatementHandler.java:70)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.(PreparedStatementHandler.java:42)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.(RoutingStatementHandler.java:47)
at org.apache.ibatis.session.Configuration.newStatementHandler(Configuration.java:714)
at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:48)
at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.apache.ibatis.plugin.Invocation.proceed(Invocation.java:49)
at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:106)
at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:59)
at jdk.proxy2/jdk.proxy2.$Proxy154.update(Unknown Source)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:197)
... 23 common frames omitted
在Mybatis中进行更改操作后获取当前用户失败
2024-06-16T14:49:34.284+08:00 ERROR 25424 --- [schedule-pool-3] com.pea.common.utils.Threads : null
org.mybatis.spring.MyBatisSystemException: null at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:97) at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:439) at jdk.proxy2/jdk.proxy2.$Proxy111.insert(Unknown Source) at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:272) at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:59) at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:152) at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89) at jdk.proxy2/jdk.proxy2.$Proxy128.insert(Unknown Source) at com.baomidou.mybatisplus.extension.service.IService.save(IService.java:60) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:354) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:716) at com.pea.business.sys.service.impl.SysOperationLogServiceImpl$$SpringCGLIB$$0.save()
at com.pea.common.manager.factory.AsyncFactory$1.run(AsyncFactory.java:26)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: org.apache.ibatis.exceptions.PersistenceException:
Error updating database. Cause: GlobalException(code=8888, message=暂未登录或token已经过期, json=null)
The error may exist in com/pea/business/sys/mapper/SysOperationLogMapper.java (best guess)
The error may involve com.pea.business.sys.mapper.SysOperationLogMapper.insert
The error occurred while executing an update
Cause: GlobalException(code=8888, message=暂未登录或token已经过期, json=null)
Caused by: com.pea.common.exception.GlobalException: 暂未登录或token已经过期 at com.pea.common.utils.SecurityUtil.getSysUser(SecurityUtil.java:23) at com.pea.common.mybatis.config.MybatisPlusMetaObjectHandler.insertFill(MybatisPlusMetaObjectHandler.java:31) at com.baomidou.mybatisplus.core.MybatisParameterHandler.lambda$insertFill$0(MybatisParameterHandler.java:177) at java.base/java.util.Optional.ifPresent(Optional.java:178) at com.baomidou.mybatisplus.core.MybatisParameterHandler.insertFill(MybatisParameterHandler.java:175) at com.baomidou.mybatisplus.core.MybatisParameterHandler.process(MybatisParameterHandler.java:128) at java.base/java.util.Collections$SingletonSet.forEach(Collections.java:5125) at com.baomidou.mybatisplus.core.MybatisParameterHandler.processParameter(MybatisParameterHandler.java:96) at com.baomidou.mybatisplus.core.MybatisParameterHandler.(MybatisParameterHandler.java:85)
at com.baomidou.mybatisplus.core.MybatisXMLLanguageDriver.createParameterHandler(MybatisXMLLanguageDriver.java:46)
at org.apache.ibatis.session.Configuration.newParameterHandler(Configuration.java:700)
at org.apache.ibatis.executor.statement.BaseStatementHandler.(BaseStatementHandler.java:70)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.(PreparedStatementHandler.java:42)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.(RoutingStatementHandler.java:47)
at org.apache.ibatis.session.Configuration.newStatementHandler(Configuration.java:714)
at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:48)
at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.apache.ibatis.plugin.Invocation.proceed(Invocation.java:49)
at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:106)
at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:59)
at jdk.proxy2/jdk.proxy2.$Proxy154.update(Unknown Source)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:197)
... 23 common frames omitted
在Mybatis中进行更改操作后获取当前用户失败