Uploaded image for project: 'Grouper'
  1. Grouper
  2. GRP-3037

Remove leading slash when loading resource bundle "/resources/init"

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • 2.5.38
    • 2.5.0
    • UI
    • None

    Description

      When initializing a UI session, the it loads up some resources under WEB-INF/classes. The first of these tries to load "/resources/init" using the class loader, which is technically not supposed to have initial slashes. It happens to work since the Webapp classloader treats WEB-INF/classes as somewhat special. However, it doesn't work if using gsh to mock the HttpSession, as it uses the normal system classloader. This classloader treats resource names as relative to the classpath, and doesn't know what to do about the intial slash.

      Sample code:

      groovy:000> edu.internet2.middleware.grouper.ui.GrouperUiFilter.initRequest(requestWrapper, null)
      ERROR java.lang.RuntimeException:
      java.util.MissingResourceException: Can't find bundle for base name /resources/init, locale en_US

      Attachments

        Activity

          People

            chad.redman@at.internet2.edu Chad Redman (unc.edu)
            chad.redman@at.internet2.edu Chad Redman (unc.edu)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: