Kuali Rice Development
  1. Kuali Rice Development
  2. KULRICE-12921

UIDocumentService.loadRoleMembers yields IllegalArgumentException when all members are inactive

    Details

    • Type: Bug Fix Bug Fix
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.1
    • Fix Version/s: 2.5
    • Component/s: Development
    • Labels:
      None
    • Similar issues:
      KULRICE-8201Group lookup by principal returns groups where member is inactive
      KULRICE-4852Kim Role search returns roles for "member" (group and principals) that are inactive
      KULRICE-4215Need a member "Inactivate" button that will automatically inactivate group/role/etc members
      KULRICE-12202Library Collections Inactive filter causes IllegalArgumentException
      KULRICE-6858If editing groups or roles, it validates the existence of all members before saving the doc, even those which are "inactive"
      KULRICE-7637show inactive / hide inactive button on subtab is not working correctly.
      KULRICE-6722RoleService assign methods don't check for inactive role members correctly
      KULRICE-8267Inefficiencies in persisting role members in the IdentityManagementRoleDocument (4062)
      KULRICE-4820ActionRequestServiceImpl.saveActionRequest does not allow for documents to route to inactive groups.
      KULRICE-6473Go through all apis which throw RiceIllegalArgumentException and ensure that their javadoc @throws clause declare this exception rather than IllegalArgumentException
    • Rice Module:
      KIM
    • Sprint:
      Core 2.5.0-m5 Sprint 1
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes

      Description

      From the rice.collab list (https://groups.google.com/a/kuali.org/forum/#!topic/rice.collab/inq_SKgNI0o):

      I found a potential bug in Rice 2.4 with the UIDocumentServiceImpl.loadRoleMembers() method where the display of a Role will error out with a stack trace. I looked for an existing JIRA or to see if this had been fixed in Rice 2.5 but I couldn’t find anything in my searches.

      It may be a fringe case, but the following stack trace is thrown when a role is displayed that has no active members but has at least one inactive member:

      http://pastebin.com/GKC7yrUy

      The crux of it is that the PredicateFactory implementation requires that a valid non-empty list be passed in and in this particular case the ‘active role members’ list is empty while the total role members list is not.

      Does anyone know if this has been fixed already or if there is a JIRA already posted for it? I know the KIM UI is going to undergo a lot of changes with the conversion to KRAD but this method may hang around as it’s really about constructing the Role object used by the UI layer. If I don’t hear back from anyone I’ll just go ahead and add a new JIRA.

      Thanks!

      David

      Here's the relevant part of the stack trace:

      java.lang.IllegalArgumentException: Criteria values cannot be empty.
      	at org.kuali.rice.core.api.criteria.CriteriaSupportUtils.validateValuesForMultiValuedPredicate(CriteriaSupportUtils.java:262)
      	at org.kuali.rice.core.api.criteria.InPredicate.<init>(InPredicate.java:93)
      	at org.kuali.rice.core.api.criteria.PredicateFactory.in(PredicateFactory.java:276)
      	at org.kuali.rice.kim.service.impl.UiDocumentServiceImpl.loadRoleMembers(UiDocumentServiceImpl.java:1801)
      	at org.kuali.rice.kim.service.impl.UiDocumentServiceImpl.loadRoleDoc(UiDocumentServiceImpl.java:1646)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
      	at com.sun.proxy.$Proxy445.loadRoleDoc(Unknown Source)
      	at org.kuali.rice.kim.web.struts.action.IdentityManagementRoleInquiry.loadKimObject(IdentityManagementRoleInquiry.java:61)
      	...
      

        Activity

        Hide
        Claus Niesen added a comment -

        How about changing the package to org.kuali.rice.kim.service.impl but leaving the location in rice-middleware\it\kim\src\test\java\org\kuali\rice\kim\service\impl\UiDocumentServiceImplTest.java?

        Show
        Claus Niesen added a comment - How about changing the package to org.kuali.rice.kim.service.impl but leaving the location in rice-middleware\it\kim\src\test\java\org\kuali\rice\kim\service\impl\UiDocumentServiceImplTest.java?
        Hide
        Steve Edgar (Inactive) added a comment -

        Ah yes... I see. Can you tell I'm finding my way around the source . I created a new class for the integration test, thus leaving UiDocumentServiceImplTest unchanged.

        Show
        Steve Edgar (Inactive) added a comment - Ah yes... I see. Can you tell I'm finding my way around the source . I created a new class for the integration test, thus leaving UiDocumentServiceImplTest unchanged.
        Hide
        Steve Edgar (Inactive) added a comment -

        Process question... Do I resolve a Jira case after creating the Fisheye review? Or do I wait until the review is complete?

        Show
        Steve Edgar (Inactive) added a comment - Process question... Do I resolve a Jira case after creating the Fisheye review? Or do I wait until the review is complete?
        Hide
        Steve Edgar (Inactive) added a comment -

        Review is complete, and so am resolving this case.

        Show
        Steve Edgar (Inactive) added a comment - Review is complete, and so am resolving this case.
        Hide
        Steve Edgar (Inactive) added a comment -

        The code review was completed on July 14, and so I set the status of this case to "Resolved". I'm not quite sure of the procedure, but I noticed the code review was still set with a status of "Open' on Crucible, and so I set that to "Close". (Does the reviewer usually set the status to "Close"?) Am now setting this Jira case to "Close".

        Show
        Steve Edgar (Inactive) added a comment - The code review was completed on July 14, and so I set the status of this case to "Resolved". I'm not quite sure of the procedure, but I noticed the code review was still set with a status of "Open' on Crucible, and so I set that to "Close". (Does the reviewer usually set the status to "Close"?) Am now setting this Jira case to "Close".

          People

          • Assignee:
            Steve Edgar (Inactive)
            Reporter:
            David Elyea
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1 day
              1d
              Remaining:
              Remaining Estimate - 1 day
              1d
              Logged:
              Time Spent - Not Specified
              Not Specified

                Agile

                  Structure Helper Panel