Stripes

@Validate(required=true) still throws an NPE

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: Release 1.5.2, Release 1.6
  • Fix Version/s: Release 1.5.2, Release 1.6
  • Component/s: Validation
  • Labels:
    None
  • Environment:
    Ubuntu 9.04, Sun Java 1.6.0_16

Description

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.

Activity

Hide
Marcus Kraßmann added a comment - 14/Oct/09 3:22 PM
Show
Marcus Kraßmann added a comment - 14/Oct/09 3:22 PM And the current version of the minimal example: http://github.com/MCS/Stripes-Form-Behaviour/commit/a4e88b7863842bb4b88c64e397e23a2e2ecf2433
Hide
Ben Gunter added a comment - 19/Oct/09 12:55 PM

Marcus, I just tested your example app against both the latest trunk build and the latest 1.5.x branch build. Everything worked fine for me whether I filled in the fields or not. Please try this again and let me know if you're still having this problem. I'd like to resolve this quickly, as we're trying to get 1.5.2 ready to go.

Show
Ben Gunter added a comment - 19/Oct/09 12:55 PM Marcus, I just tested your example app against both the latest trunk build and the latest 1.5.x branch build. Everything worked fine for me whether I filled in the fields or not. Please try this again and let me know if you're still having this problem. I'd like to resolve this quickly, as we're trying to get 1.5.2 ready to go.
Hide
Marcus Kraßmann added a comment - 21/Oct/09 3:39 AM

I am so sorry. I created a new workspace, downloaded my own content from github, configured server runtime new - and all works fine. Seems that my project was not using the Stripes libs I wanted it to use.

Ticket can be closed - looking forward to 1.5.2 )

Show
Marcus Kraßmann added a comment - 21/Oct/09 3:39 AM I am so sorry. I created a new workspace, downloaded my own content from github, configured server runtime new - and all works fine. Seems that my project was not using the Stripes libs I wanted it to use. Ticket can be closed - looking forward to 1.5.2 )
Hide
Kai Grabfelder added a comment - 21/Oct/09 6:17 AM

I'm still having admin rights in this jira so I'll resolve the issue. Hopefully this is ok for you Ben

Show
Kai Grabfelder added a comment - 21/Oct/09 6:17 AM I'm still having admin rights in this jira so I'll resolve the issue. Hopefully this is ok for you Ben

People

Vote (0)
Watch (0)

Dates

  • Created:
    14/Oct/09 2:58 PM
    Updated:
    04/Jan/11 2:59 PM
    Resolved:
    21/Oct/09 6:17 AM