It's all about IAM

Identity And Access Management - Rajiv Dewan


Two days back, I was using some basic API of 11g and got some exception. I tried with OIM BP06 and I hope that this issue exists in OIM as well.

Use Case:

I wanted to search details of a Role like Display Name, Description, Role Key etc. I was using the following code snippet:

for(int i =0; i < roleList.size(); i++){
String roleName = roleList.get(i).getName();
System.out.println("Role Name :: " + roleName );
String description = roleList.get(i).getDescription();
System.out.println("Description " + description );

It is printing the Role Name but it is giving me "java.lang.NullPointerException" for Description


I don't have description for the first role which comes into that list.
getDescription() returns a String so it seems that they are trying to convert Null into String and it is throwing Exception.
I tried couple of more APIs where I was getting NPE.

So it is better to use getAttribute API rather than direct API (getDescription)

I saw some other exception while using some OIM 11g APIs.