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

KIM Role Service fails when member ID is null

    Details

    • Type: Bug Fix
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.2.1, 1.0.3
    • Fix Version/s: 2.0
    • Component/s: Development
    • Labels:
      None
    • Rice Module:
      KIM
    • Application Requirement:
      Rice

      Description

      The RoleService implementation does not handle the case when a role's member ID comes back null from an application role or the database. Since many institutions will load data from underneath, we should accommodate some level of bad data and ignore (maybe with a warning.)

      In addition, the Role UI should not allow null member IDs to be persisted (if it does not already) and the RoleUpdateService API should either silently drop or throw an exception if a null member ID is passed in.

      Caused by: java.lang.IllegalArgumentException: memberId may not be null
      at org.kuali.rice.kim.bo.role.dto.RoleMembershipInfo.<init>(RoleMembershipInfo.java:51)
      at org.kuali.rice.kim.service.impl.RoleServiceImpl.getRoleMembers(RoleServiceImpl.java:1260)
      at org.kuali.rice.kim.service.impl.RoleServiceImpl.getRoleMemberPrincipalIds(RoleServiceImpl.java:1209)
      at org.kuali.rice.kim.service.impl.RoleManagementServiceImpl.getRoleMemberPrincipalIds(RoleManagementServiceImpl.java:212)

        Attachments

          Issue Links

            Activity

            Hide
            eldavid Emerson David (Inactive) added a comment -

            Attached script that makes MBR_ID, ROLE_ID and MBR_TYP_CD NOT NULL in MySQL. Here's the result:
            mysql> desc krim_role_mbr_t;
            ---------------------------------------------+

            Field Type Null Key Default Extra

            ---------------------------------------------+

            ROLE_MBR_ID varchar(40) NO PRI    
            VER_NBR decimal(8,0) NO   1  
            OBJ_ID varchar(36) NO UNI NULL  
            ROLE_ID varchar(40) NO MUL NULL  
            MBR_ID varchar(40) NO MUL NULL  
            MBR_TYP_CD char(1) NO   NULL  
            ACTV_FRM_DT datetime YES   NULL  
            ACTV_TO_DT datetime YES   NULL  
            LAST_UPDT_DT datetime YES   NULL  

            ---------------------------------------------+

            Show
            eldavid Emerson David (Inactive) added a comment - Attached script that makes MBR_ID, ROLE_ID and MBR_TYP_CD NOT NULL in MySQL. Here's the result: mysql> desc krim_role_mbr_t; ------------- ------------ ---- --- ------- ------+ Field Type Null Key Default Extra ------------- ------------ ---- --- ------- ------+ ROLE_MBR_ID varchar(40) NO PRI     VER_NBR decimal(8,0) NO   1   OBJ_ID varchar(36) NO UNI NULL   ROLE_ID varchar(40) NO MUL NULL   MBR_ID varchar(40) NO MUL NULL   MBR_TYP_CD char(1) NO   NULL   ACTV_FRM_DT datetime YES   NULL   ACTV_TO_DT datetime YES   NULL   LAST_UPDT_DT datetime YES   NULL   ------------- ------------ ---- --- ------- ------+
            Hide
            eldavid Emerson David (Inactive) added a comment -

            Attached script that makes MBR_ID, ROLE_ID and MBR_TYP_CD NOT NULL in Oracle. Here's the result:
            SQL> DESC KRIM_ROLE_MBR_T;
            Name Null? Type
            ----------------------------------------- -------- ----------------------------
            ROLE_MBR_ID NOT NULL VARCHAR2(40)
            VER_NBR NOT NULL NUMBER(8)
            OBJ_ID NOT NULL VARCHAR2(36)
            ROLE_ID NOT NULL VARCHAR2(40)
            MBR_ID NOT NULL VARCHAR2(40)
            MBR_TYP_CD NOT NULL CHAR(1)
            ACTV_FRM_DT DATE
            ACTV_TO_DT DATE
            LAST_UPDT_DT DATE

            Show
            eldavid Emerson David (Inactive) added a comment - Attached script that makes MBR_ID, ROLE_ID and MBR_TYP_CD NOT NULL in Oracle. Here's the result: SQL> DESC KRIM_ROLE_MBR_T; Name Null? Type ----------------------------------------- -------- ---------------------------- ROLE_MBR_ID NOT NULL VARCHAR2(40) VER_NBR NOT NULL NUMBER(8) OBJ_ID NOT NULL VARCHAR2(36) ROLE_ID NOT NULL VARCHAR2(40) MBR_ID NOT NULL VARCHAR2(40) MBR_TYP_CD NOT NULL CHAR(1) ACTV_FRM_DT DATE ACTV_TO_DT DATE LAST_UPDT_DT DATE
            Hide
            eldavid Emerson David (Inactive) added a comment -

            Created scripts to alter KRIM_ROLE_MBR_T.

            Show
            eldavid Emerson David (Inactive) added a comment - Created scripts to alter KRIM_ROLE_MBR_T.
            Hide
            jcoltrin Jessica Coltrin (Inactive) added a comment -

            reopening to set fix version to something other than 1.x-backlog.

            Show
            jcoltrin Jessica Coltrin (Inactive) added a comment - reopening to set fix version to something other than 1.x-backlog.
            Hide
            jcoltrin Jessica Coltrin (Inactive) added a comment -

            re-closing

            Show
            jcoltrin Jessica Coltrin (Inactive) added a comment - re-closing

              People

              • Assignee:
                eldavid Emerson David (Inactive)
                Reporter:
                jkeller Jonathan Keller
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 6 hours
                  6h
                  Remaining:
                  Remaining Estimate - 6 hours
                  6h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified