I am attempting to get familiar using the java calendar api (v3r7) on GAE 
(oauth-1.8-beta) with GWT. 

I am running an updated calendar sample originally provided by Yaniv Inbar. 

I believe I am logged in but I get the attached error when I am trying to 
authorize in order to initially load my calendars. BTW - The StockWatcher 
samples with RPC and JDO store I previously tried worked great.

Any help or a pointer to an updated CalendarAPI sample would be very 
appreciated!!!

*Here is the error in the GAE server log ...* 

javax.servlet.ServletContext log: Exception while dispatching incoming RPC 
call com.google.gwt.user.client.rpc.SerializationException: Type 
'com.google.api.client.googleapis.json.GoogleJsonResponseException' was not 
included in the set of types which can be serialized by this 
SerializationPolicy or its Class object could not be loaded. For security 
purposes, this type will not be serialized.: instance = 
com.google.api.client.googleapis.json.GoogleJsonResponseException: 401 { 
"code" : 401, "errors" : [ { "domain" : "global", "location" : 
"Authorization", "locationType" : "header", "message" : "Login Required", 
"reason" : "required" } ], "message" : "Login Required" } at 
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:619)
 
at 
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:126)
 
at ................

................. omitted

*Here is the CalanderServerImpl RPC call ......*

Calendar loadCalendarClient() throws IOException, NotLoggedInException {
    GoogleAuthorizationCodeFlow newFlow=Utils.newFlow();
    Credential credential = newFlow.loadCredential(Utils.getUser().getUserId());
        return Calendar.builder(HTTP_TRANSPORT, JSON_FACTORY)
                .setHttpRequestInitializer(credential).build();
    }

*Here are the Utils methods ...*

  static GoogleAuthorizationCodeFlow newFlow() throws IOException, 
NotLoggedInException {
        checkLoggedIn();
        String userId = 
UserServiceFactory.getUserService().getCurrentUser().getUserId();
        String clientId="stackoverflowomitted.apps.googleusercontent.com";
        String clientSecret="ommitted for stackoverflow";
        Iterable<String> scopes=Collections.singleton(CalendarScopes.CALENDAR);

        GoogleAuthorizationCodeFlow.Builder builder
        =new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT, JSON_FACTORY, 
clientId,clientSecret, scopes);

        builder.setCredentialStore(new AppEngineCredentialStore());

        GoogleAuthorizationCodeFlow newFlow=builder.build();

        return newFlow;
  }

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/TIvr735BOekJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to