引起:com.fasterxml.jackson.databind.JsonMappingException:无法从VALUE_STRING标记

时间:2016-03-03 13:27:23

标签: json rest jackson restful-architecture spring-restcontroller

目前我正在处理休息服务,同时消耗服务获取错误。

public String userName;
public String refernceNumber;  
public String requestType;  
public String fullName;  
public String dateOfBirth;  
public String placeOfBirth;  
public String gender;   
public String nationlaity;   
public String telphoneNo;  
public String mobileNo;  
public String note;  
public String email;  
public String processId;   
public List<DocumentDTO> attachmentsList; 

和我的documentdto就像

private String doumentNameEng;  
private Integer documentId;  
private String fileName;  
private MultipartFile attachment;  
private String ticketNo;
private String dmsRefId;

enter code here   

引起:com.fasterxml.jackson.databind.JsonMappingException:无法从VALUE_STRING标记中反序列化java.util.ArrayList的实例  在[来源:org.apache.catalina.connector.CoyoteInputStream@1171c8a3; line:1,column:233](通过引用链:com.micd.process.dto.applcation [“attachmentsList”])         at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:164)         在com.fasterxml.jackson.databind.DeserializationContext.mappingException(DeserializationContext.java:575)         at com.fasterxml.jackson.databind.DeserializationContext.mappingException(DeserializationContext.java:569)         at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.handleNonArray(CollectionDeserializer.java:259)         在com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:217)         在com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:207)         在com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:23)         at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:464)         at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:98)         at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:295)         在com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:121)         at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2888)         at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2094)         在org.springframework.http.converter.json.MappingJackson2HttpMessageConverter.readJavaType(MappingJackson2HttpMessageConverter.java:168)

帮我解决这个错误,无法理解这个错误。

0 个答案:

没有答案