Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-14888

Improve the display of opening deleted (broken) attachments error

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • 9.10.1
    • Index
    • None
    • Windows 10 Pro 64 bit, Chrome v.62, Firefox v.57, IE v.11, Edge v.16 using a local instance XWiki 9.10.1
    • Unknown

    Description

      When clicked on a broken attachment (attachment with deleted/no content) from 'Page Index' > 'Deleted Attachments' Tab, a technical error message is displayed in the browser (screenshot attached).

      The error message should be more specific (e.g. 'Deleted attachment not found/ could have been permanently deleted', etc) and the error stacktrace could be contained in a collapsible box of the type 'More info...', which can improve the user's experience.

      Stacktrace of the error message from log:

       2017-12-05 13:41:31,517 [http://localhost:9100/xwiki/bin/downloadrev/Main/WebHome/Python%20code%20example.txt?rev=1.1&rid=3] WARN  c.x.x.w.XWikiAction            - Uncaught exception: Error number 0 in 11: Uncaught exception 
      com.xpn.xwiki.XWikiException: Error number 0 in 11: Uncaught exception
      	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:474)
      	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:210)
      	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
      	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
      	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
      	at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
      	at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:112)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
      	at org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:127)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
      	at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
      	at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
      	at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
      	at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:134)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1629)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:219)
      	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      	at org.eclipse.jetty.server.Server.handle(Server.java:561)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:334)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
      	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
      	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:104)
      	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
      	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:243)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:679)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:597)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: org.xwiki.store.UnexpectedException: Failed to get InputStream
      	at org.xwiki.store.legacy.doc.internal.FilesystemAttachmentContent.getContentInputStream(FilesystemAttachmentContent.java:107)
      	at com.xpn.xwiki.doc.XWikiAttachment.getContentInputStream(XWikiAttachment.java:855)
      	at com.xpn.xwiki.web.DownloadRevAction.render(DownloadRevAction.java:98)
      	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:447)
      	... 51 common frames omitted
      Caused by: java.io.FileNotFoundException: C:\XWIKI 9.10.1\xwiki-platform-distribution-flavor-jetty-hsqldb-9.10.1 standard\data\storage\xwiki\Main\WebHome\~this\deleted-attachments\Python+code+example.txt-id3\Python+code+example.txt (The system cannot find the file specified)
      	at java.io.FileInputStream.open0(Native Method)
      	at java.io.FileInputStream.open(Unknown Source)
      	at java.io.FileInputStream.<init>(Unknown Source)
      	at org.xwiki.store.legacy.doc.internal.FilesystemAttachmentContent.getContentInputStream(FilesystemAttachmentContent.java:105)
      	... 54 common frames omitted

      Attachments

        Activity

          People

            Unassigned Unassigned
            iandriuta Ilie Andriuta
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: