Mrjndong / socialauth

Automatically exported from code.google.com/p/socialauth
0 stars 0 forks source link

Google API and Twitter APIs both give NPEs #219

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run socialauth-spring-demo after configuring all of your api keys for 
google, facebook and twitter.
2. launch socialauth-spring-demo/ and test Facebook.
* This works.
3. launch socialauth-spring-demo/ and test Twitter.
* This fails with null pointer exception.
4. launch socialauth-spring-demo/ and test Google.
* This fails with null pointer exception.

What is the expected output? What do you see instead?

Expected Google and Twitter to work like Facebook does. 

What version of the product are you using? On what operating system?

Windows7 64-bit
socialauth-2.3.jar
socialauth-spring-2.0-beta2.jar

Please provide any additional information below.

Stack trace I get.

01:32:41,999 ERROR [stderr] (http--127.0.0.1-8080-3) 
org.brickred.socialauth.exception.SocialAuthException: Key in Request Token is 
null or blank

01:32:42,001 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.brickred.socialauth.util.OAuthConsumer.getAccessToken(OAuthConsumer.java:213
)

01:32:42,003 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.brickred.socialauth.oauthstrategy.Hybrid.verifyResponse(Hybrid.java:131)

01:32:42,006 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.brickred.socialauth.oauthstrategy.Hybrid.verifyResponse(Hybrid.java:108)

01:32:42,008 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.brickred.socialauth.provider.GoogleImpl.doVerifyResponse(GoogleImpl.java:175
)

01:32:42,010 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.brickred.socialauth.provider.GoogleImpl.verifyResponse(GoogleImpl.java:164)

01:32:42,012 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.brickred.socialauth.SocialAuthManager.connect(SocialAuthManager.java:183)

01:32:42,014 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.brickred.socialauth.SocialAuthManager$$FastClassByCGLIB$$1e842cf3.invoke(<ge
nerated>)

01:32:42,017 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)

01:32:42,019 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoi
npoint(Cglib2AopProxy.java:688)

01:32:42,021 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveM
ethodInvocation.java:150)

01:32:42,024 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(Dele
gatingIntroductionInterceptor.java:131)

01:32:42,027 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(Delegat
ingIntroductionInterceptor.java:119)

01:32:42,029 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveM
ethodInvocation.java:172)

01:32:42,032 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.inter
cept(Cglib2AopProxy.java:621)

01:32:42,035 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.brickred.socialauth.SocialAuthManager$$EnhancerByCGLIB$$9ea00948.connect(<ge
nerated>)

01:32:42,037 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.brickred.socialauth.spring.controller.SocialAuthWebController.callback(Socia
lAuthWebController.java:145)

01:32:42,040 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.brickred.socialauth.spring.controller.SocialAuthWebController.openidCallback
(SocialAuthWebController.java:137)

01:32:42,042 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

01:32:42,044 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

01:32:42,046 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)

01:32:42,049 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
java.lang.reflect.Method.invoke(Method.java:597)

01:32:42,050 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandl
erMethod(HandlerMethodInvoker.java:176)

01:32:42,053 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.in
vokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436)

01:32:42,056 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.ha
ndle(AnnotationMethodHandlerAdapter.java:424)

01:32:42,058 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.j
ava:790)

01:32:42,060 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.ja
va:719)

01:32:42,062 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet
.java:644)

01:32:42,064 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549
)

01:32:42,066 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:734)

01:32:42,068 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

01:32:42,069 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:329)

01:32:42,071 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:248)

01:32:42,073 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:2
75)

01:32:42,075 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:1
61)

01:32:42,077 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.
java:50)

01:32:42,079 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContext
AssociationValve.java:153)

01:32:42,081 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)

01:32:42,082 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

01:32:42,084 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109
)

01:32:42,086 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)

01:32:42,088 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

01:32:42,089 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Pr
otocol.java:671)

01:32:42,091 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

01:32:42,093 ERROR [stderr] (http--127.0.0.1-8080-3)    at 
java.lang.Thread.run(Thread.java:662)

Original issue reported on code.google.com by nicholas...@gmail.com on 29 Sep 2012 at 6:42

GoogleCodeExporter commented 8 years ago
Note: The API key and secret are definitely working because I get to the 
Google/Twitter Login page and I see my app name in there. 

Just seems like there is some sort of bug in the code that injects the 

SocialAuthManager manager = socialAuthTemplate.getSocialAuthManager();
AuthProvider provider = manager.getCurrentAuthProvider();
Profile profile = provider.getUserProfile();

Profile will be NULL.

Original comment by nicholas...@gmail.com on 29 Sep 2012 at 6:46

