Hi all, I am facing a strange problem in with my app in GAE and I can't seem to figure it up by myself, so I hope you'll help me.. Here we are:
I do : [code] String authSubUrl = AuthSubUtil.getRequestUrl(nextUrl, "http:// www.google.com/calendar/feeds/default/private/full", false, true); response.sendRedirect(authSubUrl); [/code] in my servlet in order to get an auth sub token. And the servlet at nextUrl does: [code] String oneTimeUseToken = AuthSubUtil.getTokenFromReply(request.getQueryString()); if(oneTimeUseToken != null){ String sessionToken = AuthSubUtil.exchangeForSessionToken(oneTimeUseToken, null); // persist the session token } // redirect to the page using google services [/code] in order to retrieve and persist the session token along with other user information. The problem is that when later I do: [code] URL feedUrl = new URL("http://www.google.com/calendar/feeds/default/ private/full"); CalendarQuery myQuery = new CalendarQuery(feedUrl); CalendarService calendarService = new CalendarService("some-app- name"); calendarService.setAuthSubToken(currentUser.authSubToken, null); CalendarEventFeed resultFeed = calendarService.query(myQuery, CalendarEventFeed.class); [/code] It says that the token is invalid, and raises this exception: [code] cri.domodentweb.server.rpc.CalendarEventsServiceImpl getEventsDev: null com.google.gdata.util.AuthenticationException: OK <HTML> <HEAD> <TITLE>Token invalid - Invalid AuthSub token.</TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000"> <H1>Token invalid - Invalid AuthSub token.</H1> <H2>Error 401</H2> </BODY> </HTML> at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java: 596) at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java: 563) at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java: 550) at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java: 530) at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java: 535) at com.google.gdata.client.Service.getFeed(Service.java:1102) at com.google.gdata.client.Service.getFeed(Service.java:1044) at com.google.gdata.client.GoogleService.getFeed(GoogleService.java: 662) at com.google.gdata.client.Service.query(Service.java:1204) at com.google.gdata.client.Service.query(Service.java:1145) at cri.domodentweb.server.rpc.CalendarEventsServiceImpl.getEventsDev(CalendarEventsServiceImpl.java: 133) 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(Unknown Source) at com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_ $1.run(Method_.java:165) at java.security.AccessController.doPrivileged(Native Method) at com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.privilegedInvoke(Method_.java: 163) at com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.invoke_(Method_.java: 124) at com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.invoke(Method_.java: 43) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java: 562) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java: 188) at cri.domodentweb.server.rpc.BaseServiceImpl.processCall(BaseServiceImpl.java: 12) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java: 224) at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java: 62) at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 511) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1166) at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java: 97) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java: 35) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java: 43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 418) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java: 238) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 542) at org.mortbay.jetty.HttpConnection $RequestHandler.headerComplete(HttpConnection.java:923) at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java: 76) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java: 135) at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java: 243) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:5485) at com.google.apphosting.base.RuntimePb$EvaluationRuntime $6.handleBlockingRequest(RuntimePb.java:5483) at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java: 24) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java: 398) at com.google.net.rpc.impl.Server$2.run(Server.java:852) at com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java: 56) at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java: 536) at com.google.net.rpc.impl.Server.startRpc(Server.java:807) at com.google.net.rpc.impl.Server.processRequest(Server.java:369) at com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java: 442) at com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java: 319) at com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java: 290) at com.google.net.async.Connection.handleReadEvent(Connection.java: 474) at com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java: 831) at com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java: 207) at com.google.net.async.EventDispatcher.loop(EventDispatcher.java: 103) at com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java: 251) at com.google.apphosting.runtime.JavaRuntime $RpcRunnable.run(JavaRuntime.java:404) at java.lang.Thread.run(Unknown Source) [/code] The strange thing is that this problem occurs only on GAE. On the development server everything works flawlessly. Any hint is appreciated. Thanks in advance, Cristian Babula. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.