Tried to assign property OutStationNo:java.lang.Integer to bean of class
来源:互联网 发布:四川校校通网络平台 编辑:程序博客网 时间:2024/06/10 03:20
net.sf.json.JSONObject net.sf.json.JSONObject.toBean(JSONObject.java:431) - Tried to assign property OutStationNo:java.lang.Integer to bean of class com.newsoft.roadService.po.FeeVOnet.sf.json.JSONObject net.sf.json.JSONObject.toBean(JSONObject.java:431) - Tried to assign property VehClassNo:java.lang.Integer to bean of class com.newsoft.roadService.po.FeeVOnet.sf.json.JSONObject net.sf.json.JSONObject.toBean(JSONObject.java:431) - Tried to assign property WayTypeNo:java.lang.Integer to bean of class com.newsoft.roadService.po.FeeVO
今天偶然在调试程序的时候,偶然发现这个警告,同时还发现当json转换为bean对象时,发现上述报警告的这些值在对象中全部为空。
看了源码也找不到问题所在,后面发现与该对象中其他值唯一不同的地方就是开头字母大写了。(接口文档中规定第一个字母大写,故出现此种情况)
解决方案:
在研究该问题时,发现有两种解决方案
1、将该bean对象的首字母全部改为小写。
2、将该bean对象的首字母大写的后面几个单词改为大写(开头算起,连续的大写字母数量>1)
阅读全文
0 0
- Tried to assign property OutStationNo:java.lang.Integer to bean of class
- Cannot convert 0 of type class java.lang.Integer to class java.lang.Boolean
- Cannot assign value of type 'java.lang.String' to property 'file' of type 'org.apache.struts.upload.FormFile'
- AndroidRuntime: java.lang.IllegalAccessError: tried to access class android.content.res.StringBlock
- java.io.IOException: Tried to send an out-of-range integer as a 2-byte value
- Failed to convert property value of type [java.lang.String] to required type [boolean] for property
- Failed to convert property value of type 'java.lang.String' to required type 'int' for property
- 启动异常java.lang.IllegalAccessError: tried to access method DefaultSingletonBeanRegistry
- 项目启动报java.lang.IllegalAccessError: tried to access method
- nested exception is java.lang.IllegalAccessError: tried to access method net.sf.ehcache.CacheManager.()V from class org.hibernat
- java.lang.IllegalAccessError: tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFacto
- java.lang.IllegalAccessError: tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFacto
- Cannot convert 0:0 of type class java.lang.String to class java.lang.Long
- Cannot convert 临时用户 of type class java.lang.String to class java.lang.Long
- springmvc-- Failed to convert property value of type 'java.lang.String' to required type
- Failed to convert property value of type [java.lang.String] to required type [int]
- 表单提交时候"Failed to convert property value of type [java.lang.String] to
- more safe way to assign a property value of an object to a variable
- Python学习教程(一)——初步认识
- ObjectAnimation动画 + ValueAnimation动画监听
- 完成日期类的实现
- 使用SharedPreferences进行数据的存储实例:增删改查联系人界面
- test
- Tried to assign property OutStationNo:java.lang.Integer to bean of class
- 使用 MQTTnet 快速实现 MQTT 通信
- GouWu
- 趣图:为了说服经理重写代码
- java定时器-固定时间间隔内执行操作
- Sql- Group By ,having 分组查询
- ERROR TIMS-4236:“invalid value ‘20171024_02’ for bundle_version” at SoftwareAssets
- 无限轮播
- erlang 文件读写操作