219 Star 2.4K Fork 470

MyBatis-Flex / MyBatis-Flex

 / 详情

[使用问题]: 抛出的异常不友好

已完成
创建于  
2024-04-17 23:36

这个问题是否已经存在:

使用时遇到的问题描述:

不点进源码去看完全不知道是什么原因导致问题
java.lang.RuntimeException: Can not newInstance class: per.xxx.SysUser_$$_jvst279_0
at com.mybatisflex.core.util.ClassUtil.newInstance(ClassUtil.java:174) ~[mybatis-flex-core-1.8.4.jar:na]
at com.mybatisflex.core.update.ModifyAttrsRecordProxyFactory.get(ModifyAttrsRecordProxyFactory.java:58) ~[mybatis-flex-core-1.8.4.jar:na]
at com.mybatisflex.core.util.UpdateEntity.of(UpdateEntity.java:36) ~[mybatis-flex-core-1.8.4.jar:na]
at com.mybatisflex.core.update.UpdateChain.createEntity(UpdateChain.java:84) ~[mybatis-flex-core-1.8.4.jar:na]
at com.mybatisflex.core.update.UpdateChain.(UpdateChain.java:68) ~[mybatis-flex-core-1.8.4.jar:na]
at com.mybatisflex.core.update.UpdateChain.of(UpdateChain.java:48) ~[mybatis-flex-core-1.8.4.jar:na]

java.lang.NullPointerException: Cannot invoke "com.mybatisflex.core.update.UpdateWrapper.set(com.mybatisflex.core.util.LambdaGetter, Object, boolean)" because "this.entityWrapper" is null

at com.mybatisflex.core.update.UpdateChain.set(UpdateChain.java:107)
at com.mybatisflex.core.update.UpdateChain.set(UpdateChain.java:39)
at com.mybatisflex.core.update.PropertySetter.set(PropertySetter.java:123)

截图或视频:

[在这里上传图片]
在这一步catch了抛出的IllegalArgumentException 也没打印堆栈,一开始出现这个异常让人摸不到头脑
输入图片说明
输入图片说明

关联版本:

1.8.7

评论 (1)

SmallSix 创建了任务
SmallSix 添加了
 
question
标签
展开全部操作日志

给实体类加一个public的无参构造器。

SmallSix 任务状态待办的 修改为已完成

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(2)
7984572 suomm 1698661375
1
https://gitee.com/mybatis-flex/mybatis-flex.git
git@gitee.com:mybatis-flex/mybatis-flex.git
mybatis-flex
mybatis-flex
MyBatis-Flex

搜索帮助

53164aa7 5694891 3bd8fe86 5694891