错误(401 Unauthorized)访问GAE任务队列(拉队列)

时间:2012-10-08 16:44:50

标签: google-app-engine queue task pull task-queue

我在尝试访问拉取任务队列时遇到此错误。直到上个星期五(10月5日),它才能完美运作。今天(10月8日)它没有用。

我从Websphere Application Server v7运行它,下面是2个导入的证书:accounts.googleapis.com:443和www.googleapis.com:443。

我正在使用Task Queue API下面的这个版本:

<dependency>
    <groupId>com.google.apis</groupId>
    <artifactId>google-api-services-taskqueue</artifactId>
   <version>**v1beta1-1.2.0-beta**</version>
</dependency>

你能帮我吗?

Error Message: com.google.api.client.http.HttpResponseException: 401 Unauthorized
Error Code: 500
Target Servlet: Spring MVC Dispatcher Servlet
Error Stack: 
com.google.api.client.http.HttpResponseException: 401 Unauthorized
     at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:708) 
     at com.google.api.services.taskqueue.Taskqueue$RemoteRequest.execute(Taskqueue.java:698) 
     at com.google.api.services.taskqueue.Taskqueue$Tasks$Lease.executeUnparsed(Taskqueue.java:297) 
     at com.google.api.services.taskqueue.Taskqueue$Tasks$Lease.execute(Taskqueue.java:282) 
     at br.com.sulamerica.susis.sync.queue.client.impl.GaeTaskQueuePuller.getLeasedTasks(GaeTaskQueuePuller.java:117) 
     at br.com.sulamerica.susis.sync.services.BuscarPropostaGAEServicesImpl.buscaPropostaFilaGAEService(BuscarPropostaGAEServicesImpl.java:82) 
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45) 
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) 
     at java.lang.reflect.Method.invoke(Method.java:599) 
     at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) 
     at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) 
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) 
     at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50) 
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) 
     at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) 
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) 
     at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) 
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) 
     at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) 
     at $Proxy158.buscaPropostaFilaGAEService(Unknown Source) 
     at br.com.sulamerica.susis.sync.web.controller.PropostaController.buscaPropostasFilaGAE(PropostaController.java:34) 
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45) 
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) 
     at java.lang.reflect.Method.invoke(Method.java:599) 
     at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176) 
     at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426) 
     at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414) 
     at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790) 
     at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) 
     at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) 
     at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549) 
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:718) 
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) 
     at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657) 
     at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:939) 
     at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502) 
     at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179) 
     at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3935) 
     at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276) 
     at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931) 
     at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583) 
     at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186) 
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452) 
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511) 
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305) 
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276) 
     at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214) 
     at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113) 
     at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) 
     at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) 
     at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) 
     at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) 
     at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) 
     at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) 
     at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) 
     at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604) 

祝你好运!

FábioPeruchi

2 个答案:

答案 0 :(得分:0)

请在问题跟踪器中发布错误 http://code.google.com/p/googleappengine/issues/list 并包含应用程序ID和queue.xml的副本

答案 1 :(得分:0)

您使用什么凭据?如果它是OAuth令牌,令牌是否可能已过期?

Nick Verne