GoogleCodeExporter commented 8 years ago
The LoginRedirectURL = 
https://www.google.com/accounts/o8/ud?openid.assoc_handle=AMlYA9XSiPzr36XuazJjRr
B6JhX1cx1AIfPzqI6bTs94gBwKC4hzKQdT&openid.ax.mode=fetch_request&openid.ax.requir
ed=country%2Cemail%2Cfirstname%2Clanguage%2Clastname&openid.ax.type.country=http
%3A%2F%2Faxschema.org%2Fcontact%2Fcountry%2Fhome&openid.ax.type.email=http%3A%2F
%2Faxschema.org%2Fcontact%2Femail&openid.ax.type.firstname=http%3A%2F%2Faxschema
.org%2FnamePerson%2Ffirst&openid.ax.type.language=http%3A%2F%2Faxschema.org%2Fpr
ef%2Flanguage&openid.ax.type.lastname=http%3A%2F%2Faxschema.org%2FnamePerson%2Fl
ast&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_se
lect&openid.ext2.consumer=localhost&openid.ext2.scope=http%3A%2F%2Fwww.google.co
m%2Fm8%2Ffeeds%2F&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fi
dentifier_select&openid.mode=checkid_setup&openid.ns.ax=http%3A%2F%2Fopenid.net%
2Fsrv%2Fax%2F1.0&openid.ns.ext2=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Foau
th%2F1.0&openid.ns.max_auth_age=0&openid.ns.pape=http%3A%2F%2Fspecs.openid.net%2
Fextensions%2Fpape%2F1.0&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&op
enid.realm=http%3A%2F%2Flocalhost%3A8080&openid.return_to=http%3A%2F%2Flocalhost
%3A8080%2Ftestapp-oauth%2Fsocialauth.do

org.brickred.socialauth.util.OAuthConfig Object {
 consumerKey: xxxxxxxxxxxxx.apps.googleusercontent.com
 consumerSecret: xxxxxxxxxxxxxxxxxxxxxxxx
 signatureMethod: HMAC-SHA1
 transportName: GET
 id: google
 providerImplClass: class org.brickred.socialauth.provider.GoogleImpl
 customPermissions: null
}

