Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-27131

java.lang.NoClassDefFoundError when overriding the Asset Publisher RSS struts action in hook

    Details

      Description

      When trying to override the struts action for /asset_publisher/rss from a hook using the following configuration:

      <hook>
          <struts-action>
              <struts-action-path>/asset_publisher/rss</struts-action-path>
              <struts-action-impl>com.savoirfairelinux.hook.AssetPublisherRSSAction</struts-action-impl>
          </struts-action>
      </hook>
      

      and the attached AssetPublisherRSSAction class, the result is the following exception (see attached stacktrace)

      java.lang.NoClassDefFoundError: Could not initialize class com.sun.syndication.feed.synd.SyndFeedImpl
      

      The workaround is to add the rome.jar as a dependency for the hook to have access to com.sun.syndication.feed.synd.SyndFeedImpl.

      I suggest to create a service API around the RSS library as Liferay do for most other external dependencies being used throughout the portal and to also change the Asset Publisher RSSAction to obey the 'enableRss' portlet preference.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mika.koivisto Mika Koivisto
                Reporter:
                jonas.fonseca Jonas Fonseca (Inactive)
                Participants of an Issue:
                Recent user:
                Esther Sanz
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 9 weeks, 1 day ago