Announcement Announcement Module
Collapse
No announcement yet.
Error retrieving posts from the Facebook "platform" page. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error retrieving posts from the Facebook "platform" page.

    So I am getting this error when trying to access the feed posts on the Facebook "platform" page. Here is the example code and the exception. This error occurs on both milestone 3 and the latest snapshots.

    Facebook facebook = new FacebookTemplate();
    List<Post> posts = facebook.feedOperations().getFeed("platform");


    Exception in thread "main" org.springframework.web.client.ResourceAccessExcep tion: I/O error: (was java.lang.NullPointerException) (through reference chain: org.springframework.social.facebook.api.LinkPost["comments"]); nested exception is org.codehaus.jackson.map.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: org.springframework.social.facebook.api.LinkPost["comments"])
    at org.springframework.web.client.RestTemplate.doExec ute(RestTemplate.java:453)
    at org.springframework.web.client.RestTemplate.execut e(RestTemplate.java:415)
    at org.springframework.web.client.RestTemplate.getFor Object(RestTemplate.java:213)
    at org.springframework.social.facebook.api.impl.Faceb ookTemplate.fetchConnections(FacebookTemplate.java :189)
    at org.springframework.social.facebook.api.impl.Faceb ookTemplate.fetchConnections(FacebookTemplate.java :184)
    at org.springframework.social.facebook.api.impl.FeedT emplate.getFeed(FeedTemplate.java:43)
    at com.covario.cse.mapreduce.social.fetchers.facebook .FacebookPagePostFetcherTest.main(FacebookPagePost FetcherTest.java:101)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.intellij.rt.execution.application.AppMain.main (AppMain.java:115)
    Caused by: org.codehaus.jackson.map.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: org.springframework.social.facebook.api.LinkPost["comments"])
    at org.codehaus.jackson.map.JsonMappingException.wrap WithPath(JsonMappingException.java:218)
    at org.codehaus.jackson.map.JsonMappingException.wrap WithPath(JsonMappingException.java:183)
    at org.codehaus.jackson.map.deser.BeanDeserializer.wr apAndThrow(BeanDeserializer.java:856)
    at org.codehaus.jackson.map.deser.BeanDeserializer.de serialize(BeanDeserializer.java:396)
    at org.codehaus.jackson.map.deser.BeanDeserializer._d eserializeUsingPropertyBased(BeanDeserializer.java :613)
    at org.codehaus.jackson.map.deser.BeanDeserializer.de serializeFromObject(BeanDeserializer.java:472)
    at org.codehaus.jackson.map.deser.BeanDeserializer.de serialize(BeanDeserializer.java:368)
    at org.codehaus.jackson.map.jsontype.impl.AsPropertyT ypeDeserializer.deserializeTypedFromObject(AsPrope rtyTypeDeserializer.java:77)
    at org.codehaus.jackson.map.deser.AbstractDeserialize r.deserializeWithType(AbstractDeserializer.java:89 )
    at org.codehaus.jackson.map.deser.CollectionDeseriali zer.deserialize(CollectionDeserializer.java:122)
    at org.codehaus.jackson.map.deser.CollectionDeseriali zer.deserialize(CollectionDeserializer.java:97)
    at org.codehaus.jackson.map.deser.CollectionDeseriali zer.deserialize(CollectionDeserializer.java:26)
    at org.codehaus.jackson.map.deser.SettableBeanPropert y.deserialize(SettableBeanProperty.java:230)
    at org.codehaus.jackson.map.deser.BeanDeserializer._d eserializeUsingPropertyBased(BeanDeserializer.java :595)
    at org.codehaus.jackson.map.deser.BeanDeserializer.de serializeFromObject(BeanDeserializer.java:472)
    at org.codehaus.jackson.map.deser.BeanDeserializer.de serialize(BeanDeserializer.java:350)
    at org.codehaus.jackson.map.ObjectMapper._readMapAndC lose(ObjectMapper.java:2391)
    at org.codehaus.jackson.map.ObjectMapper.readValue(Ob jectMapper.java:1651)
    at org.springframework.http.converter.json.MappingJac ksonHttpMessageConverter.readInternal(MappingJacks onHttpMessageConverter.java:135)
    at org.springframework.http.converter.AbstractHttpMes sageConverter.read(AbstractHttpMessageConverter.ja va:154)
    at org.springframework.web.client.HttpMessageConverte rExtractor.extractData(HttpMessageConverterExtract or.java:74)
    at org.springframework.web.client.RestTemplate.doExec ute(RestTemplate.java:446)
    ... 11 more
    Caused by: java.lang.NullPointerException
    at org.codehaus.jackson.node.TreeTraversingParser.<in it>(TreeTraversingParser.java:72)
    at org.codehaus.jackson.map.ObjectMapper.treeAsTokens (ObjectMapper.java:1445)
    at org.codehaus.jackson.map.ObjectMapper.readValue(Ob jectMapper.java:1743)
    at org.springframework.social.facebook.api.impl.json. CommentListDeserializer.deserialize(CommentListDes erializer.java:39)
    at org.springframework.social.facebook.api.impl.json. CommentListDeserializer.deserialize(CommentListDes erializer.java:30)
    at org.codehaus.jackson.map.deser.SettableBeanPropert y.deserialize(SettableBeanProperty.java:230)
    at org.codehaus.jackson.map.deser.SettableBeanPropert y$FieldProperty.deserializeAndSet(SettableBeanProp erty.java:477)
    at org.codehaus.jackson.map.deser.BeanDeserializer.de serialize(BeanDeserializer.java:394)
    ... 29 more

  • #2
    Thanks for finding this bug. I've figured out what's going on here and have created https://jira.springsource.org/browse/SOCIAL-174 to address it. Should be fixed very soon.

    Comment

    Working...
    X