[ http://mc4j.org/jira/browse/STS-326?page=comments#action_10613 ] 
            
Tim Fennell commented on STS-326:
---------------------------------

This is really bizarre.  In looking at the stack trace and the code, it would 
appear that the ErrorsTag /is/ getting a reference to a FormTag, which can only 
happen when it is nested in one (assuming there are no container bugs).  But 
that when it interacts with the FormTag, the FormTag isn't properly setup, and 
therefore cannot service the request from the ErrorsTag.

If you're still experiencing this issue, could you step through with a debugger 
and see how/where the ErrorsTag is finding a FormTag?

> Error and message tags produce null pointer exception on Weblogic 9.2 when 
> used outside of a form tag.
> ------------------------------------------------------------------------------------------------------
>
>                 Key: STS-326
>                 URL: http://mc4j.org/jira/browse/STS-326
>             Project: Stripes
>          Issue Type: Bug
>          Components: Tag Library
>    Affects Versions: Release 1.4.2
>         Environment: Weblogic 9.2 on Windows 2003
>            Reporter: Karl Kedrovsky
>         Assigned To: Tim Fennell
>
> When <stripes:errors /> or <stripes:messages /> tags are places outside of a 
> <stripes:form> tag stripes produces a null pointer exception. The stack trace 
> follows:
> java.lang.NullPointerException at 
> net.sourceforge.stripes.tag.FormTag.getActionBean(FormTag.java:305) at 
> net.sourceforge.stripes.tag.ErrorsTag.doStartTag(ErrorsTag.java:227) at 
> jsp_servlet._layout.__small_form._jspService(__small_form.java:179) at 
> weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at 
> weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
>  at 
> weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
>  at 
> weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283) 
> at 
> weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:391)
>  at 
> weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:309) 
> at 
> weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175) 
> at 
> weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:496)
>  at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDi
 spatcherImpl.java:427) at 
weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:152) at 
weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:173) at 
net.sourceforge.stripes.tag.layout.LayoutRenderTag.doEndTag(LayoutRenderTag.java:122)
 at jsp_servlet._web_45_inf._jsp.__login._jsp__tag1(__login.java:205) at 
jsp_servlet._web_45_inf._jsp.__login._jspService(__login.java:130) at 
weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at 
weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
 at 
weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
 at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283) 
at 
weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:391)
 at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:309) 
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175) 
at weblogic.
 
servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:496)
 at 
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:245)
 at 
net.sourceforge.stripes.action.ForwardResolution.execute(ForwardResolution.java:104)
 at 
net.sourceforge.stripes.controller.DispatcherHelper$7.intercept(DispatcherHelper.java:484)
 at 
net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:157)
 at 
net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(BeforeAfterMethodInterceptor.java:107)
 at 
net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:154)
 at 
net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionContext.java:73)
 
> The JSP (layout) that produced the error is:
> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
> <%@ taglib prefix="stripes" uri="http://stripes.sourceforge.net/stripes.tld"; 
> %>
> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"; %>
> <fmt:setBundle basename="StripesResources_fields"/>
> <stripes:layout-definition>
>     <stripes:layout-render name="/layout/default.jsp" 
> bannerHeading="${bannerHeading}">
>         <stripes:layout-component name="contents">
>             <center>
>                 <div class="greyBox">
>                     <div class="greyBoxHdr">
>                         <p><fmt:message key="${heading}"/></p>
>                     </div>
>                     <div class="greyBoxContent">
>                         <div id="error">
>                             <stripes:errors />
>                         </div>
>                         <div id="message">
>                             <stripes:messages />
>                         </div>
>                         ${form}
>                     </div>
>                 </div>
>                 <div class="greyBoxBottom"><img 
> src="/images/login_box_bottom.gif" width="479" height="4" /></div>
>             </center>
>         </stripes:layout-component>
>     </stripes:layout-render>
> </stripes:layout-definition>
> The JSP that is rendered by the layout (the bits in ${form}) is:
> <%@ taglib prefix="stripes" uri="http://stripes.sourceforge.net/stripes.tld"; 
> %>
> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"; %>
> <fmt:setBundle basename="StripesResources_fields"/>
> <stripes:layout-render name="/layout/small_form.jsp" siteSection="welcome" 
> heading="/Login.action.login">
>     <stripes:layout-component name="form">
>         <stripes:form action="/Login.action" focus="user.username">
>             <div class="loginCopyBox">
>                 <p><strong><fmt:message 
> key="/Login.action.forgot"/></strong></p>
>                 <p><fmt:message key="user.password"/> - <stripes:link 
> href="/ForgotPassword.action"><fmt:message 
> key="global.clickHere"/></stripes:link></p>
>                 <p><fmt:message key="user.username"/> - <stripes:link 
> href="/ForgotUsername.action"><fmt:message 
> key="global.clickHere"/></stripes:link></p>
>             </div>
>             <div class="loginForm">
>                 <p><stripes:label for="user.username"/><br /><stripes:text 
> id="user.username" name="user.username" class="input224"/></p>
>                 <p><stripes:label for="user.password"/><br 
> /><stripes:password id="user.password" name="user.password" 
> class="input224"/></p>
>             </div>
>             <div class="loginBtn">
>                 <stripes:image name="login" src="../images/btn_login.jpg" />
>             </div>
>         </stripes:form>
>     </stripes:layout-component>
> </stripes:layout-render>
> A work-around for the problem is to move the errors/messages tags to the JSP 
> that contains the form.  The exact same application runs just fine on Tomcat 
> 5.5.20.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://mc4j.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to