verifyResponse's request params: 
{openid.op_endpoint=https://www.google.com/accounts/o8/ud, 
openid.signed=op_endpoint,claimed_id,identity,return_to,response_nonce,assoc_han
dle,ns.ext1,ext1.mode,ext1.type.firstname,ext1.value.firstname,ext1.type.email,e
xt1.value.email,ext1.type.language,ext1.value.language,ext1.type.lastname,ext1.v
alue.lastname,ext1.type.country,ext1.value.country, 
openid.ns.ext1=http://openid.net/srv/ax/1.0, 
openid.sig=EcRz8elVXs0DIZyv5L/8bAsWo3E=, openid.ext1.value.country=US, 
openid.response_nonce=2012-09-29T16:46:29Zd3SXvBjFdPy_Yw, 
openid.claimed_id=https://www.google.com/accounts/o8/id?id=AItOawn3McmfFzRdc8xBE
1x5IHgArAZJUz1oNGs, openid.ext1.value.lastname=DiPiazza, 
openid.assoc_handle=AMlYA9XSiPzr36XuazJjRrB6JhX1cx1AIfPzqI6bTs94gBwKC4hzKQdT, 
openid.ext1.value.firstname=Nicholas, 
openid.ext1.value.email=nicholas.dipiazza@gmail.com, 
openid.ext1.type.language=http://axschema.org/pref/language, 
openid.ext1.type.lastname=http://axschema.org/namePerson/last, 
openid.ext1.type.firstname=http://axschema.org/namePerson/first, 
openid.ns=http://specs.openid.net/auth/2.0, 
openid.identity=https://www.google.com/accounts/o8/id?id=AItOawn3McmfFzRdc8xBE1x
5IHgArAZJUz1oNGs, openid.ext1.type.email=http://axschema.org/contact/email, 
openid.ext1.mode=fetch_response, openid.mode=id_res, 
openid.ext1.value.language=en, 
openid.ext1.type.country=http://axschema.org/contact/country/home, 
openid.return_to=http://localhost:8080/myapp-oauth/socialauth.do}

Original comment by nicholas...@gmail.com on 29 Sep 2012 at 5:33

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Found a work around - When you are using a auth provider that uses the 
org.brickred.socialauth.oauthstrategy.Hybrid class, you cannot have permission 
= Permission.ALL. 

Setting to Permission.AUTHENTICATE_ONLY makes it work.

Seems like the Profile isn't lacking anything even though 
Permission.AUTHENTICATE_ONLY had been set. So this is good enough for me. 

Original comment by nicholas...@gmail.com on 29 Sep 2012 at 5:59

GoogleCodeExporter commented 8 years ago
Its not like that.

You are running your application from localhost and trying yo get Contacts. But 
localhost doesn't have this permission that's why when you change the 
permission for AUTHENTICATE_ONLY, it doesn't make a request for getting 
contacts and it runs fine.

If you still want to run your application from localhost, please have a look 
into the following URL:-

http://code.google.com/p/socialauth/wiki/HowToRunApplicationWithLocalhostOnWindo
ws

Regards
Tarun

Original comment by tar...@brickred.com on 3 Oct 2012 at 8:24

GoogleCodeExporter commented 8 years ago
I am trying to import the contacts using spring-boot and socialAuth

I had written following snippet

SocialAuthConfig :
------------------------------------------------
@Configuration
@EnableAutoConfiguration
public class SpringSocialConfig {

    @Bean
    public SocialAuthConfig socialAuthConfig() throws Exception {
        SocialAuthConfig config = SocialAuthConfig.getDefault();
        Properties socialAuthProperties = new Properties();
//      g+
        socialAuthProperties.setProperty("www.google.com.consumer_key","AIzaSyB1WN0M4PjdsvZySoIeD0SYIeBiiqmjyDQ");
        socialAuthProperties.setProperty("www.google.com.consumer_secret","gaHYBT8X-XP86V2Buv6R4FWC");
//        Yahoo
        socialAuthProperties.setProperty("api.login.yahoo.com.consumer_key","dj0yJmk9eDA4ZGo5UXl4b2FLJmQ9WVdrOWNWZ3plVlZITmpJbWNHbzlNQS0tJnM9Y29uc3VtZXJzZWNyZXQmeD1hYg--");
        socialAuthProperties.setProperty("api.login.yahoo.com.consumer_secret","5f62ac135cb9e9d986ec1d72e42502af43a740f5");
//        twitter
        socialAuthProperties.setProperty("twitter.com.consumer_key","LHjSYouR0yDZx607hNJ6dXSen");
        socialAuthProperties.setProperty("twitter.com.consumer_secret","7Wt21xWCZASEVCokvMx2vBKL9Haca9xIDMZ8Rinqbxrs01vZdg");
//        facebook
        socialAuthProperties.setProperty("graph.facebook.com.consumer_key","184566081734140");
        socialAuthProperties.setProperty("graph.facebook.com.consumer_secret","e6d3929a575d37b3eac4c083454d143d");
//        hotmail
        socialAuthProperties.setProperty("consent.live.com.consumer_key","0000000040145B73");
        socialAuthProperties.setProperty("consent.live.com.consumer_secret","FAmFXKVFO1GnPrXD2epd52VElkHcKjWA");
        config.setApplicationProperties(socialAuthProperties);
        return config;
    }

    @Bean
    public SocialAuthManager socialAuthManager() throws Exception {
        SocialAuthManager manager = new SocialAuthManager();
        manager.setSocialAuthConfig(socialAuthConfig());
        return manager;
    }

    @Bean
    public SocialAuthTemplate socialAuthTemplate() throws Exception {
        SocialAuthTemplate socialAuthTemplate = new SocialAuthTemplate();
        return socialAuthTemplate;
    }

    @Bean
    public SocialAuthWebController socialAuthWebController(){
        SocialAuthWebController socialAuthWebController = new SocialAuthWebController("http://localhost:8080/","socialauth","error/error_default");
        return socialAuthWebController;
    }

In View Page:
--------------------------

 <a href="socialauth?id=facebook"><img src="images/facebook_icon.png" alt="Facebook" title="Facebook" border="0"/></a>

I am getting Exception like 
---------------------------------------------------

org.brickred.socialauth.exception.SocialAuthException: Key in Request Token is 
null or blank
    at org.brickred.socialauth.util.OAuthConsumer.getAccessToken(OAuthConsumer.java:231)
    at org.brickred.socialauth.oauthstrategy.Hybrid.verifyResponse(Hybrid.java:138)
    at org.brickred.socialauth.oauthstrategy.Hybrid.verifyResponse(Hybrid.java:115)
    at org.brickred.socialauth.provider.GoogleImpl.doVerifyResponse(GoogleImpl.java:158)
    at org.brickred.socialauth.provider.GoogleImpl.verifyResponse(GoogleImpl.java:147)
    at org.brickred.socialauth.SocialAuthManager.connect(SocialAuthManager.java:183)
    at org.brickred.socialauth.spring.controller.SocialAuthWebController.callback(SocialAuthWebController.java:145)
    at org.brickred.socialauth.spring.controller.SocialAuthWebController.openidCallback(SocialAuthWebController.java:137)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689)
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:85)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:57)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at com.foodeebuddee.configs.FBCORSFilter.doFilter(FBCORSFilter.java:23)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
    at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:683)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1721)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1679)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:724)

Can Anybody suggest me what i did the mistake in config or else i need to add 
some extra code

Thanks In advance

Original comment by mungarar...@gmail.com on 27 Feb 2015 at 2:58