You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
报错如下: Exception in thread "main" java.lang.NumberFormatException: For input string: "2020-06-30T13:24Z"
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.base/java.lang.Long.parseLong(Long.java:692)
at java.base/java.lang.Long.valueOf(Long.java:1144)
at com.aliyuncs.transform.UnmarshallerContext.longValue(UnmarshallerContext.java:31)
at com.aliyuncs.sas.transform.v20181203.DescribePropertySoftwareDetailResponseUnmarshaller.unmarshall(DescribePropertySoftwareDetailResponseUnmarshaller.java:46)
at com.aliyuncs.sas.model.v20181203.DescribePropertySoftwareDetailResponse.getInstance(DescribePropertySoftwareDetailResponse.java:226)
at com.aliyuncs.sas.model.v20181203.DescribePropertySoftwareDetailResponse.getInstance(DescribePropertySoftwareDetailResponse.java:26)
at com.aliyuncs.DefaultAcsClient.readResponse(DefaultAcsClient.java:364)
at com.aliyuncs.DefaultAcsClient.parseAcsResponse(DefaultAcsClient.java:201)
at com.aliyuncs.DefaultAcsClient.getAcsResponse(DefaultAcsClient.java:117)
at com.company.Main.main(Main.java:151)_
_
由 OpenAPI Explorer自动生成
报错如下:
Exception in thread "main" java.lang.NumberFormatException: For input string: "2020-06-30T13:24Z"
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.base/java.lang.Long.parseLong(Long.java:692)
at java.base/java.lang.Long.valueOf(Long.java:1144)
at com.aliyuncs.transform.UnmarshallerContext.longValue(UnmarshallerContext.java:31)
at com.aliyuncs.sas.transform.v20181203.DescribePropertySoftwareDetailResponseUnmarshaller.unmarshall(DescribePropertySoftwareDetailResponseUnmarshaller.java:46)
at com.aliyuncs.sas.model.v20181203.DescribePropertySoftwareDetailResponse.getInstance(DescribePropertySoftwareDetailResponse.java:226)
at com.aliyuncs.sas.model.v20181203.DescribePropertySoftwareDetailResponse.getInstance(DescribePropertySoftwareDetailResponse.java:26)
at com.aliyuncs.DefaultAcsClient.readResponse(DefaultAcsClient.java:364)
at com.aliyuncs.DefaultAcsClient.parseAcsResponse(DefaultAcsClient.java:201)
at com.aliyuncs.DefaultAcsClient.getAcsResponse(DefaultAcsClient.java:117)
at com.company.Main.main(Main.java:151)_
经查看 SDK com.aliyuncs.sas.model.v20181203 DescribePropertySoftwareDetailResponse 类定义
其中 create 为 Long,但通过 OpenAPI Explorer 测试结果来看返回的数据如下
"Propertys": [
{
"Path": "/etc/docker",
"InstanceName": "数据脱敏",
"Uuid": "数据脱敏",
"InternetIp": "",
"InstallTime": "2019-08-30 04:00:54",
"Version": "1.13.1",
"InstanceId": "数据脱敏",
"Create": "2020-06-30T13:24Z",
"Ip": "数据脱敏",
"CreateTimestamp": 1593494653000,
"IntranetIp": "数据脱敏",
"Name": "docker"
},
可以看到 Create 返回的是一个字符串形式的UTC时间,导致 DescribePropertySoftwareDetailResponse 数据类型转换出错。
The text was updated successfully, but these errors were encountered: