Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4168

NullPointerException on Checkboxlist

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.15.1
    • Fix Version/s: 2.3.16
    • Labels:
      None
    • Environment:

      tomcat/centos 5

      Description

      Hello,

      I am getting null pointer exceptions on line :

      Caused by: java.lang.NullPointerException
      at template.events.CheckboxListHandler.isChecked(CheckboxListHandler.java:125)
      at template.events.CheckboxListHandler.generate(CheckboxListHandler.java:80)
      at org.apache.struts2.views.java.DefaultTheme.renderTag(DefaultTheme.java:120)
      at org.apache.struts2.views.java.JavaTemplateEngine.renderTemplate(JavaTemplateEngine.java:95)
      at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:572)
      at org.apache.struts2.components.UIBean.end(UIBean.java:526)

      we need to check for if(nameValues)!=null

      ie:

      private Boolean isChecked(Map<String, Object> params, String itemKeyStr) {
        Boolean checked = false;
        if (itemKeyStr != null) {
          String[] nameValues = (String[]) params.get("nameValue");
          if(nameValues)!=null  // need this <<<<<<<<<<
            for (String value : nameValues) {
              if (checked = value.equalsIgnoreCase(itemKeyStr))
              { break; }
            }
          }
        }
          return checked;
      }
      
      

      Cheers Greg

        Activity

        Hide
        bphillips Bruce Phillips added a comment -

        Greg - Can you please provide a simple example that I can use to replicate the issue you've reported. I cannot reproduce the issue using the form tags example (which includes a checkboxlist tag) that is available here: https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2examples

        Thank you.

        Show
        bphillips Bruce Phillips added a comment - Greg - Can you please provide a simple example that I can use to replicate the issue you've reported. I cannot reproduce the issue using the form tags example (which includes a checkboxlist tag) that is available here: https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2examples Thank you.
        Hide
        lukaszlenart Lukasz Lenart added a comment -
        Show
        lukaszlenart Lukasz Lenart added a comment - Bruce Phillips I think Greg uses the Javatemplate plugin http://struts.apache.org/development/2.x/docs/javatemplates-plugin.html
        Hide
        bphillips Bruce Phillips added a comment -

        I added the JavaTemplates plugin to the form tags example application but could not reproduce the issue reported by Greg.

        Show
        bphillips Bruce Phillips added a comment - I added the JavaTemplates plugin to the form tags example application but could not reproduce the issue reported by Greg.
        Hide
        lukaszlenart Lukasz Lenart added a comment -

        Have you defined constants in struts.xml like below?:

        <constant name="struts.ui.templateSuffix" value="java" />
        <constant name="struts.ui.theme" value="simple" />
        
        Show
        lukaszlenart Lukasz Lenart added a comment - Have you defined constants in struts.xml like below?: <constant name= "struts.ui.templateSuffix" value= "java" /> <constant name= "struts.ui.theme" value= "simple" />
        Hide
        bphillips Bruce Phillips added a comment -

        yes

        Show
        bphillips Bruce Phillips added a comment - yes
        Hide
        lukaszlenart Lukasz Lenart added a comment -

        Cool, so we need [~gregh99]'s help here

        Show
        lukaszlenart Lukasz Lenart added a comment - Cool, so we need [~gregh99] 's help here
        Hide
        ghuber Greg Huber added a comment - - edited

        Hello,

        Do you have the modified webapp that you used anywhere I can download?

        Cheers Greg

        Show
        ghuber Greg Huber added a comment - - edited Hello, Do you have the modified webapp that you used anywhere I can download? Cheers Greg
        Hide
        ghuber Greg Huber added a comment -

        OK, here is how to make it fail:

        Make sure the value in name="bean.defaultPluginsArray" == null ie a list item with a null checked value.

        <s:checkboxlist list="pluginsList" name="bean.defaultPluginsArray" listKey="name" listValue="name" />

        /**

        • Gets the plugins list.
        • @return the plugins list
          */
          public List<?> getPluginsList() {
          return pluginsList;
          }

        I am not sure we can guarantee that the will not be a null in nameValues, so its always safer to check for nulls before a for loop. I don't know why the pesky for loop can't check for these itself.

        Cheers Greg.

        Show
        ghuber Greg Huber added a comment - OK, here is how to make it fail: Make sure the value in name="bean.defaultPluginsArray" == null ie a list item with a null checked value. <s:checkboxlist list="pluginsList" name="bean.defaultPluginsArray" listKey="name" listValue="name" /> /** Gets the plugins list. @return the plugins list */ public List<?> getPluginsList() { return pluginsList; } I am not sure we can guarantee that the will not be a null in nameValues, so its always safer to check for nulls before a for loop. I don't know why the pesky for loop can't check for these itself. Cheers Greg.
        Hide
        bphillips Bruce Phillips added a comment - - edited

        Greg - I'm not following your example code above. The name attribute's value will be evaluated as a String not as an OGNL expression the way you have written it. So I don't follow how the name attribute's value can be null.

        As I mentioned before there is a form tags example that includes using the checkBoxList Struts tag here:

        https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2examples

        You can checkout the examples. Feel free to modify the form tags example to generate the NPE and then attach your zipped form tags example to this issue.

        Also I'm not sure that the framework should handle/check for NPE when the NULL value is a result of a framework user's code.

        Bruce

        Show
        bphillips Bruce Phillips added a comment - - edited Greg - I'm not following your example code above. The name attribute's value will be evaluated as a String not as an OGNL expression the way you have written it. So I don't follow how the name attribute's value can be null. As I mentioned before there is a form tags example that includes using the checkBoxList Struts tag here: https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2examples You can checkout the examples. Feel free to modify the form tags example to generate the NPE and then attach your zipped form tags example to this issue. Also I'm not sure that the framework should handle/check for NPE when the NULL value is a result of a framework user's code. Bruce
        Hide
        ghuber Greg Huber added a comment -

        Bruce,

        This was a recent mod done by Lukasz as the checkboxlist was not rendering correctly. Also, if I switch back to the standard theme I do not get the npe.

        .....Sorry, I will explain how I do the list so forgive me!

        The backing variables for the checkbox list start off as a string in my db (which can be null in its initial state), and are split to a string[] to match the available plugins:

        eg:

        db >> defaultPluginsArray = "Convert Line Breaks,Smilies"

        bean class:

        if (db.getDefaultPlugins() != null) {
        defaultPluginsArray = StringUtils.split(db.getDefaultPlugins(), ",");
        }

        /**

        • Gets the default plugins array. >>>> bean.defaultPluginsArray on <s:checkboxlist below
        • @return the default plugins array
          */
          public String[] getDefaultPluginsArray() {
          return defaultPluginsArray;
          }

        Then I have available plugins as a list. These will be "Convert Line Breaks" and "Smilies"

        /**

        • Gets the plugins list. >>>> pluginsList on <s:checkboxlist below
        • @return the plugins list
          */
          public List<EventEntryPlugin> getPluginsList() {
          return pluginsList;
          }

        >>>> listKey="name" listValue="name" on <s:checkboxlist below

        #1 EventEntryPlugin.getName() = Convert Line Breaks
        #2 EventEntryPlugin.getName() = Smilies

        The checkbox list then checks the two values and if they match it shows whether or not its selected.

        <s:checkboxlist list="pluginsList" name="bean.defaultPluginsArray" listKey="name" listValue="name" />

        However, if the initial state in the db of bean.defaultPluginsArray = null, we get the npe.

        In your example that you used to test it, make sure the backing variable in s:checkboxlist name == null.

        I could possible modify the example but I don't use maven and checkig out form_tags example gives lots of errors.

        Cheers Greg

        Show
        ghuber Greg Huber added a comment - Bruce, This was a recent mod done by Lukasz as the checkboxlist was not rendering correctly. Also, if I switch back to the standard theme I do not get the npe. .....Sorry, I will explain how I do the list so forgive me! The backing variables for the checkbox list start off as a string in my db (which can be null in its initial state), and are split to a string[] to match the available plugins: eg: db >> defaultPluginsArray = "Convert Line Breaks,Smilies" bean class: if (db.getDefaultPlugins() != null) { defaultPluginsArray = StringUtils.split(db.getDefaultPlugins(), ","); } /** Gets the default plugins array. >>>> bean.defaultPluginsArray on <s:checkboxlist below @return the default plugins array */ public String[] getDefaultPluginsArray() { return defaultPluginsArray; } Then I have available plugins as a list. These will be "Convert Line Breaks" and "Smilies" /** Gets the plugins list. >>>> pluginsList on <s:checkboxlist below @return the plugins list */ public List<EventEntryPlugin> getPluginsList() { return pluginsList; } >>>> listKey="name" listValue="name" on <s:checkboxlist below #1 EventEntryPlugin.getName() = Convert Line Breaks #2 EventEntryPlugin.getName() = Smilies The checkbox list then checks the two values and if they match it shows whether or not its selected. <s:checkboxlist list="pluginsList" name="bean.defaultPluginsArray" listKey="name" listValue="name" /> However, if the initial state in the db of bean.defaultPluginsArray = null, we get the npe. In your example that you used to test it, make sure the backing variable in s:checkboxlist name == null. I could possible modify the example but I don't use maven and checkig out form_tags example gives lots of errors. Cheers Greg
        Hide
        lukaszlenart Lukasz Lenart added a comment -

        [~gregh99] could you post the whole stacktrace?

        Show
        lukaszlenart Lukasz Lenart added a comment - [~gregh99] could you post the whole stacktrace?
        Hide
        ghuber Greg Huber added a comment -

        Lukasaz,

        I can do the whole stack traces but this is the last one:

        java.lang.NullPointerException

        template.events.CheckboxListHandler.isChecked(CheckboxListHandler.java:126)
        template.events.CheckboxListHandler.generate(CheckboxListHandler.java:80)
        org.apache.struts2.views.java.DefaultTheme.renderTag(DefaultTheme.java:120)
        org.apache.struts2.views.java.JavaTemplateEngine.renderTemplate(JavaTemplateEngine.java:95)
        org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:572)
        org.apache.struts2.components.UIBean.end(UIBean.java:526)
        org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)
        org.apache.jsp.WEB_002dINF.jsps.editor.configWebsite_jsp._jspx_meth_s_005fcheckboxlist_005f0(configWebsite_jsp.java:2390)
        org.apache.jsp.WEB_002dINF.jsps.editor.configWebsite_jsp._jspx_meth_s_005fif_005f8(configWebsite_jsp.java:2291)
        org.apache.jsp.WEB_002dINF.jsps.editor.configWebsite_jsp._jspx_meth_s_005fform_005f0(configWebsite_jsp.java:453)
        org.apache.jsp.WEB_002dINF.jsps.editor.configWebsite_jsp._jspService(configWebsite_jsp.java:152)
        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:388)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
        org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
        org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
        org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
        org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:653)
        org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:647)
        org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:80)
        org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequestContext.java:73)
        org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesRequestContextWrapper.java:72)
        org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesRequestContext.java:84)
        org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:283)
        org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:140)
        org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:117)
        org.apache.tiles.jsp.taglib.RenderTagSupport.execute(RenderTagSupport.java:154)
        org.apache.tiles.jsp.taglib.RoleSecurityTagSupport.doEndTag(RoleSecurityTagSupport.java:75)
        org.apache.tiles.jsp.taglib.ContainerTagSupport.doEndTag(ContainerTagSupport.java:80)
        org.apache.jsp.WEB_002dINF.jsps.tiles.tiles_002dtabbedpage_jsp._jspx_meth_tiles_005finsertAttribute_005f5(tiles_002dtabbedpage_jsp.java:388)
        org.apache.jsp.WEB_002dINF.jsps.tiles.tiles_002dtabbedpage_jsp._jspService(tiles_002dtabbedpage_jsp.java:162)
        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:388)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        org.events.ui.core.filters.PersistenceSessionFilter.doFilter(PersistenceSessionFilter.java:41)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:108)
        org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:64)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:183)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:65)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
        org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:166)
        org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
        org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        org.events.ui.core.filters.CharEncodingFilter.doFilter(CharEncodingFilter.java:65)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
        org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
        org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
        org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
        org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(ServletTilesRequestContext.java:198)
        org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(ServletTilesRequestContext.java:179)
        org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesRequestContextWrapper.java:72)
        org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesRequestContext.java:84)
        org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:606)
        org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:246)
        org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:105)
        org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
        com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:371)
        com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:275)
        com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:100)
        com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:100)
        com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        org.events.ui.struts2.interceptors.CachingHeadersInterceptor.intercept(CachingHeadersInterceptor.java:44)
        com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:100)
        com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        org.events.ui.struts2.util.UIActionPrepareInterceptor.doIntercept(UIActionPrepareInterceptor.java:37)
        com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
        com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        org.events.ui.struts2.util.UISecurityInterceptor.intercept(UISecurityInterceptor.java:134)
        com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        org.events.ui.struts2.util.UIActionInterceptor.intercept(UIActionInterceptor.java:99)
        com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)
        com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:239)
        com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
        com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:239)
        com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
        com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191)
        com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:73)
        com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91)
        com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:252)
        com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
        com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
        com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189)
        com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
        org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
        org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:563)
        org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
        org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        org.events.ui.rendering.filters.RequestMappingFilter.doFilter(RequestMappingFilter.java:133)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        org.events.ui.rendering.filters.DeviceResolverRequestFilter.doFilterInternal(DeviceResolverRequestFilter.java:55)
        org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        org.events.ui.core.filters.InitFilter.doFilter(InitFilter.java:60)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        org.events.ui.core.filters.PersistenceSessionFilter.doFilter(PersistenceSessionFilter.java:41)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
        org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:183)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
        org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
        org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
        org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
        org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        org.events.ui.core.filters.SchemeEnforcementFilter.doFilter(SchemeEnforcementFilter.java:104)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        org.events.ui.core.filters.CharEncodingFilter.doFilter(CharEncodingFilter.java:65)
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
        org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)
        org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
        java.lang.Thread.run(Thread.java:722)

        Show
        ghuber Greg Huber added a comment - Lukasaz, I can do the whole stack traces but this is the last one: java.lang.NullPointerException template.events.CheckboxListHandler.isChecked(CheckboxListHandler.java:126) template.events.CheckboxListHandler.generate(CheckboxListHandler.java:80) org.apache.struts2.views.java.DefaultTheme.renderTag(DefaultTheme.java:120) org.apache.struts2.views.java.JavaTemplateEngine.renderTemplate(JavaTemplateEngine.java:95) org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:572) org.apache.struts2.components.UIBean.end(UIBean.java:526) org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42) org.apache.jsp.WEB_002dINF.jsps.editor.configWebsite_jsp._jspx_meth_s_005fcheckboxlist_005f0(configWebsite_jsp.java:2390) org.apache.jsp.WEB_002dINF.jsps.editor.configWebsite_jsp._jspx_meth_s_005fif_005f8(configWebsite_jsp.java:2291) org.apache.jsp.WEB_002dINF.jsps.editor.configWebsite_jsp._jspx_meth_s_005fform_005f0(configWebsite_jsp.java:453) org.apache.jsp.WEB_002dINF.jsps.editor.configWebsite_jsp._jspService(configWebsite_jsp.java:152) 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:388) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551) org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488) org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968) org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:653) org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:647) org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:80) org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequestContext.java:73) org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesRequestContextWrapper.java:72) org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesRequestContext.java:84) org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:283) org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:140) org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:117) org.apache.tiles.jsp.taglib.RenderTagSupport.execute(RenderTagSupport.java:154) org.apache.tiles.jsp.taglib.RoleSecurityTagSupport.doEndTag(RoleSecurityTagSupport.java:75) org.apache.tiles.jsp.taglib.ContainerTagSupport.doEndTag(ContainerTagSupport.java:80) org.apache.jsp.WEB_002dINF.jsps.tiles.tiles_002dtabbedpage_jsp._jspx_meth_tiles_005finsertAttribute_005f5(tiles_002dtabbedpage_jsp.java:388) org.apache.jsp.WEB_002dINF.jsps.tiles.tiles_002dtabbedpage_jsp._jspService(tiles_002dtabbedpage_jsp.java:162) 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:388) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.events.ui.core.filters.PersistenceSessionFilter.doFilter(PersistenceSessionFilter.java:41) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:108) org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:64) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:183) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:65) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:166) org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.events.ui.core.filters.CharEncodingFilter.doFilter(CharEncodingFilter.java:65) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436) org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374) org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302) org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(ServletTilesRequestContext.java:198) org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(ServletTilesRequestContext.java:179) org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesRequestContextWrapper.java:72) org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesRequestContext.java:84) org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:606) org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:246) org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:105) org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186) com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:371) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:275) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:100) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:100) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) org.events.ui.struts2.interceptors.CachingHeadersInterceptor.intercept(CachingHeadersInterceptor.java:44) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:100) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) org.events.ui.struts2.util.UIActionPrepareInterceptor.doIntercept(UIActionPrepareInterceptor.java:37) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) org.events.ui.struts2.util.UISecurityInterceptor.intercept(UISecurityInterceptor.java:134) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) org.events.ui.struts2.util.UIActionInterceptor.intercept(UIActionInterceptor.java:99) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:239) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:239) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:73) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:252) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54) org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:563) org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77) org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.events.ui.rendering.filters.RequestMappingFilter.doFilter(RequestMappingFilter.java:133) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.events.ui.rendering.filters.DeviceResolverRequestFilter.doFilterInternal(DeviceResolverRequestFilter.java:55) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.events.ui.core.filters.InitFilter.doFilter(InitFilter.java:60) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.events.ui.core.filters.PersistenceSessionFilter.doFilter(PersistenceSessionFilter.java:41) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:183) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.events.ui.core.filters.SchemeEnforcementFilter.doFilter(SchemeEnforcementFilter.java:104) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.events.ui.core.filters.CharEncodingFilter.doFilter(CharEncodingFilter.java:65) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877) org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594) org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675) java.lang.Thread.run(Thread.java:722)
        Hide
        lukaszlenart Lukasz Lenart added a comment -

        Ok, thanks! I thought it will be easy to find wherefrom the null is coming, but it isn't possible. You don't have any actions involved in the stacktrace.

        Bruce Phillips you are right, returning null isn't a good practice but in that case user will be lost and will blame the framework

        Show
        lukaszlenart Lukasz Lenart added a comment - Ok, thanks! I thought it will be easy to find wherefrom the null is coming, but it isn't possible. You don't have any actions involved in the stacktrace. Bruce Phillips you are right, returning null isn't a good practice but in that case user will be lost and will blame the framework
        Hide
        ghuber Greg Huber added a comment -

        Lukasz,

        The null is comming from the backing bean being null. On a checkbox list we are basically checking two lists, a primary and a backing, and its checked when a match if found on both sides. If the name= variable is null (ie the backing), thats where you get the npe.

        I will see if I can modify the struts2-dmi-validation-master test you did so I can show how we get the npe.

        If I had a beer every time I forget to check for nulls on a for statement I would be very .

        Cheers Greg.

        Show
        ghuber Greg Huber added a comment - Lukasz, The null is comming from the backing bean being null. On a checkbox list we are basically checking two lists, a primary and a backing, and its checked when a match if found on both sides. If the name= variable is null (ie the backing), thats where you get the npe. I will see if I can modify the struts2-dmi-validation-master test you did so I can show how we get the npe. If I had a beer every time I forget to check for nulls on a for statement I would be very . Cheers Greg.
        Hide
        bphillips Bruce Phillips added a comment -

        Greg and Lukasz:

        I was able to duplicate the issue in the form tags example application I referred to in my previous comments.

        For the Person object I create in the EditInServiceMemory class in that example app I made a change to NOT set the value for the Person object's carModels Array. This array stores the car models that a specific Person has owned. So the use case here is that the person has not owned any previous car models.

        Then when I ran the application and loaded the form that uses s:checkboxlist tag I got the NPE.

        When not using the JavaTemplates Struts plugin I don't get the NPE.

        Thanks for all the comments and help in getting me to understand the issue. I'll review the change Greg recommended to the JavaTemplates plugin CheckBoxListHandler class and confirm that it fixes the problem.

        Bruce

        Show
        bphillips Bruce Phillips added a comment - Greg and Lukasz: I was able to duplicate the issue in the form tags example application I referred to in my previous comments. For the Person object I create in the EditInServiceMemory class in that example app I made a change to NOT set the value for the Person object's carModels Array. This array stores the car models that a specific Person has owned. So the use case here is that the person has not owned any previous car models. Then when I ran the application and loaded the form that uses s:checkboxlist tag I got the NPE. When not using the JavaTemplates Struts plugin I don't get the NPE. Thanks for all the comments and help in getting me to understand the issue. I'll review the change Greg recommended to the JavaTemplates plugin CheckBoxListHandler class and confirm that it fixes the problem. Bruce
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1512348 from Bruce Phillips in branch 'struts2/trunk'
        [ https://svn.apache.org/r1512348 ]

        WW-4168 Added if statement in method isChecked to verify that the String Array of checkBox name values is not null.

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1512348 from Bruce Phillips in branch 'struts2/trunk' [ https://svn.apache.org/r1512348 ] WW-4168 Added if statement in method isChecked to verify that the String Array of checkBox name values is not null.
        Hide
        bphillips Bruce Phillips added a comment -

        I added the if statement that checks if nameValues is null to the isChecked method of class CheckBoxListHandler in the JavaTemplates plugin.

        I built the plugin and all tests passed.

        Running my form tags example application with the 2.3.16-SNAPSHOT version of the plugin fixed the NPE when the nameValues is null.

        Show
        bphillips Bruce Phillips added a comment - I added the if statement that checks if nameValues is null to the isChecked method of class CheckBoxListHandler in the JavaTemplates plugin. I built the plugin and all tests passed. Running my form tags example application with the 2.3.16-SNAPSHOT version of the plugin fixed the NPE when the nameValues is null.
        Hide
        bphillips Bruce Phillips added a comment -

        Added if statement is isChecked method to verify that the Array of nameValues is not null. Verified that all tests still pass and that code change fixes issue by building and using the SNAPSHOT version of the JavaTemplates plugin locally.

        Show
        bphillips Bruce Phillips added a comment - Added if statement is isChecked method to verify that the Array of nameValues is not null. Verified that all tests still pass and that code change fixes issue by building and using the SNAPSHOT version of the JavaTemplates plugin locally.
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Struts2-JDK6 #775 (See https://builds.apache.org/job/Struts2-JDK6/775/)
        WW-4168 Added if statement in method isChecked to verify that the String Array of checkBox name values is not null. (bphillips: rev 1512348)

        • /struts/struts2/trunk/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/simple/CheckboxListHandler.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Struts2-JDK6 #775 (See https://builds.apache.org/job/Struts2-JDK6/775/ ) WW-4168 Added if statement in method isChecked to verify that the String Array of checkBox name values is not null. (bphillips: rev 1512348) /struts/struts2/trunk/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/simple/CheckboxListHandler.java

          People

          • Assignee:
            bphillips Bruce Phillips
            Reporter:
            ghuber Greg Huber
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development