FAQ(17):Cause: org.apache.ibatis.reflection.ReflectionException: Could not set property 'addressDesc

材料仿真软件:Materials Studio_(14).电学性质计算 设置计算参数,包括 k 点网格、交换相关泛函等。 阅读详情

场景:Mybatis -- ressultMap的Collection标签使用BUG

看LOG:

===============test add!
DEBUG 12-17 18:17:08,112 ==>  Preparing: select u.* , a.id as a_id ,a.contact,a.addressDesc,a.tel,a.postCode from smbms_user u,smbms_address a where u.id=a.userId and u.id=?   (BaseJdbcLogger.java:145) 
DEBUG 12-17 18:17:08,158 ==> Parameters: 4(Integer)  (BaseJdbcLogger.java:145) 
org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: org.apache.ibatis.reflection.ReflectionException: Could not set property 'addressDesc' of 'class com.smbms.entities.Address' with value 'gd_sz_baoan' Cause: org.apache.ibatis.reflection.ReflectionException: There is no setter for property named 'addressDesc' in 'class com.smbms.entities.Address'
### The error may exist in com/smbms/dao/UserMapper.xml
### The error may involve com.smbms.dao.UserMapper.getAddressListByUserId
### The error occurred while handling results
### SQL: select u.* , a.id as a_id ,a.contact,a.addressDesc,a.tel,a.postCode   from smbms_user u,smbms_address a     where u.id=a.userId and u.id=?
### Cause: org.apache.ibatis.reflection.ReflectionException: Could not set property 'addressDesc' of 'class com.smbms.entities.Address' with value 'gd_sz_baoan' Cause: org.apache.ibatis.reflection.ReflectionException: There is no setter for property named 'addressDesc' in 'class com.smbms.entities.Address'
	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:150)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141)
	at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:137)
	at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:75)
	at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:53)
	at com.sun.proxy.$Proxy4.getAddressListByUserId(Unknown Source)
	at com.smbms.entities.UserTest.test12(UserTest.java:309)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: org.apache.ibatis.reflection.ReflectionException: Could not set property 'addressDesc' of 'class com.smbms.entities.Address' with value 'gd_sz_baoan' Cause: org.apache.ibatis.reflection.ReflectionException: There is no setter for property named 'addressDesc' in 'class com.smbms.entities.Address'
	at org.apache.ibatis.reflection.wrapper.BeanWrapper.setBeanProperty(BeanWrapper.java:185)
	at org.apache.ibatis.reflection.wrapper.BeanWrapper.set(BeanWrapper.java:59)
	at org.apache.ibatis.reflection.MetaObject.setValue(MetaObject.java:140)
	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.applyPropertyMappings(DefaultResultSetHandler.java:438)
	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getRowValue(DefaultResultSetHandler.java:860)
	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.applyNestedResultMappings(DefaultResultSetHandler.java:907)
	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getRowValue(DefaultResultSetHandler.java:862)
	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleRowValuesForNestedResultMap(DefaultResultSetHandler.java:825)
	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleRowValues(DefaultResultSetHandler.java:311)
	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSet(DefaultResultSetHandler.java:286)
	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSets(DefaultResultSetHandler.java:183)
	at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64)
	at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)
	at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63)
	at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324)
	at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)
	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:83)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148)
	... 29 more
Caused by: org.apache.ibatis.reflection.ReflectionException: There is no setter for property named 'addressDesc' in 'class com.smbms.entities.Address'
	at org.apache.ibatis.reflection.Reflector.getSetInvoker(Reflector.java:401)
	at org.apache.ibatis.reflection.MetaClass.getSetInvoker(MetaClass.java:168)
	at org.apache.ibatis.reflection.wrapper.BeanWrapper.setBeanProperty(BeanWrapper.java:177)
	... 47 more

解决:原来是定义的实体类没有给对应变量--setter方法,Mybatis的配置文件是通过访问setter方法来访问对象下的属性,所以实体类必须要有属性setter方法。

补充:
	private String AddressDesc;
	
	
	public String getAddressDesc() {
		return AddressDesc;
	}
	public void setAddressDesc(String addressDesc) {
		AddressDesc = addressDesc;
	}



17、Nimble 包开发与并行编程指南 本文介绍了Nimble包的开发与版本管理流程,涵盖语义化版本控制规范及发布步骤;深入探讨了Nim中的并行编程基础,包括并发与并行的区别、threads模块与threadpool模块的使用方法及其差异;分析了线程执行的不确定性、线程池的优势,并提供了线程同步和资源管理的实践示例,帮助开发者高效构建稳定、高性能的Nim应用程序。 阅读详情

相关推荐

cadence capture CIS 之使用access创建数据库(.mdb)

cadence capture CIS 之使用access创建数据库(.mdb)准备工作新建数据库 准备工作 1、一台电脑; 2、安装 Microsoft access database; 新建数据库 打开你准备创建数据库的位置,右键单击——》新建——》 Microsoft access database(注意:文件格式要选*.mdb) 打开数据库文件,创建——》表; 对数据表进行编辑,编辑表头、编辑表的内容、增加表的数量; 编辑表头:选中要编辑的表——》表设计 编辑内容:类似于excel添

weixin_42256550的博客 3147

Caused by: org.apache.ibatis.reflection.ReflectionException: Could not set property ‘id‘ of ‘class

问题描述 Caused by: org.apache.ibatis.reflection.ReflectionException: Could not set property ‘id’ of ‘class XXX’ with value ‘XXX’ Cause: java.lang.IllegalArgumentException: argument type mismatch 这是mybatis保存数据时报的一个错,跟着源码找了一下原因。如下: 因为mybatis的全局配置com.baomidou.my

alwaysBrother的博客 4173

VS2022离线安装总闪退?可能是这个--noWeb参数没加对(完整参数指南)

本文深入解析了VS2022离线安装过程中常见的闪退问题,指出核心原因往往在于命令行参数使用不当,特别是`--noWeb`参数。文章提供了完整的参数使用指南和实战解决方案,包括证书处理、安装器文件修复及自动化脚本,帮助用户彻底解决离线部署中的验证失败与闪退难题。

weixin_28842269的博客 758

org.apache.ibatis.reflection.ReflectionException: Could not set property

org.apache.ibatis.exceptions.PersistenceException:  ### Error querying database.  Cause: org.apache.ibatis.reflection.ReflectionException: Could not set property 'femaleHealthForm' of 'class com.ss.le...

ss的博客 1万+

VideoPose3d:环境搭建+制作自己的视频

论文链接:3D human pose estimation in video with temporal convolutions and semi-supervised training 代码链接:https://github.com/facebookresearch/VideoPose3D 环境搭建:ubuntu20.04+pytorch1.8+cuda10.2+python3.6+anaconda 1.启动anaconda环境 新建环境命令: conda create -n pytorc.

willbetter01的博客 4938

【中项第三版】系统集成项目管理工程师 | 第 1 章 信息化发展

【中项第三版】系统集成项目管理工程师 | 第 1 章 信息化发展

静谧、淡雅 6576

解决:Caused by: org.apache.ibatis.reflection.ReflectionException

Caused by: org.apache.ibatis.reflection.ReflectionException: Could not set property 'sellPoint' of 'class com.****.pojo.TbItem' with value '清仓!仅北京,武汉仓有货!' Cause: org.apache.ibatis.reflection.Reflecti...

qq_42795915的博客 6997

11、系统稳定性分析与李雅普诺夫函数的应用

本文深入探讨了李雅普诺夫函数在系统稳定性分析中的核心作用,重点介绍了时变与时不变系统的稳定性判据差异,以及巴尔巴拉特引理在处理非自治系统中的应用。文章还阐述了正线性系统与严格正实传递函数的性质及其在非线性控制系统中的重要性,并展示了李雅普诺夫函数在评估主导时间常数和设计快速干扰抑制控制策略方面的实际应用。通过具体示例和流程图,系统地总结了李雅普诺夫方法在稳定性分析、性能评估与控制器设计中的多维度价值,同时指出了当前挑战与未来发展方向。

