Jetspeed 2
  1. Jetspeed 2
  2. JS2-450

portlet application manager eats useful exception message

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0-FINAL
    • Fix Version/s: 2.1-dev, 2.1
    • Component/s: Portlet Registry
    • Labels:
      None

      Description

      I had an error in my portlet.xml file; it referenced a security role that was not registered in web.xml. Instead of telling me this, PortletApplicationManager.java threw a "Failed to load portlet application for ..." exception. A new exception was thrown, so I could not see the real error.

      I fixed this by changing the throw at line PortletApplicationManager.java:273 to include the nested exception.

      Old:
      catch (Exception e)

      { String msg = "Failed to load portlet application for " + paWar.getPortletApplicationName(); log.error(msg); throw new RegistryException(msg); }

      New:
      catch (Exception e)

      { String msg = "Failed to load portlet application for " + paWar.getPortletApplicationName(); log.error(msg); throw new RegistryException(msg,e); }

      I've never commited code to your project and I'm not currently able to do a full build. (I built the jetspeed-portal-2.0.jar and copied it to a binary distribution.)

        Activity

        Hide
        Ate Douma added a comment -

        Thanks for the report.
        Fixed (almost) like you suggested

        Show
        Ate Douma added a comment - Thanks for the report. Fixed (almost) like you suggested

          People

          • Assignee:
            Unassigned
            Reporter:
            Han Lee
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development