Error after adding a portlet to a page in JBoss Portal

Solution Unverified - Updated -

Environment

  • Red Hat JBoss Portal
    • 5.2.2
    • 6.1.1

Issue

  • I get NoSuchDataException after adding a RichFaces portlet to a dashboard tab in EPP 5.2.2
2014-03-19 11:53:17,875 ERROR [portal:UIPortletLifecycle] (http-0.0.0.0-8080-27) Portlet render threw an exception
org.exoplatform.services.portletcontainer.PortletContainerException: org.exoplatform.portal.config.NoSuchDataException: Can not find d841cbfbc0a8088319ce667f85f0bfcd
        at org.exoplatform.portal.webui.application.UIPortletLifecycle.processRender(UIPortletLifecycle.java:336)
        at org.exoplatform.portal.webui.application.UIPortletLifecycle.processRender(UIPortletLifecycle.java:62)
        at org.exoplatform.webui.core.UIComponent.processRender(UIComponent.java:144)
        at org.exoplatform.webui.core.UIContainer.renderChildren(UIContainer.java:368)
        at org.exoplatform.webui.core.UIContainer.renderChildren(UIContainer.java:358)
        at sun.reflect.GeneratedMethodAccessor501.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:229)
        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
        at UIPage.run(UIPage.gtmpl:8)
...
  • The browser displays a pop-up "RichFaces is not defined" after adding a RichFaces portlet to a page in JBoss Portal 6.1.1

Resolution

  • The issue has been filed as BZ:

    • https://bugzilla.redhat.com/show_bug.cgi?id=1080254 (RHJP 5)
    • https://bugzilla.redhat.com/show_bug.cgi?id=1080249 (RHJP 6)
  • As an interim workaround, please apply the attached gatein-concurrency-servlet-filter.zip.

  • [Instruction for JBoss Portal 5.2.2]
  <filter>
    <filter-name>DashboardConcurrencyFilter</filter-name>
    <filter-class>com.redhat.jboss.support.DashboardConcurrencyFilter</filter-class>
     <init-param>
        <param-name>maxRetry</param-name>
    <param-value>100</param-value>
     </init-param>
  </filter>
  <filter>
    <filter-name>PageSaveConcurrencyFilter</filter-name>
    <filter-class>com.redhat.jboss.support.PageSaveConcurrencyFilter</filter-class>
     <init-param>
        <param-name>maxRetry</param-name>
        <param-value>100</param-value>
     </init-param>
  </filter>

...

  <filter-mapping>
    <filter-name>DashboardConcurrencyFilter</filter-name>
          <url-pattern>/u/*</url-pattern>
  </filter-mapping>
  <filter-mapping>
    <filter-name>PageSaveConcurrencyFilter</filter-name>
          <url-pattern>/*</url-pattern>
  </filter-mapping>
  • Make sure that these <filter-mapping> elements are AFTER <filter-mapping> for LocalizationFilter.

NOTE: If you deploy a custom portal container, you would need to configure the filter in its web.xml as well (e.g. gatein-sample-portal.ear/exo.portal.sample.portal.war-5.2.2.GA.war/WEB-INF/web.xml). No need to additionally place the jar inside the custom portal container EAR because gatein.ear/lib is visible from other EARs.

  • This Filter is designed to avoid concurrency against UserSite creation and page save which is described in BZ1059036 (See https://access.redhat.com/site/solutions/705793) and BZ1080254 (This issue). This only serialize the first accesses to a dashboard or page save action so will not affect the performance of usual use.

Attachments

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments