Problems with GData Request Token

Posted by Dan Delgado on Stack Overflow See other posts from Stack Overflow or by Dan Delgado
Published on 2009-10-01T08:38:22Z Indexed on 2010/05/15 17:04 UTC
Read the original article Hit count: 343

Filed under:
|
|
|

We have successfully used GData libraries to access a user's Google Docs. But we encountered problems when many users log in to our site and authorize our web app at the same time or successively.

Here's what happens:

First user successful logs in, authorizes our web app via OAuth and is able to add rubric (or google spreadsheet).

Second user, immediately after first user adds a rubric, successfully logs in then webapp fails on authorize (Token not given. I tried to log it.)

Third user fails on login.

Fourth user was able to log in, authorize via OAuth, and create rubrics successfully.

Fifth user was able to log in but like the second user, gets an invalid token on authorize (Token not given.)

And the list goes on. Results were unpredicatable.

Below is an excerpt of the stack trace we get when the fail scenario happens:

Nested in org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException:
java.lang.NullPointerException
at com.google.gdata.client.authn.oauth.OAuthUtil.normalizeParameters(OAuthUtil.java:158)
at com.google.gdata.client.authn.oauth.OAuthUtil.getSignatureBaseString(OAuthUtil.java:81)
at com.google.gdata.client.authn.oauth.OAuthHelper.addCommonRequestParameters(OAuthHelper.java:649)
at com.google.gdata.client.authn.oauth.OAuthHelper.getOAuthUrl(OAuthHelper.java:592)
at com.google.gdata.client.authn.oauth.OAuthHelper.getUnauthorizedRequestToken(OAuthHelper.java:276)
at com.projectrix.controller.OAuthController.authorize(OAuthController.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:40)

Help!

© Stack Overflow or respective owner

Related posts about oauth

Related posts about java