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

Capture Automation exception trace in Drive unit test logs

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Reopened
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: QualifiedToSchedule
    • Component/s: Nuxeo Drive

      Description

      To avoid having such a stack trace when an HTTP 500 error is sent by the server, typically when we are testing a FileSystemItem move that is not allowed:

      Running org.nuxeo.drive.operations.TestFileSystemItemOperations
      juil. 04, 2014 11:15:31 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
      Infos: Initiating Jersey application, version 'Jersey: 1.17.1 02/28/2013 12:47 PM'
      juil. 04, 2014 11:15:33 AM com.sun.jersey.spi.container.ContainerResponse logException
      Grave: Mapped exception to response: 500 (Internal Server Error)
      javax.ws.rs.WebApplicationException: org.nuxeo.ecm.automation.TraceException: 
      
      ****** chain ******
      Name: NuxeoDrive.Move
      Exception: OperationException
      Caught error: Failed to invoke operation NuxeoDrive.Move
      Caused by: org.nuxeo.ecm.core.api.ClientException: Cannot move a file system item to file system item with id defaultFileSystemItemFactory#test#0cb56ddb-7af5-4ece-9a5e-055f6b3f732a because it is not a folder.
      ****** Hierarchy calls ******
      	org.nuxeo.drive.operations.NuxeoDriveMove
      
      	at org.nuxeo.ecm.automation.jaxrs.ExceptionHandler.newException(ExceptionHandler.java:55)
      	at org.nuxeo.ecm.automation.server.jaxrs.ExecutableResource.doPost(ExecutableResource.java:60)
      	at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	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:1511)
      	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442)
      	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)
      	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)
      	at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
      	at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
      	at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
      	at org.nuxeo.ecm.webengine.app.jersey.WebEngineServlet.containerService(WebEngineServlet.java:177)
      	at org.nuxeo.ecm.webengine.app.jersey.WebEngineServlet.service(WebEngineServlet.java:152)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
      	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221)
      	at org.nuxeo.ecm.webengine.jaxrs.context.RequestContextFilter.run(RequestContextFilter.java:42)
      	at org.nuxeo.ecm.webengine.jaxrs.HttpFilter.doFilter(HttpFilter.java:43)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
      	at org.nuxeo.ecm.webengine.jaxrs.session.SessionCleanupFilter.run(SessionCleanupFilter.java:45)
      	at org.nuxeo.ecm.webengine.jaxrs.HttpFilter.doFilter(HttpFilter.java:43)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
      	at org.nuxeo.ecm.webengine.app.WebEngineFilter.doFilter(WebEngineFilter.java:92)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
      	at org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter.doFilterInternal(NuxeoAuthenticationFilter.java:616)
      	at org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter.doFilter(NuxeoAuthenticationFilter.java:407)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
      	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
      	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:766)
      	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
      	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
      	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      	at org.mortbay.jetty.Server.handle(Server.java:322)
      	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
      	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)
      	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
      	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
      	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
      	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
      	at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:451)
      Caused by: org.nuxeo.ecm.automation.TraceException: 
      
      ****** chain ******
      Name: NuxeoDrive.Move
      Exception: OperationException
      Caught error: Failed to invoke operation NuxeoDrive.Move
      Caused by: org.nuxeo.ecm.core.api.ClientException: Cannot move a file system item to file system item with id defaultFileSystemItemFactory#test#0cb56ddb-7af5-4ece-9a5e-055f6b3f732a because it is not a folder.
      ****** Hierarchy calls ******
      	org.nuxeo.drive.operations.NuxeoDriveMove
      
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:195)
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:116)
      	at org.nuxeo.ecm.automation.server.jaxrs.OperationResource.execute(OperationResource.java:51)
      	at org.nuxeo.ecm.automation.server.jaxrs.ExecutableResource.doPost(ExecutableResource.java:56)
      	... 50 more
      Caused by: org.nuxeo.ecm.automation.OperationException: Failed to invoke operation NuxeoDrive.Move
      	at org.nuxeo.ecm.automation.core.impl.InvokableMethod.invoke(InvokableMethod.java:157)
      	at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.doInvoke(CompiledChainImpl.java:124)
      	at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.invoke(CompiledChainImpl.java:110)
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:169)
      	... 53 more
      Caused by: org.nuxeo.ecm.core.api.ClientException: Cannot move a file system item to file system item with id defaultFileSystemItemFactory#test#0cb56ddb-7af5-4ece-9a5e-055f6b3f732a because it is not a folder.
      	at org.nuxeo.drive.service.impl.FileSystemItemManagerImpl.move(FileSystemItemManagerImpl.java:293)
      	at org.nuxeo.drive.operations.NuxeoDriveMove.run(NuxeoDriveMove.java:61)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.nuxeo.ecm.automation.core.impl.InvokableMethod.doInvoke(InvokableMethod.java:135)
      	at org.nuxeo.ecm.automation.core.impl.InvokableMethod.invoke(InvokableMethod.java:149)
      	... 56 more
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 5 minutes
                  5m