Skip to Content.
Sympa Menu

grouper-users - [grouper-users] RE: Null Pointer Exception while calling permissions web service

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] RE: Null Pointer Exception while calling permissions web service


Chronological Thread 
  • From: Chris Hyzer <>
  • To: "Sachdeva, Vivek" <>, "" <>
  • Subject: [grouper-users] RE: Null Pointer Exception while calling permissions web service
  • Date: Thu, 2 Jan 2014 02:18:56 +0000
  • Accept-language: en-US

This worked for me.

 

Did you run the sample data program to setup the registry (note, I think this might destroy your database, do this on a sample schema)

 

(it’s a private method, so you need to edit the main in SampleCapture and run it from there:

 

  /**

   * @param args

   */

  public static void main(String[] args) {

 

    SampleCapture.setupData();

 

  }

 

  

 

Request

<WsRestGetPermissionAssignmentsRequest>

  <includeLimits>T</includeLimits>

  <wsAttributeDefLookups>

    <WsAttributeDefLookup>

      <uuid></uuid>

      <name>aStem:permissionDef</name>

    </WsAttributeDefLookup>

  </wsAttributeDefLookups>

</WsRestGetPermissionAssignmentsRequest>

 

Response

<WsGetPermissionAssignmentsResults>

  <wsAttributeDefs>

    <WsAttributeDef>

      <extension>permissionDef</extension>

      <name>aStem:permissionDef</name>

      <uuid>6c2dc30e23954d98940c2201a0153bf9</uuid>

      <attributeDefType>perm</attributeDefType>

      <multiAssignable>F</multiAssignable>

      <multiValued>F</multiValued>

      <valueType>marker</valueType>

    </WsAttributeDef>

  </wsAttributeDefs>

  <wsPermissionAssigns>

    <WsPermissionAssign>

      <action>read</action>

      <permissionType>role</permissionType>

      <attributeDefNameId>4b5fd97452f14080878562f4392a5faf

      </attributeDefNameId>

      <attributeDefNameName>aStem:permissionDefName

      </attributeDefNameName>

      <attributeDefId>6c2dc30e23954d98940c2201a0153bf9</attributeDefId>

      <attributeDefName>aStem:permissionDef</attributeDefName>

      <enabled>T</enabled>

      <attributeAssignId>de6b8c5ba12a4924a072df92d48df6c5

      </attributeAssignId>

      <roleId>99f73c24949d4e2f8ef69eaff40c85b2</roleId>

      <roleName>aStem:role</roleName>

      <subjectId>test.subject.0</subjectId>

      <sourceId>jdbc</sourceId>

      <membershipId>14d61db81d174154a6b6270753468870:81e4e2029a5c4513be9bce515bb22635

      </membershipId>

      <allowedOverall>T</allowedOverall>

      <disallowed>F</disallowed>

    </WsPermissionAssign>

    <WsPermissionAssign>

      <action>read</action>

      <permissionType>role</permissionType>

      <attributeDefNameId>4b5fd97452f14080878562f4392a5faf

      </attributeDefNameId>

      <attributeDefNameName>aStem:permissionDefName

      </attributeDefNameName>

      <attributeDefId>6c2dc30e23954d98940c2201a0153bf9</attributeDefId>

      <attributeDefName>aStem:permissionDef</attributeDefName>

      <enabled>T</enabled>

      <attributeAssignId>de6b8c5ba12a4924a072df92d48df6c5

      </attributeAssignId>

      <roleId>99f73c24949d4e2f8ef69eaff40c85b2</roleId>

      <roleName>aStem:role</roleName>

      <subjectId>test.subject.4</subjectId>

      <sourceId>jdbc</sourceId>

      <membershipId>bb65c5012fd84afaafa8c036514f27de:81e4e2029a5c4513be9bce515bb22635

      </membershipId>

      <allowedOverall>T</allowedOverall>

      <disallowed>F</disallowed>

    </WsPermissionAssign>

    <WsPermissionAssign>

      <action>write</action>

      <permissionType>role_subject</permissionType>

      <attributeDefNameId>b1c8ddbc905142378fe1acf45ceb2639

      </attributeDefNameId>

      <attributeDefNameName>aStem:permissionDefName2

      </attributeDefNameName>

      <attributeDefId>6c2dc30e23954d98940c2201a0153bf9</attributeDefId>

      <attributeDefName>aStem:permissionDef</attributeDefName>

      <enabled>T</enabled>

      <attributeAssignId>693e1a3d237b463f80bf5166e86e0848

      </attributeAssignId>

      <roleId>6684e92d31f1488c96723801cdd66c6f</roleId>

      <roleName>aStem:role2</roleName>

      <subjectId>test.subject.1</subjectId>

      <sourceId>jdbc</sourceId>

      <membershipId>d56994b19980411c920af6403756f218:8f910ded856e4b08aa87e8e0c16a67f4

      </membershipId>

      <allowedOverall>T</allowedOverall>

      <disallowed>F</disallowed>

    </WsPermissionAssign>

  </wsPermissionAssigns>

  <resultMetadata>

    <resultCode>SUCCESS</resultCode>

    <resultMessage>, Found 3 results.  </resultMessage>

    <success>T</success>

  </resultMetadata>

  <responseMetadata>

    <resultWarnings></resultWarnings>

    <millis>265</millis>

    <serverVersion>2.1.5</serverVersion>

  </responseMetadata>

  <wsGroups>

    <WsGroup>

      <extension>role</extension>

      <typeOfGroup>role</typeOfGroup>

      <displayExtension>role</displayExtension>

      <displayName>a stem:role</displayName>

      <name>aStem:role</name>

      <uuid>99f73c24949d4e2f8ef69eaff40c85b2</uuid>

    </WsGroup>

    <WsGroup>

      <extension>role2</extension>

      <typeOfGroup>role</typeOfGroup>

      <displayExtension>role2</displayExtension>

      <displayName>a stem:role2</displayName>

      <name>aStem:role2</name>

      <uuid>6684e92d31f1488c96723801cdd66c6f</uuid>

    </WsGroup>

  </wsGroups>

  <wsSubjects />

</WsGetPermissionAssignmentsResults>

 

 

From: [mailto:] On Behalf Of Sachdeva, Vivek
Sent: Wednesday, January 01, 2014 5:34 PM
To:
Subject: [grouper-users] Null Pointer Exception while calling permissions web service

 

Hi,

 

I am running WsSampleGetPermissionAssignmentRest class to get the permissions assigned to a set of users. It runs successfully and give me result back when I do not include the limits in the request. But when I include the limits by having getPermissionAssignments.setIncludeLimits("T") it throws NPE at line number 6175 in the GrouperServiceLogic class. attributeDefNameIds is null and that is why NPE is thrown.  

 

For my use cases, some actions will have limits and some will not have so the clients will always need to include the limits. So my question is what is the best way to fix this issue ?  

 

Thanks,

Vivek




Archive powered by MHonArc 2.6.16.

Top of Page