Topic
3 replies Latest Post - ‏2013-05-16T09:32:20Z by fkorenschi
portlet_Factory
portlet_Factory
2 Posts
ACCEPTED ANSWER

Pinned topic NullPointerException on JSF 2.0 Validation failure in Portal 8.0

‏2013-04-28T03:24:08Z |

 

I'm developing JSF 2.0 portlet on WebSphere Portal 8.0. 
On validation failure I get NullPointerException so the portlet becomes unavailable. If validation is OK I can see redirect page.
I appreciate any input. 

Caused by: java.lang.NullPointerException
at com.ibm.ws.portletcontainer.core.impl.PortletContextImpl.getRequestDispatcher(PortletContextImpl.java:57)
at com.ibm.faces20.portlet.httpbridge.PortletRequestWrapper.getRequestDispatcher(PortletRequestWrapper.java:439)
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:355)
at com.ibm.faces20.portlet.httpbridge.PortletExternalContextWrapper.dispatch(PortletExternalContextWrapper.java:107)
at org.apache.myfaces.view.jsp.JspViewDeclarationLanguage.buildView(JspViewDeclarationLanguage.java:94)
at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:66)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:239)
at com.ibm.faces20.portlet.FacesPortlet.doRender(FacesPortlet.java:487)
... 223 more
 
Please check detail in attached file JSF2.0Issue.zip which contains:
- More detail exception message
- Snap code for input required validation in xhtml file
- faces-config.xml
- webapp lib

Attachments

  • fkorenschi
    fkorenschi
    3 Posts
    ACCEPTED ANSWER

    Re: NullPointerException on JSF 2.0 Validation failure in Portal 8.0

    ‏2013-05-15T13:50:01Z  in response to portlet_Factory

    Hi there,

    I managed to somehow corelate this issue to upgrading WAS from version 8.0.0.3 to 8.0.0.5 or 8.0.0.6. (It works ok with 8.0.0.3). But now WAS 8.0.0.5+ is required for WP 8.0.0.1. So ... we are pretty f@#$ed on this one.

    Did you manage to get any support or solution to this?

    Eduard

    Updated on 2013-05-15T13:50:23Z at 2013-05-15T13:50:23Z by fkorenschi
  • portlet_Factory
    portlet_Factory
    2 Posts
    ACCEPTED ANSWER

    Re: NullPointerException on JSF 2.0 Validation failure in Portal 8.0

    ‏2013-05-16T02:42:38Z  in response to portlet_Factory

    Fortunately I get  some support from IBM. This issue is fixed by adding below in web.xml

     

    <context-param>
            <param-name>javax.faces.PARTIAL_STATE_SAVING</param-name>
            <param-value>false</param-value>
    </context-param>
     

    Here is the tech note about this issue:

    http://www-01.ibm.com/support/docview.wss?uid=swg21611984

    • fkorenschi
      fkorenschi
      3 Posts
      ACCEPTED ANSWER

      Re: NullPointerException on JSF 2.0 Validation failure in Portal 8.0

      ‏2013-05-16T09:32:20Z  in response to portlet_Factory

      Ok, but i find it strange that this saved your situation. According to the document, the NPE in that case was during restore view, with a completely different stack tracke from the one you mentioned in your initial post (and which i also got).

      In my case, what seems to work for now is to avoid using full page submits. As long as i use only ajax submits, things seem to work smoothly. I'll give it a try with that param too anyway.

       

      Tx