Uploaded image for project: 'Kuali Rice Development'
  1. Kuali Rice Development
  2. KULRICE-3779

Null pointer exceptions after setting up a user as role delegate

    Details

    • Rice Module:
      KIM
    • Application Requirement:
      KFS

      Description

      I made jxlinder a delegate of the Operations role for axwitter. Now when jxlinder opens documents I get a null pointer exception that seems to reference delegations.

      java.lang.NullPointerException
      at org.kuali.rice.kim.service.impl.RoleServiceImpl.matchesOnDelegation(RoleServiceImpl.java:1084)
      at org.kuali.rice.kim.service.impl.RoleServiceImpl.principalHasRole(RoleServiceImpl.java:1000)
      at org.kuali.rice.kim.service.impl.RoleServiceImpl.principalHasRole(RoleServiceImpl.java:967)
      at org.kuali.rice.kim.service.impl.RoleServiceImpl.principalHasRole(RoleServiceImpl.java:802)
      at org.kuali.rice.kim.service.impl.RoleManagementServiceImpl.principalHasRole(RoleManagementServiceImpl.java:319)
      at org.kuali.rice.kim.service.impl.PermissionServiceImpl.isAuthorizedByTemplateName(PermissionServiceImpl.java:203)
      at org.kuali.rice.kim.service.impl.PermissionServiceImpl.hasPermissionByTemplateName(PermissionServiceImpl.java:192)
      at org.kuali.rice.kim.service.impl.IdentityManagementServiceImpl.hasPermissionByTemplateName(IdentityManagementServiceImpl.java:501)
      at org.kuali.rice.kim.service.impl.IdentityManagementServiceImpl.isAuthorizedByTemplateName(IdentityManagementServiceImpl.java:516)
      at org.kuali.rice.kew.doctype.service.impl.DocumentTypePermissionServiceImpl.canBlanketApprove(DocumentTypePermissionServiceImpl.java:66)
      at sun.reflect.GeneratedMethodAccessor567.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:172)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:203)
      at $Proxy388.canBlanketApprove(Unknown Source)
      at org.kuali.rice.kew.dto.DTOConverter.convertRouteHeader(DTOConverter.java:128)
      at org.kuali.rice.kew.service.impl.WorkflowDocumentActionsWebServiceImpl.createDocument(WorkflowDocumentActionsWebServiceImpl.java:174)
      at sun.reflect.GeneratedMethodAccessor907.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:172)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:203)
      at $Proxy84.createDocument(Unknown Source)
      at sun.reflect.GeneratedMethodAccessor907.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:172)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:203)
      at $Proxy85.createDocument(Unknown Source)
      at org.kuali.rice.kew.service.WorkflowDocument.createDocumentIfNeccessary(WorkflowDocument.java:985)
      at org.kuali.rice.kew.service.WorkflowDocument.getRouteHeaderId(WorkflowDocument.java:387)
      at org.kuali.rice.kns.workflow.service.impl.KualiWorkflowDocumentImpl.getRouteHeaderId(KualiWorkflowDocumentImpl.java:148)
      at org.kuali.rice.kns.workflow.service.impl.WorkflowDocumentServiceImpl.createWorkflowDocument(WorkflowDocumentServiceImpl.java:108)
      at sun.reflect.GeneratedMethodAccessor1219.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:172)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:203)
      at $Proxy43.createWorkflowDocument(Unknown Source)
      at org.kuali.rice.kns.service.impl.DocumentServiceImpl.getNewDocument(DocumentServiceImpl.java:454)
      at sun.reflect.GeneratedMethodAccessor1228.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:172)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:203)
      at $Proxy50.getNewDocument(Unknown Source)
      at org.kuali.rice.kns.web.struts.action.KualiDocumentActionBase.createDocument(KualiDocumentActionBase.java:390)
      at org.kuali.rice.kns.web.struts.action.KualiDocumentActionBase.docHandler(KualiDocumentActionBase.java:330)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:270)
      at org.kuali.rice.kns.web.struts.action.KualiAction.dispatchMethod(KualiAction.java:171)
      at org.kuali.rice.kns.web.struts.action.KualiAction.execute(KualiAction.java:122)
      at org.kuali.rice.kns.web.struts.action.KualiDocumentActionBase.execute(KualiDocumentActionBase.java:154)
      at org.kuali.kfs.sys.web.struts.KualiAccountingDocumentActionBase.execute(KualiAccountingDocumentActionBase.java:109)
      at org.kuali.rice.kns.web.struts.action.KualiRequestProcessor$1.doInTransaction(KualiRequestProcessor.java:498)
      at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:127)
      at org.kuali.rice.kns.web.struts.action.KualiRequestProcessor.processActionPerform(KualiRequestProcessor.java:494)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
      at org.kuali.rice.kns.web.struts.action.KualiRequestProcessor.process(KualiRequestProcessor.java:99)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.kuali.rice.kew.web.UserLoginFilter.doFilter(UserLoginFilter.java:92)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jasig.cas.client.util.HttpServletRequestWrapperFilter.doFilter(HttpServletRequestWrapperFilter.java:50)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jasig.cas.client.validation.AbstractTicketValidationFilter.doFilter(AbstractTicketValidationFilter.java:167)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jasig.cas.client.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:121)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.kuali.rice.kns.web.filter.SetResponseBufferSizeFilter.doFilter(SetResponseBufferSizeFilter.java:78)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.kuali.rice.kns.web.filter.SessionFilter.doFilter(SessionFilter.java:41)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:495)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
      at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
      at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
      at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
      at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
      at java.lang.Thread.run(Thread.java:595)

        Attachments

          Issue Links

            Activity

            Hide
            chagstrom Chad Hagstrom added a comment -

            It looks like this problem is arising because the method RoleServiceImpl.matchesOnDelegation allows for a particular method on its local KimRoleTypeService to be called even when that service is null. Adding a proper null-check should be sufficient to fix the problem; however, based on the some try-catch additions that were made in several KimRoleTypeService-usage locations for KULRICE-3646, I may need to add an appropriate try-catch block as well.

            Show
            chagstrom Chad Hagstrom added a comment - It looks like this problem is arising because the method RoleServiceImpl.matchesOnDelegation allows for a particular method on its local KimRoleTypeService to be called even when that service is null. Adding a proper null-check should be sufficient to fix the problem; however, based on the some try-catch additions that were made in several KimRoleTypeService-usage locations for KULRICE-3646 , I may need to add an appropriate try-catch block as well.
            Hide
            chagstrom Chad Hagstrom added a comment -

            I've committed my fix, which also includes some try-catch blocks around certain KimRoleTypeService-usage areas for consistency with the JIRA issue mentioned in my previous post. Feel free to reopen this issue if Rice or KFS are still experiencing any problems related to this.

            Show
            chagstrom Chad Hagstrom added a comment - I've committed my fix, which also includes some try-catch blocks around certain KimRoleTypeService-usage areas for consistency with the JIRA issue mentioned in my previous post. Feel free to reopen this issue if Rice or KFS are still experiencing any problems related to this.

              People

              • Assignee:
                chagstrom Chad Hagstrom
                Reporter:
                jkneal Jerry Neal (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: