JSPWiki
  1. JSPWiki
  2. JSPWIKI-721

Log FileNotFoundException on missing attachment

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.8.4
    • Fix Version/s: 2.8.5, 2.9
    • Component/s: Core & storage
    • Labels:
      None

      Description

      We messed with the repository and had an attachment folder without the actual attachment. This results in a FileNotFoundException in
      BasicAttachmentProvider.getAttachmentInfo(WikiPage, String, int)
      and comes up as the infamous
      java.lang.IllegalArgumentException: Attempt to provide a null filter - this should never happen. Please check your configuration (or if you're a developer, check your own code.)
      at com.ecyrd.jspwiki.filters.FilterManager.addPageFilter(FilterManager.java:145)

      A log in the FileNotFoundException catch block would help a lot:

      catch( FileNotFoundException e )

      { log.error("Can't get attachment properties for "+att, e ); return null; }

        Activity

        Jürgen Weber created issue -
        Harry Metske made changes -
        Field Original Value New Value
        Assignee Harry Metske [ metskem ]
        Harry Metske made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.8.5 [ 12315288 ]
        Fix Version/s 2.9 [ 12319521 ]
        Resolution Fixed [ 1 ]
        Florian Holeczek made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Harry Metske
            Reporter:
            Jürgen Weber
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development