Some time ago, when we encountered such a problem in development, we reported the following error when a service called B service:
error while extracting response for type [Java. Util. List & lt; java.util.Map< java.lang.String, java.lang.Object>& gt;] and content type [application/json; charset=UTF-8]; nested exception is org.springframework.http.converter.HttpMessageNotReadableException: Invalid JSON input: Cannot deserialize instance of java.util.ArrayList< java.util.Map< java.lang.String,java.lang.Object>& gt;
out of START_ OBJECT token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of java.util.ArrayList< java.util.Map< java.lang.String,java.lang.Object>& gt;
out of START_ OBJECT token\n at [Source: (PushbackInputStream); Line: 1, column: 1]
the red arrow is the code for service a to call service B. at that time, I searched Baidu online for a long time, and most of them said that there was a configuration problem. However, combined with the configuration posted by online friends, and then compared with the configuration of our service, we found no problem in the configuration of our service, Finally, through continuous debugging test and troubleshooting, we can eliminate all possible causes of this kind of bug. Finally, we lock the target to the response of the red arrow in the second picture. At the beginning, response = apiresult.class is a fixed return JSON lattice that we encapsulate, At that time, I didn’t doubt that this problem was caused by the annotation of swarge, which should not affect the returned result. But later, I changed the returned result to * * response = list. Class * * and the problem was solved
![]( https://img-blog.csdnimg.cn/20210627145852589.png?x-oss-process=image/watermark ,type_ ZmFuZ3poZW5naGVpdGk,shadow_ 10,text_ aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQyMzYzNTA2,size_ 16,color_ FFFFFF,t_ 70
Read More:
- Typeerror: object of type ‘response’ has no len() why?
- Response code: Sampler error: unexpected frame type (binary).
- JS Ajax request is successful, the response displays “failed to load response data”
- JMeter running error response code: non HTTP response code: java.lang.illegalargumentexception find and solve
- Extracting the first X lines of a file with Linux
- docker Error response from daemon: Bad response from Docker engine
- Windows encountered 1152 when installing software: error extracting files to the temporary location
- There is a problem decompressing the zip file: an error occurred while extracting files
- Error type referred to is not an annotation type:RedisCache
- Getoutputstream() has already been called for this response
- Type definition error – one of the causes of type definition errors is WM in Oracle_ Concat function usage
- Es error mapper of different type, current_ Type “text” solution
- On the usage of ‘ref.stor.type search’ field in SAP WM movement type
- Error: property ‘TZ’ does not exist on type ‘type of moment’
- After introducing sass into Vue project, start to report error typeerror [err]_ INVALID_ ARG_ Type]: the “path” argument must be of type string
- Error tips:array type has incomplete element type
- Type error: cannot unpack non Iterable non type object appears when starting Bert server in Ubuntu system
- array type has an incomplete element type
- Unity Error:InvalidCastException: Cannot cast from source type to destination type.
- Error: (22,57) Java: type parameter… Mapper is not in the range of type variable M