Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-21507

Drive remote scan should not fail because of OAuth errors on Google Drive documents

    XMLWordPrintable

    Details

      Description

      We've observed failures in NuxeoDrive.ScrollDescendants due to

      2017-01-19 09:30:02,166 WARN  [http-bio-0.0.0.0-8080-exec-532] [org.nuxeo.ecm.webengine.app.WebEngineExceptionMapper] Exception in JAX-RS processing
      org.nuxeo.ecm.webengine.WebException: Failed to invoke operation: NuxeoDrive.ScrollDescendants
      	
      	at org.nuxeo.ecm.webengine.WebException.newException(WebException.java:133)
      	
      	at org.nuxeo.ecm.webengine.WebException.newException(WebException.java:122)
      	
      	at org.nuxeo.ecm.automation.server.jaxrs.ExecutableResource.doPost(ExecutableResource.java:87)
      	at sun.reflect.GeneratedMethodAccessor191.invoke(Unknown Source)
      	
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
      	at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ObjectOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:258)
      	
      	at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
      	
      	at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
      	
      	at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
      	
      	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
      	
      	at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
      	
      	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
      	
      	at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
      	
      	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)
      	
      	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473)
      	
      	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
      	
      	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
      	
      	at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
      	
      	at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)
      	
      	at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)
      	
      	at org.nuxeo.ecm.webengine.app.jersey.WebEngineServlet.containerService(WebEngineServlet.java:178)
      	
      	at org.nuxeo.ecm.webengine.app.jersey.WebEngineServlet.service(WebEngineServlet.java:155)
      	
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	
      	at org.nuxeo.elasticsearch.ElasticSearchFilter.doFilter(ElasticSearchFilter.java:55)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	
      	at org.nuxeo.ecm.webengine.jaxrs.session.SessionCleanupFilter.run(SessionCleanupFilter.java:50)
      	
      	at org.nuxeo.ecm.webengine.jaxrs.HttpFilter.doFilter(HttpFilter.java:49)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	
      	at org.nuxeo.ecm.webengine.app.WebEngineFilter.doFilter(WebEngineFilter.java:92)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	
      	at org.nuxeo.ecm.webengine.jaxrs.context.RequestContextFilter.run(RequestContextFilter.java:48)
      	
      	at org.nuxeo.ecm.webengine.jaxrs.HttpFilter.doFilter(HttpFilter.java:49)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	
      	at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoThreadTrackerFilter.doFilter(NuxeoThreadTrackerFilter.java:43)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	
      	at org.nuxeo.ecm.core.management.jtajca.internal.Log4jWebFilter.doFilter(Log4jWebFilter.java:69)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	
      	at org.nuxeo.ecm.platform.ui.web.rest.FancyURLFilter.doFilter(FancyURLFilter.java:120)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	
      	at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoRequestControllerFilter.doFilter(NuxeoRequestControllerFilter.java:146)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	
      	at org.nuxeo.ecm.webdav.service.WIRequestFilter.doFilter(WIRequestFilter.java:61)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	
      	at org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter.doFilterInternal(NuxeoAuthenticationFilter.java:598)
      	
      	at org.nuxeo.ecm.platform.ui.web.auth.service.NuxeoAuthFilterChain.doFilter(NuxeoAuthFilterChain.java:51)
      	
      	at org.nuxeo.ecm.platform.ui.web.auth.oauth.NuxeoOAuthFilter.doFilter(NuxeoOAuthFilter.java:122)
      	
      	at org.nuxeo.ecm.platform.ui.web.auth.service.NuxeoAuthFilterChain.doFilter(NuxeoAuthFilterChain.java:49)
      	
      	at org.nuxeo.ecm.platform.ui.web.auth.oauth2.NuxeoOAuth2Filter.doFilter(NuxeoOAuth2Filter.java:83)
      	
      	at org.nuxeo.ecm.platform.ui.web.auth.service.NuxeoAuthFilterChain.doFilter(NuxeoAuthFilterChain.java:49)
      	
      	at org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter.doFilter(NuxeoAuthenticationFilter.java:408)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	
      	at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:208)
      	
      	at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:274)
      	
      	at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoCorsFilter.doFilter(NuxeoCorsFilter.java:49)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	
      	at org.nuxeo.ecm.platform.web.common.exceptionhandling.NuxeoExceptionFilter.doFilter(NuxeoExceptionFilter.java:77)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	
      	at org.nuxeo.ecm.platform.web.common.encoding.NuxeoEncodingFilter.doFilter(NuxeoEncodingFilter.java:75)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
      	
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
      	
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
      	
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
      	
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
      	
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
      	
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
      	
      	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
      	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
      	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
      	
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	
      	at java.lang.Thread.run(Thread.java:745)
      
      Caused by: org.nuxeo.ecm.automation.TraceException: 
      ****** chain ******
      Name: NuxeoDrive.ScrollDescendants
      Exception: OperationException
      Caught error: Failed to invoke operation NuxeoDrive.ScrollDescendants
      Caused by: org.nuxeo.ecm.core.api.PropertyException: Cannot get blob info for: googledrive:********@nuxeo.com:1nayHmLDFdnGxvCEU889HdFy4Tn5phkln0ilAJ3UKcds
      ****** Hierarchy calls ******
      	org.nuxeo.drive.operations.NuxeoDriveScrollDescendants
      	
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:234)
      	
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:117)
      	
      	at org.nuxeo.ecm.automation.server.jaxrs.OperationResource.execute(OperationResource.java:58)
      	
      	at org.nuxeo.ecm.automation.server.jaxrs.ExecutableResource.doPost(ExecutableResource.java:68)
      	... 90 more
      Caused by: org.nuxeo.ecm.automation.OperationException: Failed to invoke operation NuxeoDrive.ScrollDescendants
      	
      	at org.nuxeo.ecm.automation.core.impl.InvokableMethod.invoke(InvokableMethod.java:189)
      	
      	at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.doInvoke(CompiledChainImpl.java:130)
      	
      	at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.invoke(CompiledChainImpl.java:116)
      	
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:210)
      	... 93 more
      Caused by: org.nuxeo.ecm.core.api.PropertyException: Cannot get blob info for: googledrive:********@nuxeo.com:1nayHmLDFdnGxvCEU889HdFy4Tn5phkln0ilAJ3UKcds
      	
      	at org.nuxeo.ecm.core.storage.BaseDocument.getValueBlob(BaseDocument.java:461)
      	
      	at org.nuxeo.ecm.core.storage.BaseDocument.readComplexProperty(BaseDocument.java:645)
      	
      	at org.nuxeo.ecm.core.storage.BaseDocument.readComplexProperty(BaseDocument.java:660)
      	
      	at org.nuxeo.ecm.core.storage.sql.coremodel.SQLDocumentLive.readDocumentPart(SQLDocumentLive.java:172)
      	
      	at org.nuxeo.ecm.core.api.DocumentModelFactory.createDataModel(DocumentModelFactory.java:208)
      	
      	at org.nuxeo.ecm.core.api.AbstractSession.getDataModel(AbstractSession.java:1966)
      	at org.nuxeo.ecm.core.api.impl.DocumentModelImpl$1.run(DocumentModelImpl.java:492)
      	at org.nuxeo.ecm.core.api.impl.DocumentModelImpl$1.run(DocumentModelImpl.java:489)
      	at org.nuxeo.ecm.core.api.impl.DocumentModelImpl$RunWithCoreSession.execute(DocumentModelImpl.java:403)
      	
      	at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.loadDataModel(DocumentModelImpl.java:494)
      	
      	at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.getDataModel(DocumentModelImpl.java:503)
      	
      	at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.getPart(DocumentModelImpl.java:1340)
      	
      	at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.getProperty(DocumentModelImpl.java:1387)
      	
      	at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.getPropertyValue(DocumentModelImpl.java:1446)
      	
      	at org.nuxeo.ecm.core.api.blobholder.DocumentBlobHolder.getBlob(DocumentBlobHolder.java:68)
      	
      	at org.nuxeo.drive.service.impl.DefaultFileSystemItemFactory.hasBlob(DefaultFileSystemItemFactory.java:260)
      	
      	at org.nuxeo.drive.service.impl.DefaultFileSystemItemFactory.isFileSystemItem(DefaultFileSystemItemFactory.java:127)
      	
      	at org.nuxeo.drive.service.impl.AbstractFileSystemItemFactory.getFileSystemItem(AbstractFileSystemItemFactory.java:239)
      	
      	at org.nuxeo.drive.service.impl.AbstractFileSystemItemFactory.getFileSystemItem(AbstractFileSystemItemFactory.java:128)
      	
      	at org.nuxeo.drive.service.impl.FileSystemItemAdapterServiceImpl.getFileSystemItem(FileSystemItemAdapterServiceImpl.java:328)
      	
      	at org.nuxeo.drive.service.impl.FileSystemItemAdapterServiceImpl.getFileSystemItem(FileSystemItemAdapterServiceImpl.java:185)
      	
      	at org.nuxeo.drive.adapter.impl.DocumentBackedFolderItem.adaptDocuments(DocumentBackedFolderItem.java:384)
      	
      	at org.nuxeo.drive.adapter.impl.DocumentBackedFolderItem.doScrollDescendants(DocumentBackedFolderItem.java:234)
      	
      	at org.nuxeo.drive.adapter.impl.DocumentBackedFolderItem.scrollDescendants(DocumentBackedFolderItem.java:203)
      	
      	at org.nuxeo.drive.service.impl.FileSystemItemManagerImpl.scrollDescendants(FileSystemItemManagerImpl.java:194)
      	
      	at org.nuxeo.drive.operations.NuxeoDriveScrollDescendants.run(NuxeoDriveScrollDescendants.java:79)
      	at sun.reflect.GeneratedMethodAccessor677.invoke(Unknown Source)
      	
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	
      	at org.nuxeo.ecm.automation.core.impl.InvokableMethod.doInvoke(InvokableMethod.java:164)
      	
      	at org.nuxeo.ecm.automation.core.impl.InvokableMethod.invoke(InvokableMethod.java:177)
      	... 96 more
      Caused by: com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request
      {
        "error" : "invalid_grant"
      }
      	
      	at com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:105)
      	
      	at com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287)
      	
      	at com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:307)
      	
      	at com.google.api.client.auth.oauth2.Credential.executeRefreshToken(Credential.java:570)
      	
      	at com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489)
      	
      	at org.nuxeo.ecm.liveconnect.core.AbstractLiveConnectBlobProvider.getCredential(AbstractLiveConnectBlobProvider.java:289)
      	
      	at org.nuxeo.ecm.liveconnect.google.drive.GoogleDriveBlobProvider.getService(GoogleDriveBlobProvider.java:497)
      	
      	at org.nuxeo.ecm.liveconnect.google.drive.GoogleDriveBlobProvider.getDriveFile(GoogleDriveBlobProvider.java:533)
      	
      	at org.nuxeo.ecm.liveconnect.google.drive.GoogleDriveBlobProvider.retrieveFile(GoogleDriveBlobProvider.java:513)
      	
      	at org.nuxeo.ecm.liveconnect.core.AbstractLiveConnectBlobProvider.getFile(AbstractLiveConnectBlobProvider.java:261)
      	
      	at org.nuxeo.ecm.liveconnect.core.AbstractLiveConnectBlobProvider.toBlob(AbstractLiveConnectBlobProvider.java:204)
      	
      	at org.nuxeo.ecm.liveconnect.core.AbstractLiveConnectBlobProvider.readBlob(AbstractLiveConnectBlobProvider.java:97)
      	
      	at org.nuxeo.ecm.core.blob.BlobManagerComponent.readBlob(BlobManagerComponent.java:234)
      	
      	at org.nuxeo.ecm.core.storage.BaseDocument.getValueBlob(BaseDocument.java:459)
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: