Uploaded image for project: 'EJBCA'
  1. EJBCA
  2. ECA-6728

NPE when changing Approval Profile type

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: EJBCA 6.12.0
    • Fix Version/s: EJBCA 6.13.0
    • Component/s: None
    • Labels:
    • Issue discovered during:
      Testing
    • Sprint:
      EJBCA Sprint 11 (2 weeks)

      Description

      Steps to reproduce:

      1. Create an Approval Profile of type 'Accumulative'
      2. Create a request to add an EE with the Approval Profile
      3. Edit the Approval Profile, set type to 'Partitioned'
      4. Try to view the created approval request from the AdminWeb, the popup says 'Internal Server Error' and there is a NullPointerException in the server log

      Changing back to 'Accumulative' makes the request viewable again. The same issue exists when creating the request with type 'Partitioned' and then changing to 'Accumulative'.

       

      Stacktrace:

      2018-04-04 12:34:15,495 ERROR [io.undertow.request] (default task-11) UT005023: Exception handling request to /ejbca/adminweb/approval/approveaction.jsp: javax.servlet.ServletException: /approval/approveaction.jsp(223,2) '#{approvalActionManagedBean.approvalPartitions}' java.lang.NullPointerException
      	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:671)
      	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
      	at org.ejbca.ui.web.admin.NoCacheFilter.doFilter(NoCacheFilter.java:68)
      	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      	at org.owasp.filters.ContentSecurityPolicyFilter.doFilter(ContentSecurityPolicyFilter.java:204)
      	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      	at org.owasp.filters.ClickjackFilter.doFilter(ClickjackFilter.java:36)
      	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      	at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:357)
      	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      	at org.ejbca.ui.web.admin.ProxiedAuthenticationFilter.doFilter(ProxiedAuthenticationFilter.java:104)
      	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
      	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
      	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
      	at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
      	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:53)
      	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
      	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
      	at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:59)
      	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
      	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
      	at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
      	at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
      	at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
      	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
      	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
      	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
      	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
      	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
      	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
      	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
      	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
      	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
      	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
      	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
      	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
      	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
      	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
      	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:805)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: org.apache.jasper.el.JspELException: /approval/approveaction.jsp(223,2) '#{approvalActionManagedBean.approvalPartitions}' java.lang.NullPointerException
      	at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:123)
      	at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
      	at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182)
      	at javax.faces.component.UIData.getValue(UIData.java:732)
      	at javax.faces.component.UIData.getDataModel(UIData.java:1822)
      	at javax.faces.component.UIData.setRowIndexWithoutRowStatePreserved(UIData.java:484)
      	at javax.faces.component.UIData.setRowIndex(UIData.java:473)
      	at com.sun.faces.renderkit.html_basic.TableRenderer.encodeBegin(TableRenderer.java:81)
      	at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:865)
      	at javax.faces.component.UIData.encodeBegin(UIData.java:1133)
      	at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:302)
      	at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:114)
      	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:890)
      	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856)
      	at javax.faces.render.Renderer.encodeChildren(Renderer.java:176)
      	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:890)
      	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856)
      	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
      	at com.sun.faces.application.view.JspViewHandlingStrategy.doRenderView(JspViewHandlingStrategy.java:431)
      	at com.sun.faces.application.view.JspViewHandlingStrategy.renderView(JspViewHandlingStrategy.java:232)
      	at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:134)
      	at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
      	at org.apache.myfaces.tomahawk.application.ResourceViewHandlerWrapper.renderView(ResourceViewHandlerWrapper.java:169)
      	at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
      	at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
      	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
      	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
      	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659)
      	... 57 more
      Caused by: java.lang.NullPointerException
      	at org.ejbca.ui.web.admin.approval.ApproveActionManagedBean.getApprovalPartitions(ApproveActionManagedBean.java:460)
      	at sun.reflect.GeneratedMethodAccessor1132.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at javax.el.BeanELResolver.getValue(BeanELResolver.java:241)
      	at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
      	at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
      	at com.sun.el.parser.AstValue.getValue(AstValue.java:139)
      	at com.sun.el.parser.AstValue.getValue(AstValue.java:203)
      	at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:226)
      	at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:115)
      	... 85 more
      

        Attachments

          Activity

            People

            • Assignee:
              mikek Mike Agrenius Kushner
              Reporter:
              oskar.eriksson@primekey.com Oskar Eriksson (Inactive)
              Verified by:
              Samuel Lidén Borell
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 10 minutes
                10m