接口异常 nested exception is org.apache.ibatis.reflection.ReflectionException: Could not set property 'deptId' of 'class com.yibo.cloud.adverseevent.modules.process.entity.ProcessPubData' with value '4' Cause: org.apache.ibatis.reflection.ReflectionException: There is no setter for property named 'deptId' in 'class com.yibo.cloud.adverseevent.modules.process.entity.ProcessPubData'
时间: 2023-07-19 11:47:05 浏览: 67
这个异常出现的原因是因为在 com.yibo.cloud.adverseevent.modules.process.entity.ProcessPubData 中没有名为 deptId 的 Setter 方法,导致无法将值设置到该属性中。您需要检查该类中是否存在该属性的 Setter 方法,或者将属性名修改为已有的 Setter 方法名。
相关问题
nested exception is org.apache.ibatis.reflection.ReflectionException: Could not set property 'id' of 'class
com.soso.eduservice.domain.EduTeacher' with value '1444921964545253378' Cause: java.lang.IllegalArgumentException: argument type mismatch 的错误是什么意思?该如何解决?
这个错误是MyBatis反射异常的嵌套异常,表示在给属性'id'设置值时发生了类型不匹配的错误。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [解决:nested exception is org.apache.ibatis.reflection.ReflectionException](https://blog.csdn.net/weixin_46128463/article/details/122972922)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [nested exception is org.apache.ibatis.reflection.ReflectionException: Could not set property ‘id‘ ...](https://blog.csdn.net/jokerwillin/article/details/120604175)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
nested exception is org.apache.ibatis.reflection.ReflectionException: Could not set property
"nested exception is org.apache.ibatis.reflection.ReflectionException: Could not set property"这个异常是MyBatis在设置属性时发生的反射异常。这个异常通常发生在设置属性值时传入的参数类型与属性类型不匹配的情况下。根据引用中的错误信息,异常是由于无法将值'1539102131662880769'赋给属性'id',导致反射异常。
为了解决这个问题,你可以检查变量类型是否正确。确保传入的参数类型与属性类型一致。另外,还可以检查是否在配置文件中正确设置了主键自增的方式,以确保在插入数据时能够正确生成主键值。引用中提到的配置可以尝试添加到MyBatis的配置文件中,确保使用数据库的主键自增方式。
如果仍然无法解决该问题,你可以查看其他相关资料,了解更多关于这个异常的处理方法,引用提供的文章可能会对你有所帮助。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [nested exception is org.apache.ibatis.reflection.ReflectionException: Could not set property ‘id‘ ...](https://blog.csdn.net/m0_45877477/article/details/125388756)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [Mybatis报错: org.apache.ibatis.exceptions.PersistenceException解决办法](https://download.csdn.net/download/weixin_38524871/12828533)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)