Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 11th, 2013  |  syntax: None  |  size: 3.42 KB  |  views: 37  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. org.springframework.http.converter.HttpMessageNotReadableException: Could not read JSON: No suitable constructor found for type [simple type, class it.stasbranger.clinigomobile.model.Clinica]: can not instantiate from JSON object (need to add/enable type information?)
  2.  at [Source: libcore.net.http.ChunkedInputStream@41346758; line: 1, column: 3]; nested exception is org.codehaus.jackson.map.JsonMappingException: No suitable constructor found for type [simple type, class it.stasbranger.clinigomobile.model.Clinica]: can not instantiate from JSON object (need to add/enable type information?)
  3.  at [Source: libcore.net.http.ChunkedInputStream@41346758; line: 1, column: 3]
  4.        
  5. public class Clinica implements Parcelable {
  6.  
  7.         @JsonProperty
  8.         private Integer idclinica;
  9.         @JsonProperty
  10.         private String nome;
  11.         @JsonProperty
  12.         private Long dataRegistrazione;
  13.         @JsonProperty
  14.         private Long version;
  15.         @JsonProperty
  16.         private String referente;
  17.         @JsonProperty
  18.         private String indirizzo;
  19.         @JsonProperty
  20.         private String cap;
  21.         @JsonProperty
  22.         private String telefono;
  23.         @JsonProperty
  24.         private String email;
  25.         @JsonProperty
  26.         private String sitoWeb;
  27.         @JsonProperty
  28.         private Boolean abilitata;
  29.         @JsonProperty
  30.         private Integer valutazione;
  31.         @JsonProperty
  32.         private Double rank;
  33.         @JsonProperty
  34.         private String nomeFatturazione;
  35.  
  36.         //getters and setters
  37.             .......
  38.  
  39.         public Clinica (Parcel p){
  40.             boolean[] booleans = new boolean[1];
  41.  
  42.             this.cap=p.readString();
  43.             this.email=p.readString();
  44.             this.indirizzo=p.readString();
  45.             this.nome=p.readString();
  46.             this.nomeFatturazione=p.readString();
  47.             this.referente=p.readString();
  48.             this.sitoWeb=p.readString();
  49.             this.telefono=p.readString();
  50.  
  51.             this.idclinica=p.readInt();
  52.             this.valutazione=p.readInt();
  53.  
  54.             this.dataRegistrazione=p.readLong();
  55.             this.version=p.readLong();
  56.  
  57.             this.rank=p.readDouble();
  58.  
  59.             p.readBooleanArray(booleans);
  60.             this.abilitata=booleans[0];
  61.         }
  62.  
  63.         public int describeContents() {
  64.             return 0;
  65.         }
  66.  
  67.         public void writeToParcel(Parcel dest, int flags) {
  68.             boolean[] booleans = new boolean[1];
  69.             Arrays.fill(booleans, abilitata);
  70.             dest.writeString(cap);
  71.             dest.writeString(email);
  72.             dest.writeString(indirizzo);
  73.             dest.writeString(nome);
  74.             dest.writeString(nomeFatturazione);
  75.             dest.writeString(referente);
  76.             dest.writeString(sitoWeb);
  77.             dest.writeString(telefono);
  78.             dest.writeInt(idclinica);
  79.             dest.writeInt(valutazione);
  80.             dest.writeLong(dataRegistrazione);
  81.             dest.writeLong(version);
  82.             dest.writeDouble(rank);
  83.             dest.writeBooleanArray(booleans);
  84.         }
  85.  
  86.         public static final Parcelable.Creator<Clinica> CREATOR = new Creator<Clinica>() {
  87.  
  88.             public Clinica[] newArray(int size) {
  89.                 return new Clinica[size];
  90.             }
  91.  
  92.             public Clinica createFromParcel(Parcel source) {
  93.                 return new Clinica(source);
  94.             }
  95.         };
  96.  
  97.     }
  98.        
  99. ......
  100. Clinica data[] = restTemplate.getForObject(urls[0], Clinica[].class, vars);