Hi,
I am using "spring-social-quickstart" code base (Spring 3.1 and Spring Social 1.0.0.RC1) for connecting to Facebook. It works fine. Now i wanted to put all @Configuration and @Bean to xml files. I referred http://static.springsource.org/sprin...onnecting.html and have made the changes for the other @Beans. But I am not sure how to convert the following @Bean to xml form -
Tried a couple of things but failed. Some exceptions I get are -Code:@Bean @Scope(value="request", proxyMode=ScopedProxyMode.INTERFACES) public Facebook facebook() { return connectionRepository().getPrimaryConnection(Facebook.class).getApi(); }
1. Initialization of bean failed; nested exception is org.springframework.beans.factory.UnsatisfiedDepen dencyException
2. org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'scopedTarget.Facebook': Scope 'request' is not active for the current thread; consider defining a scoped proxy for this bean if you intend to refer to it from a singleton; nested exception is java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request? If you are actually operating within a web request and still receive this message,your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.
Please help.
Thanks.


Reply With Quote
