简体   繁体   English

如何修复org.hibernate.PropertyAccessException:无法通过反射设置器设置字段值

[英]How to fix org.hibernate.PropertyAccessException: Could not set field value value by reflection setter of

Well-known code works in the console application, but does not work in the boot string. 众所周知的代码在控制台应用程序中有效,但在启动字符串中无效。

IllegalArgumentException occurred while calling setter for property 
[by.smirnova.myweb.entity.ProductName.id (expected type = 
java.lang.Long)]; target = 
[by.smirnova.myweb.entity.ProductName@4942fb65], property value = [38]

https://github.com/Aliaksandr3by/myweb/blob/master/src/main/java/by/smirnova/myweb/entity/ProductName.java https://github.com/Aliaksandr3by/myweb/blob/master/src/main/java/by/smirnova/myweb/entity/ProductName.java

在此处输入图片说明

The error was caused by "runtimeClasspath" in "build.gradle" 该错误是由“ build.gradle”中的“ runtimeClasspath”引起的

configurations {
    developmentOnly
//  runtimeClasspath {
//        extendsFrom developmentOnly
//    }
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用ManyToOne获取org.hibernate.PropertyAccessException的JPA Composite键:无法通过反射设置器设置字段值 - JPA Composite key with ManyToOne getting org.hibernate.PropertyAccessException: could not set a field value by reflection setter of org.hibernate.PropertyAccessException:无法通过反射getter获取字段值 - org.hibernate.PropertyAccessException: could not get a field value by reflection getter of Hibernate & Spring - org.hibernate.PropertyAccessException: 无法通过反射设置字段值 [1] 值 - Hibernate & Spring - org.hibernate.PropertyAccessException: Could not set field value [1] value by reflection org.hibernate.PropertyAccessException: 无法通过反射为 String 设置字段值 [STRING] 值 - org.hibernate.PropertyAccessException: Could not set field value [STRING] value by reflection for String org.hibernate.PropertyAccessException:无法使用复合键设置字段值 - org.hibernate.PropertyAccessException: Could not set field value with Composite Key 嵌套的异常是org.hibernate.PropertyAccessException:无法设置字段值 - nested exception is org.hibernate.PropertyAccessException: Could not set field value 错误:-org.hibernate.PropertyAccessException:无法通过反射获取器获取字段值 - Error :- org.hibernate.PropertyAccessException: could not get a field value by reflection getter 在连接表和hibernate.PropertyAccessException中映射值:无法通过反射设置器设置字段值 - Mapping Value in Junction Table & hibernate.PropertyAccessException: could not set a field value by reflection setter org.hibernate.PropertyAccessException-如何从数据库中获取空值? - org.hibernate.PropertyAccessException - How to get a null value out of database? org.hibernate.PropertyAccessException:空值已分配给布尔类型的属性 - org.hibernate.PropertyAccessException: Null value was assigned to a property of boolean type
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM