Uploaded image for project: '{RETIRED} XWiki Lucene Plugin'
  1. {RETIRED} XWiki Lucene Plugin
  2. XPLUCENE-61

NullPointerExcept when searching an existing attachment with no right to view

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.20
    • 1.19
    • Plugin
    • None

    Description

      From Wesley Huang:

      In my xwiki.log file, I see many NullPointExcept. One of them is related
      to the lucene search on an existing attachment when the user has no
      right to view it. For example, I attached a sunset.jpg in a privileged
      space, after logged out, and do a search with keyword "sunset.jpg", then
      NullPointException throws in the xwiki logs. While there is no error
      shows on the lucene result page, it is fairly annoying to see non-sense
      errors in the logs.

      Does anyone have an idea to fix it?

      2010-07-28 12:53:33,095
      [<Site>/xwiki/bin/view/Main/Search?text=sunset.jpg&space=]
      [<Site>/xwiki/bin/view/Main/Search?text=sunset.jpg&space=] ERROR
      lucene.SearchResults - Error getting search result
      java.lang.NullPointerException
      at
      com.xpn.xwiki.plugin.lucene.SearchResult.<init>(SearchResult.java:99)
      at
      com.xpn.xwiki.plugin.lucene.SearchResults.getRelevantResults(SearchResults.java:72)
      at
      com.xpn.xwiki.plugin.lucene.SearchResults.getHitcount(SearchResults.java:229)
      at sun.reflect.GeneratedMethodAccessor477.invoke(Unknown Source)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      .......

      Attachments

        Activity

          People

            tmortagne Thomas Mortagne
            tmortagne Thomas Mortagne
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: