SpringSource/spring-social-facebook — Issue #2: Error Fetching Status Entries
Author: watsoncj
Created: 2011-10-17 04:53:59+00:00
State: open

Hello,

I'm very impressed with the plugin so far. It seems very complete and I have had excellent luck with it.

I ran into an issue this evening with the `getStatuses(userId)` method.

```
def facebook = new FacebookTemplate(accessToken)
println facebook.feedOperations().getStatuses(userId)
```

```
org.quartz.JobExecutionException [See nested exception: java.lang.NullPointerException]
at org.codehaus.groovy.grails.plugins.quartz.GrailsJobFactory$GrailsTaskClassJob.execute(GrailsJobFactory.java:81)
at org.quartz.core.JobRunShell.run(JobRunShell.java:199)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:546)
Caused by: java.lang.NullPointerException
at org.springframework.social.facebook.api.impl.json.PostMixin$LikesCountDeserializer.deserialize(PostMixin.java:130)
at org.springframework.social.facebook.api.impl.json.PostMixin$LikesCountDeserializer.deserialize(PostMixin.java:126)
at org.codehaus.jackson.map.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:252)
at org.codehaus.jackson.map.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:620)
at org.codehaus.jackson.map.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:472)
at org.codehaus.jackson.map.deser.BeanDeserializer.deserialize(BeanDeserializer.java:368)
at org.codehaus.jackson.map.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:77)
at org.codehaus.jackson.map.deser.BeanDeserializer.deserializeWithType(BeanDeserializer.java:423)
at org.codehaus.jackson.map.deser.StdDeserializerProvider$WrappedDeserializer.deserialize(StdDeserializerProvider.java:460)
at org.codehaus.jackson.map.ObjectMapper._readValue(ObjectMapper.java:2376)
at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1731)
at org.springframework.social.facebook.api.impl.FeedTemplate.deserializePost(FeedTemplate.java:274)
at org.springframework.social.facebook.api.impl.FeedTemplate.deserializeList(FeedTemplate.java:260)
at org.springframework.social.facebook.api.impl.FeedTemplate.getStatuses(FeedTemplate.java:99)
at org.springframework.social.facebook.api.impl.FeedTemplate.getStatuses(FeedTemplate.java:93)
at org.springframework.social.facebook.api.FeedOperations$getStatuses.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
at iforce.FacebookJob.execute(FacebookJob.groovy:42)
at sun.reflect.GeneratedMethodAccessor530.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:186)
at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:171)
at org.codehaus.groovy.grails.plugins.quartz.GrailsJobFactory$GrailsTaskClassJob.execute(GrailsJobFactory.java:77)
... 2 more
```

I found the same issue on this thread as well:
http://forum.springsource.org/showthread.php?114901-NullPointer-to-get-status-from-Facebook

Is there any additional information I should provide to help debug this?

Cheers,
Casey