0

我计划使用 java Spring boot 将我的嵌套 Json 文件存储到 postgres db 但是嵌套的 json 数组部分抛出一个错误,我该怎么做才能解决这个错误

错误是

  Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 2 out of bounds for length 2
at org.hibernate.type.ComponentType.deepCopy(ComponentType.java:504) ~[hibernate-core-5.4.32.Final.jar:5.4.32.Final]
at org.hibernate.type.ComponentType.deepCopy(ComponentType.java:504) ~[hibernate-core-5.4.32.Final.jar:5.4.32.Final]
at org.hibernate.type.ComponentType.deepCopy(ComponentType.java:504) ~[hibernate-core-5.4.32.Final.jar:5.4.32.Final]
at org.hibernate.type.ComponentType.deepCopy(ComponentType.java:504) ~[hibernate-core-5.4.32.Final.jar:5.4.32.Final]
at org.hibernate.type.ComponentType.deepCopy(ComponentType.java:504) ~[hibernate-core-5.4.32.Final.jar:5.4.32.Final]
at org.hibernate.type.TypeHelper.deepCopy(TypeHelper.java:55) ~[hibernate-core-5.4.32.Final.jar:5.4.32.Final]

我的 Json 结构是

[{
        "basicInfo": {
           "uniqueFileNo": "xxx",
           "actualOrgid": "3",
           "tRefNo": "xxx",
           "tType": "xxx",
           "tFormContract": "Works",
           "tNoOfCovers": "2",
           "tTenderCategory": "xxx",
           "tNoOfBidOpeners": "xxx",
           "tAllowAutomaticEvaluation": "false",
           "tAllowMultiCurrencyForBoq": "false",
           "creatorName": "xxx",
           "creatorReference": "xxx"
        },
        "multiCurrencyForBoq": "",
        "boqinfo": "",
        "coverinfo": {
           "cover": [
              {
                 "tCoverNo": "1",
                 "tDocDesc": "xxx",
                 "tDocType": "xxx"
              },
              {
                 "tCoverNo": "2",
                 "tDocDesc": "xxx",
                 "tDocType": "mmm"
              }
           ]
        }
     }]

如何修复此错误

4

0 回答 0