It's all about IAM

OIM 11g API ISSUE

Two days back, I was using some basic API of 11g and got some exception. I tried with OIM 11.1.1.3 BP06 and I hope that this issue exists in OIM 11.1.1.5 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


Reason:


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.

OIM API ISSUE