Newly Added Portlets are Unavailable in Re-Deployed Consumer

(Doc ID 1078202.1)

Last updated on MARCH 08, 2017

Applies to:

Oracle WebCenter Portal - Version 11.1.1.1.0 to 11.1.1.5.0 [Release 11g]
Information in this document applies to any platform.

Symptoms

Portlet does not work if it was added after initial deployment of the consumer. When redeploying the consumer with the new portlet added to a page then the following error message is displayed only for the portlet that was added after the initial deployment:

Portlet unavailable


In the HTML source and in the WLS logs the following exception is logged:

Portlet unavailable at oracle.adf.model.portlet.binding.PortletBinding._initModel(PortletBinding.java:520)
at oracle.adf.model.portlet.binding.PortletBinding.initModel(PortletBinding.java:863)
at oracle.adf.model.portlet.binding.PortletBinding._refresh(PortletBinding.java:399)
at oracle.adf.model.portlet.binding.PortletBinding.refresh(PortletBinding.java:872)
at oracle.adf.model.binding.DCExecutableBinding.refreshIfNeeded(DCExecutableBinding.java:328)
at oracle.adf.model.portlet.binding.PortletBinding.refreshIfNeeded(PortletBinding.java:442)
at oracle.adf.model.portlet.binding.PortletBinding.prepareRenderPhase(PortletBinding.java:460)
at oracle.adf.model.portlet.binding.PortletBinding._refresh(PortletBinding.java:403)
at oracle.adf.model.portlet.binding.PortletBinding.refresh(PortletBinding.java:872)
at oracle.adf.model.binding.DCBindingContainer.internalRefreshControl(DCBindingContainer.java:3107)
at oracle.adf.model.binding.DCBindingContainer.refresh(DCBindingContainer.java:2759)
at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.prepareRender(PageLifecycleImpl.java:548)
at oracle.adf.controller.v2.lifecycle.Lifecycle$9.execute(Lifecycle.java:224)
at oracle.adfinternal.controller.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:192)
at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.mav$executePhase(ADFPhaseListener.java:21)
at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$5.before(ADFPhaseListener.java:395)
at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.beforePhase(ADFPhaseListener.java:60)
at oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener.beforePhase(ADFLifecyclePhaseListener.java:44)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:246)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:193)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.portlet.client.adapter.adf.ADFPortletFilter.doFilter(ADFPortletFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:85)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:54)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.wls.JpsWlsFilter$1.run(JpsWlsFilter.java:96)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.wls.util.JpsWlsUtil.runJaasMode(JpsWlsUtil.java:146)
at oracle.security.jps.wls.JpsWlsFilter.doFilter(JpsWlsFilter.java:140)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.webcenter.lifecycle.filter.LifecycleLockFilter.doFilter(LifecycleLockFilter.java:136)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:202)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3588)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2200)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2106)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1428)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: oracle.portlet.client.persistence.PersistenceNotFoundException: mdsId=/oracle/adf/portlet/UniOfPretoriaWSRPProducer/ap/Enportlet2default_ff1040e8_0125_1000_8003_8d90f1fdcea1.pxml not found
at oracle.portlet.client.persistenceimpl.mds.MDSPersistenceContext.getInternal(MDSPersistenceContext.java:649)
at oracle.portlet.client.persistenceimpl.mds.MDSPersistenceContext.get(MDSPersistenceContext.java:604)
at oracle.portlet.client.beanimpl.persistence.PersistenceBeanFactory.getExisting(PersistenceBeanFactory.java:249)
at oracle.portlet.client.beanimpl.persistence.PersistenceBeanContext.getExisting(PersistenceBeanContext.java:110)
at oracle.portlet.client.containerimpl.PublicFactoryImpl.get(PublicFactoryImpl.java:300)
at oracle.portlet.client.containerimpl.PublicFactoryImpl.get(PublicFactoryImpl.java:310)
at oracle.portlet.client.containerimpl.PortletContainerImpl.getById(PortletContainerImpl.java:331)
at oracle.portlet.client.containerimpl.PortletContainerImpl.getPortlet(PortletContainerImpl.java:253)
at oracle.adfinternal.model.portlet.binding.PortletModelImpl.init(PortletModelImpl.java:100)
at oracle.adf.model.portlet.binding.PortletBinding$InnerPortletModel.init(PortletBinding.java:978)
at oracle.adfinternal.model.portlet.binding.ActivityPortletModelWrapper.init(ActivityPortletModelWrapper.java:79)
at oracle.adf.model.portlet.binding.PortletBinding._initModel(PortletBinding.java:514)
... 59 more
Caused by: oracle.mds.core.MetadataNotFoundException: MDS-00013: no metadata found for metadata object "/oracle/adf/portlet/UniOfPretoriaWSRPProducer/ap/Enportlet2default_ff1040e8_0125_1000_8003_8d90f1fdcea1.pxml"
at oracle.mds.core.MetadataObject.getBaseMOFromCache(MetadataObject.java:1625)
at oracle.mds.core.MetadataObject.getBaseMO(MetadataObject.java:927)
at oracle.mds.core.MDSSession.getBaseMO(MDSSession.java:2627)
at oracle.mds.core.MDSSession.getMetadataObject(MDSSession.java:1264)
at oracle.portlet.client.persistenceimpl.mds.MDSSessionWrapper.getBaseReadOnlyMO(MDSSessionWrapper.java:256)
at oracle.portlet.client.persistenceimpl.mds.MDSPersistenceContext.getInternal(MDSPersistenceContext.java:634)
... 70 more


This problem only occurs if the MDS used for the WebCenter application is database-based, the problem does not occur when using file-based MDS.

The only workaround is to

1. Create a new Metadata Repository
2. Create a new JSF page instead of the problematic one

Of course, as a result all application customization is lost.

Steps to reproduce:

1. Create a new "Portlet Producer Application" in JDeveloper 11g

2. Create a "Standards-based Java Portlet (JSR 168), Portlet1

3. Create a deployment profile

4. Deploy the application to a WLS_Portlet of WebCenter

5. Create a new "WebCenter Application" in JDeveloper 11g

6. Create a new .jspx page in the View project

7. Add a "Layout Cutomizable" component to the page

8. Add a new "WSRP Producer" connection (pointing to the "Portlet Producer" created in step 1) to the "WebCenter Application"

9. Add Portlet1 to a "Panel Customizable" component in the "Layout Cutomizable" component.

10. Deploy the "WebCenter Application" from JDeveloper for example to WLS_Spaces. When prompted for a "Repository Name", select a repositoy that is of type "DB" (an MDS database should be previously installed and registered) An example could be the default mds-SpacesDS MDS Repository in the WebCenter DB

11. Test the page to see if PORTLET1 is visible and working

12. Now create another "Standards-based Java Portlet (JSR 168), Portlet2 in the "Portlet Producer Application" in JDeveloper

13. Re-deploy the "Portlet Producer Application" from JDeveloper

14. Now refresh the "WSRP Producer" in the consumer "WebCenter Application"

15. Add PORTLET2 to a "Panel Customizable" component in the "Layout Cutomizable" component.

16. Re-deploy the "WebCenter Application" from JDeveloper. When prompted for a "Repository Name", select a repositoy that is of type "DB", an example could be the default mds-SpacesDS MDS Repository in the WebCenter DB

17 . Test the page. Portlet2 will show an error "Portlet unavailable"

18. If you clear the DB MDS and redeploy the "WebCenter Application", the error is corrected, but all other customizations are lost.
Also, if you create a new JSF page, and add the portlets to there then the error is fixed but the customizations of the original page are lost.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms