Uploaded image for project: 'Fedora Repository Project'
  1. Fedora Repository Project
  2. FCREPO-1775

Basic search page gives a 500 Internal Server Error


    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: Fedora 3.8.1
    • Fix Version/s: None
    • Component/s: legacy - Fedora
    • Labels:


      The Fedora basic search page ( /fedora/search ) gives a 500 Internal Server error when attempting to access the page with no queries.

      The error happens at line 244 of org.fcrepo.server.access.FieldSearchServlet.doGet , FieldSearchServlet.java (see attached stack trace). Within the code, it looks like the FieldSearchResult fsr is set to null, which causes problems as search results are attempted to be displayed even when the page first loads. A possible code fix is to check to see if there are any results at all (in fieldsArray) before attempting to iterate through the results. I could try to fix this myself (I'd need to set up a dev environment first though).

      There are two imperfect workarounds:

      1. Put in some search terms as a GET request, such as (at minimum it appears):


      This allows the page to load and be used. An Apache redirect could help if this is hard to remember:

      RewriteEngine on
      RewriteCond "%


      " "^$"
      RewriteCond "%


      " "^GET.*$"
      RewriteRule "^/fedora/search$" "/fedora/search?query=&pid=true&maxResults=0" [R,L]

      This workaround works pretty well, though it does seem like a bit of a hack.

      2. Use the Fedora admin page instead ( /fedora/admin )

      Though this page doesn't have the same functionality, such as easy access to disseminators.

      Update: I just noticed that there is a near-identical search page (that works) here:


      This basically resolves this problem, the old search page should either be removed or redirect to the new one.




            • Assignee:
              sedidome Steve DiDomenico
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: