Research Log of Web Science Students

Computer Science is not simply programming

Problems with GData Request Token

with one comment

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!

Advertisements

Written by Daniela

October 1, 2009 at 7:29 am

One Response

Subscribe to comments with RSS.

  1. […] and I worked on accessing Google Docs via Oauth. We’ve made it to work but it doesn’t scale. I’ll work on that […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: