Uploaded image for project: 'MyFaces Trinidad'
  1. MyFaces Trinidad
  2. TRINIDAD-969

Text field validation causes NullPointerException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.5-core
    • 1.0.7-core, 1.2.7-core
    • Components
    • None
    • Win/XP, JBoss/Tomcat, Facelets

    Description

      This bug manifests itself when an inputText field is used without a label attribute and is required, for example:

      <tr:inputText simple="true" required="true"/>

      AND The page also contains a messages tag:

      <tr:messages/>

      Entering nothing into the field results in a message displayed that the field is required. Entering only whitespace characters results in a null pointer exception:

      16:48:03,927 INFO [STDOUT] 16:48:03,927 ERROR [[faces]] Servlet.service() for servlet faces threw exception
      java.lang.NullPointerException
      at org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.java:171)
      at org.apache.myfaces.trinidadinternal.io.HtmlResponseWriter.write(HtmlResponseWriter.java:340)
      at com.sun.facelets.StateWriter.write(StateWriter.java:116)
      at org.apache.myfaces.trinidadinternal.io.HtmlResponseWriter.write(HtmlResponseWriter.java:340)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.MessageBoxRenderer._renderMessageAnchor(MessageBoxRenderer.java:305)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.MessageBoxRenderer._renderComponentMessages(MessageBoxRenderer.java:263)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.MessageBoxRenderer._renderContent(MessageBoxRenderer.java:204)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.MessageBoxRenderer$BoxRenderer.renderBody(MessageBoxRenderer.java:453)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelBoxRenderer._renderMiddleRow(PanelBoxRenderer.java:267)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelBoxRenderer.encodeAll(PanelBoxRenderer.java:115)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.MessageBoxRenderer.encodeAll(MessageBoxRenderer.java:142)
      at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:220)
      at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:711)
      at org.apache.myfaces.trinidadinternal.uinode.UIComponentUINode._renderComponent(UIComponentUINode.java:337)
      at org.apache.myfaces.trinidadinternal.uinode.UIComponentUINode.render(UIComponentUINode.java:279)
      at org.apache.myfaces.trinidadinternal.uinode.UIComponentUINode.render(UIComponentUINode.java:256)
      at org.apache.myfaces.trinidadinternal.ui.composite.ContextPoppingUINode$ContextPoppingRenderer.render(ContextPoppingUINode.java:240)
      at org.apache.myfaces.trinidadinternal.ui.BaseUINode.render(BaseUINode.java:358)
      at org.apache.myfaces.trinidadinternal.ui.BaseUINode.render(BaseUINode.java:313)
      at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderChild(BaseRenderer.java:425)
      at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:343)
      at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:235)
      at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderContent(BaseRenderer.java:142)
      at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.render(BaseRenderer.java:93)
      at org.apache.myfaces.trinidadinternal.ui.laf.base.xhtml.XhtmlLafRenderer.render(XhtmlLafRenderer.java:84)
      at org.apache.myfaces.trinidadinternal.ui.BaseUINode.render(BaseUINode.java:358)
      at org.apache.myfaces.trinidadinternal.ui.BaseUINode.render(BaseUINode.java:313)
      at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderChild(BaseRenderer.java:425)
      at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:343)
      at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:235)
      at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderContent(BaseRenderer.java:142)
      at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.render(BaseRenderer.java:93)
      at org.apache.myfaces.trinidadinternal.ui.laf.base.xhtml.XhtmlLafRenderer.render(XhtmlLafRenderer.java:84)
      at org.apache.myfaces.trinidadinternal.ui.BaseUINode.render(BaseUINode.java:358)
      at org.apache.myfaces.trinidadinternal.ui.BaseUINode.render(BaseUINode.java:313)
      at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderChild(BaseRenderer.java:425)
      at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:343)
      at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:235)
      at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderContent(BaseRenderer.java:142)
      at org.apache.myfaces.trinidadinternal.ui.laf.base.xhtml.BorderLayoutRenderer.renderIndexedChildren(BorderLayoutRenderer.java:56)
      at org.apache.myfaces.trinidadinternal.ui.laf.base.xhtml.BorderLayoutRenderer.renderContent(BorderLayoutRenderer.java:86)
      at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.render(BaseRenderer.java:93)
      at org.apache.myfaces.trinidadinternal.ui.laf.base.xhtml.XhtmlLafRenderer.render(XhtmlLafRenderer.java:84)
      at org.apache.myfaces.trinidadinternal.ui.BaseUINode.render(BaseUINode.java:358)
      at org.apache.myfaces.trinidadinternal.ui.BaseUINode.render(BaseUINode.java:313)
      at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderChild(BaseRenderer.java:425)
      at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:343)
      at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:235)
      at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderContent(BaseRenderer.java:142)
      at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.render(BaseRenderer.java:93)
      at org.apache.myfaces.trinidadinternal.ui.laf.base.xhtml.XhtmlLafRenderer.render(XhtmlLafRenderer.java:84)
      at org.apache.myfaces.trinidadinternal.ui.BaseUINode.render(BaseUINode.java:358)
      at org.apache.myfaces.trinidadinternal.ui.BaseUINode.render(BaseUINode.java:313)
      at org.apache.myfaces.trinidadinternal.ui.composite.UINodeRenderer.renderWithNode(UINodeRenderer.java:104)
      at org.apache.myfaces.trinidadinternal.ui.composite.UINodeRenderer.render(UINodeRenderer.java:50)
      at org.apache.myfaces.trinidadinternal.uinode.UIXComponentUINode.renderInternal(UIXComponentUINode.java:192)
      at org.apache.myfaces.trinidadinternal.uinode.UINodeRendererBase.encodeEnd(UINodeRendererBase.java:70)
      at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:711)
      at org.apache.myfaces.trinidad.render.RenderUtils.encodeRecursive(RenderUtils.java:68)
      at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:294)
      at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:316)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelPartialRootRenderer.renderContent(PanelPartialRootRenderer.java:64)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyRenderer.renderContent(BodyRenderer.java:139)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelPartialRootRenderer.encodeAll(PanelPartialRootRenderer.java:119)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyRenderer.encodeAll(BodyRenderer.java:79)
      at org.apache.myfaces.trinidad.render.CoreRenderer.delegateRenderer(CoreRenderer.java:330)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.DocumentRenderer.encodeAll(DocumentRenderer.java:80)
      at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:220)
      at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:711)
      at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:252)
      at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249)
      at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:594)
      at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:182)
      at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)

      Attachments

        1. bz23797.jsp
          1 kB
          Steve Horne

        Activity

          People

            Unassigned Unassigned
            stevehorne Steve Horne
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: