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

JsonMappingException Upon FeedOperations.getPost( contentId ) Invocation

    XMLWordPrintable

    Details

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

      Description

      This code, which worked on 1.1.0.RELEASE, is now throwing a JsonMappingException:

      FeedOperations fo = api.feedOperations();
      String contentId = "xyz"; // represents a photo post on a Facebook Page
      Post post = fo.getPost( contentId );
      
      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:1056)
              at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:136)
              at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:123)
              at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:464)
              at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:107)
              at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:295)
              at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:121)
              at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:464)
              at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:107)
              at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:295)
              at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:121)
              at com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:1216)
              at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:830)
              at org.springframework.social.facebook.api.impl.FeedTemplate.deserializePost(FeedTemplate.java:297)
              ... 82 more
      

        Attachments

          Activity

            People

            Assignee:
            habuma Craig Walls
            Reporter:
            flyby123 Alex Duff
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: