Uploaded image for project: 'Spring Social Facebook'
  1. Spring Social Facebook
  2. SOCIALFB-153

V2 API - FeedOperations.getFeed() throws exception deserializing photo post

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 2.0.0.M1
    • Fix Version/s: 2.0.0.RC1
    • Component/s: API Binding
    • Labels:
      None

      Description

      The following issue occurs in 2.0.0.M1 and I've tested the same in 1.x and it works fine.

      Code that generated problem.

              PagedList<Post> posts = facebook.feedOperations().getFeed("JimsMowingAU");
      

      Exception:

      org.springframework.social.UncategorizedApiException: Error deserializing photo post
      	at org.springframework.social.facebook.api.impl.FeedTemplate.deserializePost(FeedTemplate.java:299)
      	at org.springframework.social.facebook.api.impl.FeedTemplate.deserializeList(FeedTemplate.java:275)
      	at org.springframework.social.facebook.api.impl.FeedTemplate.getFeed(FeedTemplate.java:78)
      	at org.springframework.social.facebook.api.impl.FeedTemplate.getFeed(FeedTemplate.java:72)
      	... (my company classes and intellij/junit used to kick them off) ...
      
      Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not instantiate value of type [simple type, class org.springframework.social.facebook.api.Post$Privacy] from String value (''); no single-String constructor/factory method (through reference chain: org.springframework.social.facebook.api.Post["privacy"]->org.springframework.social.facebook.api.Privacy["value"])
      	at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator._createFromStringFallbacks(StdValueInstantiator.java:428)
      	at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromString(StdValueInstantiator.java:299)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromString(BeanDeserializerBase.java:1150)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:139)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:126)
      	at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:525)
      	at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:106)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:242)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:118)
      	at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:525)
      	at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:106)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:242)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:118)
      	at com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:1270)
      	at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:897)
      	at org.springframework.social.facebook.api.impl.FeedTemplate.deserializePost(FeedTemplate.java:297)
      	... 37 more
      

        Attachments

          Activity

            People

            Assignee:
            habuma Craig Walls
            Reporter:
            mbyrne00 Matt Byrne
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: