@Validate(required=true) still throws an NPE
--------------------------------------------

                 Key: STS-718
                 URL: http://www.stripesframework.org/jira/browse/STS-718
             Project: Stripes
          Issue Type: Sub-task
          Components: Validation
    Affects Versions: Release 1.5.2, Release 1.6
         Environment: Ubuntu 9.04, Sun Java 1.6.0_16
            Reporter: Marcus Kraßmann
            Priority: Minor


Although the sourcePage is now correct, an NullPointerException is thrown if 
the validation error's cause is a @Validate annotation. Although this fails, 
validation errors that are added in ValidationMethods work fine.

Stacktrace, based on the previous linked Eclipse Dynamic Web Project 
"Form-Behaviour" after i did not fill in anything in any field:

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from 
fulfilling this request.

exception

org.apache.jasper.JasperException: java.lang.NullPointerException
        
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
        
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        
net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:247)
        
net.sourceforge.stripes.action.ForwardResolution.execute(ForwardResolution.java:110)
        
net.sourceforge.stripes.controller.DispatcherHelper$7.intercept(DispatcherHelper.java:483)
        
net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:158)
        
net.sourceforge.stripes.controller.HttpCacheInterceptor.intercept(HttpCacheInterceptor.java:99)
        
net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)
        
net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(BeforeAfterMethodInterceptor.java:113)
        
net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)
        
net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionContext.java:74)
        
net.sourceforge.stripes.controller.DispatcherHelper.executeResolution(DispatcherHelper.java:477)
        
net.sourceforge.stripes.controller.DispatcherServlet.executeResolution(DispatcherServlet.java:286)
        
net.sourceforge.stripes.controller.DispatcherServlet.service(DispatcherServlet.java:170)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        
net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:247)

root cause

java.lang.NullPointerException
        
net.sourceforge.stripes.tag.layout.LayoutDefinitionTag.doStartTag(LayoutDefinitionTag.java:72)
        org.apache.jsp.inc.form_jsp._jspService(form_jsp.java:93)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        
net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:247)
        
net.sourceforge.stripes.action.ForwardResolution.execute(ForwardResolution.java:110)
        
net.sourceforge.stripes.controller.DispatcherHelper$7.intercept(DispatcherHelper.java:483)
        
net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:158)
        
net.sourceforge.stripes.controller.HttpCacheInterceptor.intercept(HttpCacheInterceptor.java:99)
        
net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)
        
net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(BeforeAfterMethodInterceptor.java:113)
        
net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)
        
net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionContext.java:74)
        
net.sourceforge.stripes.controller.DispatcherHelper.executeResolution(DispatcherHelper.java:477)
        
net.sourceforge.stripes.controller.DispatcherServlet.executeResolution(DispatcherServlet.java:286)
        
net.sourceforge.stripes.controller.DispatcherServlet.service(DispatcherServlet.java:170)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        
net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:247)
 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Tested with current subversion trunk and 1.5.x branch. Priority set to minor 
because using validation methods is an acceptable workaround.

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

       

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to