Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-1862

NoClassDefFoundError for com.liferay.portal.theme.ThemeDisplay when deploying jsf2-portlet on Pluto

    Details

      Description

      This error occurs when Mojarra tries to identify all of the component suite renderers during startup. When running under Pluto (or as a webapp), the com.liferay.portal.theme.ThemeDisplay class is not present since it is specific to Liferay Portal. Since Mojarra is scanning method signatures for annotations, it throws a NoClassDefFoundError when it encounters the ScriptRendererCompat.isInline(ThemeDisplay) method:

      public abstract class ScriptRendererCompat extends Renderer {
      
      	protected boolean isInline(ThemeDisplay themeDisplay) {
      		return (themeDisplay.isIsolated() || themeDisplay.isStateExclusive());
      	}
      	...
      }
      

      The solution is to refactor the method signature so that the argument is not a Liferay-specific class.

      Note that the exception will not get thrown with Liferay Faces 3.1.3-ga4 – the bug only manifested itself when the fix for FACES-1780 was committed during the development of Liferay Faces 3.1.4-ga5.

        Attachments

          Activity

            People

            • Assignee:
              neil.griffin Neil Griffin
              Reporter:
              neil.griffin Neil Griffin
              Participants of an Issue:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                liferay-faces-2.1.4-ga5
                liferay-faces-2.2.4-ga5
                liferay-faces-3.0.4-legacy-ga5
                liferay-faces-3.0.4-ga5
                liferay-faces-3.1.4-ga5
                liferay-faces-3.2.4-ga5