Unable to Get the Portlet Binding Object for the Portlet Component and NullPointerException When JSFF Page Fragment With Portlet is Placed on JSF Page. (Doc ID 1351545.1)

Last updated on MARCH 08, 2017

Applies to:

Oracle WebCenter Portal - Version 11.1.1.4.0 and later
Information in this document applies to any platform.
Document checked for relevance: 03-Aug-2015

Symptoms

In JDeveloper 11.1.1.4.0 version, placing a portlet on a page fragment(JSFF) and then placing this fragment on a JSF page, the following error is reported when the JSF page is executed:

<May 4, 2011 9:29:16 AM EDT> <Alert> <Diagnostics> <BEA-320016> <Creating diagnostic image in c:\users\developer\appdata\roaming\jdeveloper\system11.1.1.4.37.59.23\defaultdomain\servers\defaultserver\adr\diag\ofm\defaultdomain\defaultserver\incident\incdir_70 with a lockout minute period of 1.>
<PortletBase> <getPortletBinding> Unable to get the portlet binding object for the portlet component Myfrag1:portlet1.
<LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase RENDER_RESPONSE 6
javax.faces.FacesException: javax.servlet.ServletException: OracleJSP error:
java.lang.NullPointerException
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:415)
at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
at oracle.adfinternal.view.faces.config.rich.RecordRequestAttributesDuringDispatch.dispatch(RecordRequestAttributesDuringDispatch.java:44)
at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)



The following steps demonstrate the problem in JDeveloper 11.1.1.4:

1. Create a new application:
     Name: application1
     Template: Webcenter Portal Application
     Project 1 name: Portal
     Project 2 Name: PortalWebAssets

2. Start Integrated WLS Server ( run - Start Server Instance)

3. Register OmniPortlet Provider:
     - Under application Resources
     - Connection , Right Click New connection, Oracle PDK Java Producer
     - Enter Name: Omniportletproducer
     - URL http://127.0.0.1:7101/portalTools/omniPortlet/providers/omniPortlet
     - Finish

4. Under Portal - WebContent - oracle - webcenter - portalapp - pages

5.  Right Click on Pages, New - JSF - JSF Page
        Name: page1.jspx
        Create as XML document ( .jspx)

        Blank Page

6. Drag OmniPortlet from left onto the Page1, (Select ADF Rich Portlet)

7. Application - Secure - Users - Create user scott, Close jazn-data.xml and Save changes

8. Right click on page 1 and goto to Page definition of Page1 ,

9. At bottom left pane, right click on page1PageDef.xml , select Edit authorization

10. Grant to: Add user: Scott

11. Run Page1 ..... Login in as scott..... Page omniportlet is shown ( though not configured)
  
      The steps so far shows Portlet  placed on JSF page directly works ok.


12. Click on Page1, and delete the Omniportlet.

13. Under Portal - WebContent - oracle - webcenter - portalapp - pages

14. Right Click on Pages, New - JSF - JSF Page Fragment
         Name: frag1.jsff
         Blank Page

15. Drag OmniPortlet from left onto the frag1, ( Select ADF Rich Portlet)

16. Back to Page1, Drag frag1.jsff from left onto page1

        Confirm Add SubViewElement: Yes, Component Identifier : Myfrag1

17. Click on SOURCE of the page1 , this is shown:
       <f:subview id="myfrag1">
       <jsp:include page="/oracle/webcenter/portalapp/pages/frag1.jsff"/>
       </f:subview>

18. Run Page1 ..... Login in as scott..... Get Blank Page.

19 In JDeveloper Server log:

Target URL -- http://127.0.0.1:7101/Application1-Portal-context-root/faces/oracle/webcenter/portalapp/pages/page1.jspx

<JUApplicationDefImpl> <logDefaultDynamicPageMapPattern> The definition at portal.DataBindings.cpx, uses a pagemap pattern match that hides other cpx files.

<PortletBase> <getPortletBinding> Unable to get the portlet binding object for the portlet component myfrag1:portlet1.

<LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase RENDER_RESPONSE 6
javax.faces.FacesException: javax.servlet.ServletException: OracleJSP error:
java.lang.NullPointerException
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:415)
at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
at oracle.adfinternal.view.faces.config.rich.RecordRequestAttributesDuringDispatch.dispatch(RecordRequestAttributesDuringDispatch.java:44)
at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)

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