Results 1 to 3 of 3

Thread: Exception when accessing Facebook Template

  1. #1
    Join Date
    Jan 2012
    Posts
    16

    Default Exception when accessing Facebook Template

    Hi there,

    we are trying to access some simple FacebookTemplate functions but failing gracefully with the following exception:


    Feb 25, 2012 5:16:20 PM org.apache.catalina.core.StandardWrapperValve invoke
    Schwerwiegend: Servlet.service() for servlet [dispatcher] in context with path [/helios] threw exception [Handler processing failed; nested exception is java.lang.NoSuchMethodError: org.codehaus.jackson.map.type.TypeFactory.defaultI nstance()Lorg/codehaus/jackson/map/type/TypeFactory;] with root cause
    java.lang.NoSuchMethodError: org.codehaus.jackson.map.type.TypeFactory.defaultI nstance()Lorg/codehaus/jackson/map/type/TypeFactory;
    at org.springframework.social.facebook.api.impl.Faceb ookTemplate.deserializeDataList(FacebookTemplate.j ava:269)
    at org.springframework.social.facebook.api.impl.Faceb ookTemplate.fetchConnections(FacebookTemplate.java :186)
    at org.springframework.social.facebook.api.impl.Faceb ookTemplate.fetchConnections(FacebookTemplate.java :179)
    at org.springframework.social.facebook.api.impl.LikeT emplate.getActivities(LikeTemplate.java:101)
    at org.springframework.social.facebook.api.impl.LikeT emplate.getActivities(LikeTemplate.java:96)
    at com.helios.web.controller.MainController.home(Main Controller.java:86)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.springframework.web.method.support.InvocableHa ndlerMethod.invoke(InvocableHandlerMethod.java:212 )
    at org.springframework.web.method.support.InvocableHa ndlerMethod.invokeForRequest(InvocableHandlerMetho d.java:126)
    at org.springframework.web.servlet.mvc.method.annotat ion.ServletInvocableHandlerMethod.invokeAndHandle( ServletInvocableHandlerMethod.java:96)
    at org.springframework.web.servlet.mvc.method.annotat ion.RequestMappingHandlerAdapter.invokeHandlerMeth od(RequestMappingHandlerAdapter.java:617)
    at org.springframework.web.servlet.mvc.method.annotat ion.RequestMappingHandlerAdapter.handleInternal(Re questMappingHandlerAdapter.java:578)
    at org.springframework.web.servlet.mvc.method.Abstrac tHandlerMethodAdapter.handle(AbstractHandlerMethod Adapter.java:80)
    at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:900)
    at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:827)
    at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:882)
    at org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:778)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:722)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:210)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 311)
    at org.springframework.security.web.access.intercept. FilterSecurityInterceptor.invoke(FilterSecurityInt erceptor.java:116)
    at org.springframework.security.web.access.intercept. FilterSecurityInterceptor.doFilter(FilterSecurityI nterceptor.java:83)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 323)
    at org.springframework.security.web.access.ExceptionT ranslationFilter.doFilter(ExceptionTranslationFilt er.java:113)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 323)
    at org.springframework.security.web.session.SessionMa nagementFilter.doFilter(SessionManagementFilter.ja va:101)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 323)
    at org.springframework.security.web.authentication.An onymousAuthenticationFilter.doFilter(AnonymousAuth enticationFilter.java:113)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 323)
    at org.springframework.security.web.servletapi.Securi tyContextHolderAwareRequestFilter.doFilter(Securit yContextHolderAwareRequestFilter.java:54)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 323)
    at org.springframework.security.web.savedrequest.Requ estCacheAwareFilter.doFilter(RequestCacheAwareFilt er.java:45)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 323)
    at org.springframework.security.web.authentication.Ab stractAuthenticationProcessingFilter.doFilter(Abst ractAuthenticationProcessingFilter.java:182)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 323)
    at org.springframework.security.web.authentication.lo gout.LogoutFilter.doFilter(LogoutFilter.java:105)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 323)
    at org.springframework.security.web.context.SecurityC ontextPersistenceFilter.doFilter(SecurityContextPe rsistenceFilter.java:87)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 323)
    at org.springframework.security.web.FilterChainProxy. doFilter(FilterChainProxy.java:173)
    at org.springframework.web.filter.DelegatingFilterPro xy.invokeDelegate(DelegatingFilterProxy.java:346)
    at org.springframework.web.filter.DelegatingFilterPro xy.doFilter(DelegatingFilterProxy.java:259)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:224)
    at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:169)
    at org.apache.catalina.authenticator.AuthenticatorBas e.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:98)
    at org.apache.catalina.valves.AccessLogValve.invoke(A ccessLogValve.java:928)
    at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.p rocess(AbstractHttp11Processor.java:987)
    at org.apache.coyote.AbstractProtocol$AbstractConnect ionHandler.process(AbstractProtocol.java:539)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProce ssor.run(JIoEndpoint.java:300)
    at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)

    Dis anybody see a similar exception in order to point us the cause of the exception? We are simply doing this:

    ...
    FacebookProfile profile = connection.getApi().userOperations().getUserProfil e();
    modelAndView.addObject("profile", profile);

    // prepare offers in a specialized way...
    List<org.springframework.social.facebook.api.Page> activities = facebook.likeOperations().getActivities();
    ...

    Thank you, Flo...

  2. #2
    Join Date
    Feb 2012
    Posts
    29

    Default

    If you use log4j with DEBUG level enabled, you can see the JSON from the request.
    Also you could use the developer graph api http://developers.facebook.com/tools...e%2Factivities to see what is being returned for that item, and include that in the report. Might provide a clue what is not working right.

    good luck

  3. #3
    Join Date
    Aug 2004
    Posts
    1,067

    Default

    I don't know if it was this exact exception or not, but I encountered a very similar exception a few days ago. As it turns out, I had the wrong version of Jackson in the classpath. Verify that you're running with Jackson 1.9.3 and see if it goes away.
    Craig Walls
    Spring Social Project Lead

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •