Pluto
  1. Pluto
  2. PLUTO-505

Whitespace in PreferencesValidator declaration results in ClassNotFoundException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-refactoring, 2.0.0
    • Fix Version/s: 2.0-refactoring, 2.0.0
    • Component/s: descriptor
    • Labels:
      None
    • Environment:
      JDK 1.5.0_16, Tomcat 5.5.27

      Description

      If a PreferencesValidator is registered in the portlet deployment descriptor (portlet.xml) with any whitespace between the class name and the surrounding <preferences-validator> element, a ValidatorException is thrown whenever the store() method of the PortletPreferences object is invoked.

      The stack trace looks something like this:

      javax.portlet.ValidatorException: java.lang.ClassNotFoundException:
      com.hp.frameworks.sample.search.validation.SearchPreferencesValidator

      at org.apache.pluto.internal.PreferencesValidatorRegistry.getPreferencesValidator(PreferencesValidatorRegistry.java:111)
      at org.apache.pluto.internal.impl.PortletEntityImpl.getPreferencesValidator(PortletEntityImpl.java:167)
      at org.apache.pluto.internal.impl.PortletPreferencesImpl.internalStore(PortletPreferencesImpl.java:298)
      at org.apache.pluto.internal.impl.PortletPreferencesImpl.store(PortletPreferencesImpl.java:277)

      The root issue here is that the getPreferencesValidator() method of the org.apache.pluto.descriptors.portlet.PortletPreferencesDD should be trimming the string that is returned so that the whitespace is removed before an attempt is made to instantiate the class.

      1. patch.txt
        0.4 kB
        Brian DeHamer

        Activity

        Brian DeHamer created issue -
        Brian DeHamer made changes -
        Field Original Value New Value
        Attachment patch.txt [ 12391634 ]
        Craig Doremus made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Mark Thomas made changes -
        Workflow jira [ 12443634 ] Default workflow, editable Closed status [ 12565005 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12565005 ] jira [ 12586172 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Brian DeHamer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development