Jerry的专栏 93

错误类型:reflection.ReflectionException: Could not set property ‘xxx‘ of ‘class ‘xxx‘ with value ‘xxx‘

MyBatis错误提示:Could not set property 'xxx' of 'class 'xxx' with value 'xxx'

lemonzjk的博客 2750

Python爬虫教程:抓取地方政府网站的公开文件与政策信息

Web爬虫是指一种自动化脚本,用于模拟人类浏览器访问网页、提取网页内容的数据抓取工具。发送请求到目标网页;获取网页内容;解析网页内容,提取所需数据;将数据保存或进一步处理。爬虫可以抓取各种形式的数据,如文本、图片、文件等。本教程将重点展示如何抓取地方政府网站上公开的政策文件、公告等信息。许多政府网站都会采取一定的反爬虫措施,防止大量数据被爬取。IP封锁:如果短时间内大量请求来自同一IP,可能会被封锁。验证码:一些网站会使用验证码来验证访问者是否为机器人。动态加载。

2201_76125261的博客 1981

【读代码】从claude skills到superpowers项目

最近claude skills成了大热门,今天一起看下GitHub 上的开源技能框架,他将“工作流”封装为“技能” (Skills)。本文尝试剖析该项目的技能粒度定义、多技能关联架构、应用逻辑等。与传统的 Function Calling 不同,Superpowers 中的 Skill 定义粒度并非“原子操作”,而是**“认知模式” (Cognitive Mode) 或“工作阶段”**。

kakaZhui的博客 1921

Mybatis 一对多映射报错Cause: org.apache.ibatis.reflection.ReflectionException: Could not set property

做一个mybatis的一对多demo的时候,出现的错误,整了很久,整理如下 错误日志: org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.apache.ibatis.reflection.ReflectionException: Could not set ...

天雨的博客 8450

在轻量化与精度之间取得平衡:YOLOv8 + GhostNet 的设计与实验分析

摘要: GhostNet系列(GhostNet、GhostNetv2、GhostNeXt)通过“幽灵特征图”技术,以极低计算量生成丰富特征,为YOLOv8提供轻量化改造方案。该技术能在减少参数量与计算量的同时保持或提升检测精度,适用于边缘设备部署。实现时需替换YOLOv8的Backbone为GhostNet模块,并通过消融实验验证其有效性。实验数据表明,改造后的模型在参数量降低30%的同时,推理速度提升28.6%,mAP@0.5最高提升1.9个百分点,平衡了轻量化与精度,为毕设提供技术创新性与工程落地性的双

m0_64661770的博客 194

java反射异常

今天再用mybatis的时候遇到一个报错,报错日志如下: Caused by: org.apache.ibatis.reflection.ReflectionException: Could not set property 'id' of 'class cn.********.entity.StrategyLog' with value '1347375749591900162' Cause: java.lang.IllegalArgumentException: argument type misma

qq_34239851的博客 889

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

VC中sqlite的使用

在VC中对sqlite的使用,实现数据库大批数据的快速插入,读取数据库中的数据在ListCtrl中显示

java:org.apache.ibatis.reflection.ReflectionException 解决记录

这个问题是maven多模块项目,在本地调式通,在服务器上部署时出现的问题,由于在下功力 尚浅,耗费了一天时间才解决。 Caused by: org.apache.ibatis.reflection.ReflectionException: Could not set property 'companyPermitTime' of 'class com.***.***.CompanyCertification' with value '2031年03月23日' Cause: org.apache.ib.

自由自在的博客 2170

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

Caused by: org.apache.ibatis.reflection.ReflectionException: Could not set property id of class

数据库自增长了,实体类没加自增长注解 就这样子解决了,其实我认为跟自增长没关系, 关键还是必须加@TableId这个注解

Jaeger_Java的博客 1185

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

MyBatis一对多,多对一关系 = Exception: Could not set property

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: Could not set property1.错误提示2.association和collection的区别 1.错误提示 Caused by: org.apache.ib...

Jack魏 1653

错误:Cause: org.apache.ibatis.reflection.ReflectionException: Could not set property ‘username‘ of ‘cl

错误:Cause: org.apache.ibatis.reflection.ReflectionException: Could not set property ‘username’ of ‘class cn.itcast.domain.Order’ with value ‘zhangsan’ Cause: org.apache.ibatis.reflection.ReflectionException: There is no setter for property named ‘username’

m0_54639263的博客 1094

Caused by: org.apache.ibatis.reflection.ReflectionException: There is no setter for property named ‘

SpringBoot完整报错: 2021-12-02 15:03:53.740 ERROR 19276 --- [nio-8081-exec-4] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception org.mybatis.spring.MyBatisSystemException: nest..

qq_42416602的博客 2014

MyBatis报错nested exception is org.apache.ibatis.reflection.ReflectionException: Could not set proper

已解决 项目报错 nested exception is org.apache.ibatis.reflection.ReflectionException: Could not set property ‘wid’ of ‘class com.XXX.entity.XXX’ with value ‘7’ Cause: org.apache.ibatis.reflection.ReflectionException: There is no setter for property named ...

qq_48435967的博客 7705

Cause: org.apache.ibatis.reflection.ReflectionException: Could not set property 'orderdetails' of 'c...

从上面异常的解释来看是因为反射不能将Orders设置到orderdetails属性上,仔细检查了MyBatis的配置文件,发现: 1 <collection property="orderdetails" javaType="com.luchao.mybatis.first.po.Orderdetail"> 2 <result column="id...

weixin_34174105的博客 412

MyBatis Could not set property ‘xxx‘ of ‘class xxx‘ with value ‘xxx‘;argument type mismatch问题解决

问题描述: Caused by: org.apache.ibatis.reflection.ReflectionException: Could not set property 'userId' of 'class UserDto' with value '123' Cause: java.lang.IllegalArgumentException: argument type mismatch 问题分析: 1、Mapper文件中的userId类型为String,但是实体类userId类型为Long

旭东怪的博客 1587

解决:mybatis报错: java.lang.IllegalArgumentException: argument type mismatch (异常: 参数类型不匹配)

Caused by: org.apache.ibatis.reflection.ReflectionException: Could not set property 'phones' of 'class com.qfedu.entity.User' with value 'Phone(id=8, uid=0, brand=苹果, title=Air, price=5555.0)' Cause: java.lang.IllegalArgumentException: argument type mismat

weixin_46061554的博客 4666

Java - MyBatis

一.JDBC的缺点1、 数据库连接创建、释放频繁造成系统资源浪费,从而影响系统性能。如果使用数据库连接池可解决此问题。 2、 Sql语句在代码中硬编码,造成代码不易维护,实际应用中sql变化的可能较大,sql变动需要改变java代码。 3、 使用preparedStatement向占有位符号传参数存在硬编码,因为sql语句的where条件不一定,可能多也可能少,修改sql还要修改代码,系统

samuelandkevin的专栏 508

使用mybatisplus的insert方法报错:org.apache.ibatis.reflection.ReflectionException: Could not set property

使用mybatisplus的insert方法报错:org.apache.ibatis.reflection.ReflectionException: Could not set property ‘id’ of ‘class com.beyond.core.web.role.entity.Role’ with value ‘1392351105974304770’ Cause: java.lang.IllegalArgumentException: argument type mismatch 错误原因:

faith_kunyi的博客 1184

Could not set property ‘id‘ java错误

16:20:14.275 [http-nio-8080-exec-46] ERROR c.r.f.w.e.GlobalExceptionHandler - [handleRuntimeException,69] - 请求地址'/scm/marketOrder/list',发生未知异常.因为实体类没有对属性添加get和set方法。当数据库为空时,不会报错,有数据时才会报错。

qq_63697528的博客 3124
上一篇: FAQ(16):Parameter 'userRole' not found. Available parameters are [UserRole, param1]
下一篇: FAQ(18):org.apache.ibatis.reflection.ReflectionException: Could not set property 'username' of 'clas
后台技术汇
博客等级 码龄11年 670粉丝 531原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

后台技术汇

对你的帮助,是对我的最好鼓励。

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值