Reputation: 8543
I'm trying to get the Java DrEdit example running on GAE exactly as described in the instructions. I've gotten to the point that I can create a new "dredit" document from docs, allow the auth and get to the actual app, but I get this in the GAE logs for every operation that goes back to gdrive:
Uncaught exception from servlet
com.google.api.client.googleapis.json.GoogleJsonResponseException: 401 OK
{
"code" : 401,
"errors" : [ {
"domain" : "global",
"location" : "Authorization",
"locationType" : "header",
"message" : "Login Required",
"reason" : "required"
} ],
"message" : "Login Required"
}
at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:159)
Where I did vary from the instructions, on 7:
In the Eclipse Build Path editor for the project, add all of the JARs in the war/WEB-INF/lib/ directory to the project's build path.
I added the libraries under lib/dependencies as well, just adding lib left compile errors.
Upvotes: 2
Views: 990
Reputation: 2375
There was a bug in DrEdit Java that made it out to release, essentially skipping a check if a token was missing. The relevant change to fix this bug is here.
I think applying that change will fix the issue for you. I have also updated the guide for this sample.
Upvotes: 4