myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias Wessendorf" <mat...@apache.org>
Subject Re: [Trinidad] BUG? NullPointerException in unlabeled inputText
Date Tue, 26 Feb 2008 08:57:18 GMT
Hi,

thanks for filing the ticket on this.
stay tuned.

-Matthias

On Mon, Feb 25, 2008 at 11:26 PM, Steve Horne <stevehorne@gmail.com> wrote:
> In researching a bug in my application, I have created this example that
> recreates the problem, which seems to be a Trinidad bug...
>
> In order to reproduce, you should enter SPACES ONLY into the text field and
> submit the form.  The error does not occur if you enter NOTHING or if you
> enter non-whitespace characters-  only if the input is spaces.
>
> The error seems to be an attempt to retrieve the message label curing the
> render of the messages tag..  If I specify a label attribute on the
> inputText, it works correctly.
>
> The stacktrace is shown below the source...
>
> The JSP:
> =================================SNIP============================
> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
>           xmlns:f="http://java.sun.com/jsf/core"
>            xmlns:tr="http://myfaces.apache.org/trinidad" >
>   <jsp:directive.page contentType="text/html;charset=utf-8"/>
>   <f:view>
>      <tr:document title="Apache Trinidad Demo Index">
>        <tr:form>
>         <tr:panelPage>
>          <tr:messages/>
>          Without a label:<tr:inputText required="true" />
>              <tr:commandButton text="do it" />
>         </tr:panelPage>
>
>        </tr:form>
>     </tr:document>
>   </f:view>
> </jsp:root>
> =================================SNIP============================
>
> Stacktrace:
> SEVERE: Error Rendering View[/test/bz23797.jsp]
> 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)
>  --
> "Many men go fishing all of their lives without knowing it is not fish they
> are after."
>
> - Henry David Thoreau



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

Mime
View raw message