Postman passing Josn field error: Cannot deserialize instance of java.util.ArrayList<java.lang.Object>
out of VALUE_STRING token
- problem:
2021-08-02 10:15:07.816 ERROR 9796 — [nio-8082-exec-6] c.y.c.b.e.GlobalExceptionHandler : /training/add : JSON parse error: Cannot deserialize instance of
java.util.ArrayList<java.lang.Object>
out of VALUE_STRING token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance ofjava.util.ArrayList<java.lang.Object>
out of VALUE_STRING token
at [Source: (PushbackInputStream); line: 9, column: 20] (through reference chain: com.yun.cloud.gap.entity.request.record.EmployeeTrainingRequest[“trainingUrls”]) - Reason: At this point in the data mapping process, the data types are not compatible so that errors are made when converting to each other. So we just need to change the format to an array “[“value1”, “value2″,…]”, as shown below.
Similar Posts:
- Can not deserialize instance of java.lang.String out of START_OBJECT token
- [Solved] net.sf.json.JSONException: java.lang.ClassCastException: JSON keys must be strings.
- Convert Object to List>, avoiding Unchecked cast: ‘java.lang.Object’ to ‘java.util.List
- ArrayList reported an error: Unsupported operationexception
- [Solved] mapper.xml Error: java.lang.AbstractMethodError: Method oracle/jdbc/driver/OracleResultSetImpl.getNString(Ljava/lang/String;)Ljava/lang/String; is abstract,
- [Solved] IllegalArgumentException: object is not an instance of declaring class
- [Solved] com.fasterxml.jackson.core.JsonParseException: Illegal unquoted character ((CTRL-CHAR, code 10)): ha
- Java container — unsupported operation exception
- How to Solve Java Error: java.util.Arrays$ArrayList cannot be cast to java.util.ArrayList
- [Solved] Arrays.asList() Error: java.lang.UnsupportedOperationException