Skip to Content.
Sympa Menu

grouper-users - RE: GrouperClient getGrouperPrivilegesLiteWs not finding privileges by stem

Subject: Grouper Users - Open Discussion List

List archive

RE: GrouperClient getGrouperPrivilegesLiteWs not finding privileges by stem


Chronological Thread 
  • From: Paul Gazda <>
  • To: Chris Hyzer <>, "" <>
  • Subject: RE: GrouperClient getGrouperPrivilegesLiteWs not finding privileges by stem
  • Date: Fri, 20 Mar 2009 14:47:24 -0700
  • Accept-language: en-US
  • Acceptlanguage: en-US

Chris,

Thanks very much for fixing this. Yes, I will get the latest from CVS and try it. I see that I misread the thread (https://mail.internet2.edu/wws/arc/grouper-users/2009-02/msg00051.html) where I thought it said this was not implemented for stems. On closer inspection, I see it was talking about getMembers, not getGrouperPrivilegesLiteWs.

 

Paul Gazda

 

 


From: Chris Hyzer [mailto:]
Sent: Friday, March 20, 2009 2:17 PM
To: Paul Gazda;
Subject: RE: GrouperClient getGrouperPrivilegesLiteWs not finding privileges by stem

 

https://bugs.internet2.edu/jira/browse/GRP-253

 

This is fixed. It worked if there were results (what my test had :) ), but with no results there is a null pointer. Sorry about that. It is fixed in the latest 1.4 branch, can you get latest? Or if you are working from source, you need to change:

GrouperClient.java line 781:

FROM:

    for (WsGrouperPrivilegeResult wsGrouperPrivilegeResult : wsGetGrouperPrivilegesLiteResult.getPrivilegeResults()) {

TO:

    for (WsGrouperPrivilegeResult wsGrouperPrivilegeResult : GrouperClientUtils.nonNull(
        wsGetGrouperPrivilegesLiteResult.getPrivilegeResults(), WsGrouperPrivilegeResult.class)) {


Ive got a new test for this and it now passes. (it takes a couple of hours for it to propagate to anonymous CVS):

cvs -d:pserver::/home/cvs/i2mi login
cvs -d:pserver::/home/cvs/i2mi export -r GROUPER_1_4_BRANCH grouper-misc/grouperClient


Chris

ps. the old looked like this:

C:\mchyzer\isc\dev\grouper_v1_4\grouperClient\dist\institution\grouperClient.institution-1.4.0>java -jar grouperClient.jar --operation=getGrouperPrivilegesLiteWs --stemName=aStem --pennKey=id.test.subject.0
Index 0: success: T: code: SUCCESS: stem: aStem: subject: test.subject.0: naming: create
Index 1: success: T: code: SUCCESS: stem: aStem: subject: test.subject.0: naming: stem

C:\mchyzer\isc\dev\grouper_v1_4\grouperClient\dist\institution\grouperClient.institution-1.4.0>java -jar grouperClient.jar --operation=getGrouperPrivilegesLiteWs --stemName=aStem --pennKey=id.test.subject.6
Error with grouper client, check the logs: null
Mar 20, 2009 4:59:41 PM edu.internet2.middleware.grouperClient.GrouperClient main
SEVERE: null
java.lang.NullPointerException
        at edu.internet2.middleware.grouperClient.GrouperClient.getGrouperPrivilegesLite(GrouperClient.java:781)
        at edu.internet2.middleware.grouperClient.GrouperClient.main(GrouperClient.java:301)

C:\mchyzer\isc\dev\grouper_v1_4\grouperClient\dist\institution\grouperClient.institution-1.4.0>

The new looks like this:

C:\mchyzer\isc\dev\grouper_v1_4\grouperClient\dist\institution\grouperClient.institution-1.4.1>java -jar grouperClient.j
ar --operation=getGrouperPrivilegesLiteWs --stemName=aStem --pennKey=id.test.subject.6

C:\mchyzer\isc\dev\grouper_v1_4\grouperClient\dist\institution\grouperClient.institution-1.4.1>

 

Ps. I eyeballed where this could happen in other places, and didn’t see anything…

 

 

From: Paul Gazda [mailto:]
Sent: Friday, March 20, 2009 12:37 PM
To:
Subject: [grouper-users] GrouperClient getGrouperPrivilegesLiteWs not finding privileges by stem

 

I cannot get GrouperClient getGrouperPrivilegesLiteWs to list a subject’s privileges by stem in 1.4.1. It works when I give it a group name, but with a stem name, I get this error in the log:

Mar 20, 2009 9:29:59 AM edu.internet2.middleware.grouperClient.GrouperClient main

SEVERE: null

java.lang.NullPointerException

        at edu.internet2.middleware.grouperClient.GrouperClient.getGrouperPrivilegesLite(GrouperClie

nt.java:781)

        at edu.internet2.middleware.grouperClient.GrouperClient.main(GrouperClient.java:301)

 

I can successfully find the groups in the stem using this:

java -jar grouperClient.jar --operation=findGroupsWs --queryFilterType=FIND_BY_STEM_NAME --stemName=XYZ

 

I can successfully get privileges for a group within the stem using this:

java -jar grouperClient.jar --operation=getGrouperPrivilegesLiteWs --subjectId=123xxxxxxxxxx --groupName= XYZ:testgroup4

 

But this fails:

java -jar grouperClient.jar --operation=getGrouperPrivilegesLiteWs --subjectId=123xxxxxxxxxx --stemName= XYZ

 

Paul Gazda




Archive powered by MHonArc 2.6.16.

Top of Page