Share all details related to your problem, including any error messages you may have received.
Hello,
I’m implementing a report and I want to allow the user to select multiple types of identities (employee, partner, service, corporate), and both active and inactive identities.
For that I created a form that is referenced in the <ReportForm>:
But after fixing the signature I’m getting a NullPointer error:
sailpoint.tools.GeneralException: NullPointerException
at sailpoint.persistence.HibernatePersistenceManager.countObjects(HibernatePersistenceManager.java:2753)
at sailpoint.persistence.ClassPersistenceManager.countObjects(ClassPersistenceManager.java:358)
at sailpoint.server.InternalContext.countObjects(InternalContext.java:918)
at sailpoint.reporting.datasource.ProjectionDataSource.getSizeEstimate(ProjectionDataSource.java:61)
at sailpoint.reporting.JasperCsvWriter.write(JasperCsvWriter.java:96)
at sailpoint.reporting.LiveReportExecutor.execute(LiveReportExecutor.java:275)
at sailpoint.api.TaskManager.runSync(TaskManager.java:909)
at sailpoint.api.TaskManager.runSync(TaskManager.java:724)
at sailpoint.scheduler.JobAdapter.execute(JobAdapter.java:128)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: sailpoint.tools.GeneralException: NullPointerException
at sailpoint.persistence.HibernatePersistenceManager.mapSearchAttributes(HibernatePersistenceManager.java:2602)
at sailpoint.persistence.HibernatePersistenceManager.orderAndOptimize(HibernatePersistenceManager.java:2495)
at sailpoint.persistence.HibernatePersistenceManager.countObjects(HibernatePersistenceManager.java:2727)
... 10 more
Caused by: java.lang.NullPointerException
I added null validations to the lists received in the script, but the exception is still being thrown.
Could the Signature not matching the QueryParameters be the cause of the logs not showing?
Also, do you have any clue why the NullPointerException is being thrown?
I find the solution, sorry for delay but its a long time I dont work on report(the dark side of SP )
<TaskDefinition executor="sailpoint.reporting.LiveReportExecutor" name="Report" progressMode="Percentage" resultAction="Rename" subType="Custom Reports" template="true" type="LiveReport">
<Attributes>
<Map>
<entry key="report">
<value>
<LiveReport title="Account Group Membership Report">
<DataSource type="Hql">
<Query> from Link l, IdentityEntitlement ie,ManagedAttribute ma,Identity identity left outer join identity.manager m
where ie.value = ma.value and ie.application.name = ma.application.name and ie.name = ma.attribute
and l.application.name = ie.application.name and l.nativeIdentity = ie.nativeIdentity and l.identity.id = identity.id
</Query>
<QueryParameters>
<Parameter argument="identityType" property="identityType"/>
</QueryParameters>
<QueryScript>
<Source>
String scriptCriteria ="";
List<String> identityType = new ArrayList();
identityType = args.get("identityType");
if (identityType != null && !identityType.isEmpty()){
scriptCriteria = " identity.type in( :identityType ) ";
}
if (!scriptCriteria.isEmpty())
query+= " and " + scriptCriteria;
return query;
</Source>
</QueryScript>
</DataSource>
<ReportForm>
<Reference class="sailpoint.object.Form" name="Form-IdentityTypeAndStatusFilter"/>
</ReportForm>
<Columns>
<ReportColumnConfig field="extended1" header="extended1" property="identity.extended1" sortable="true" width="80"/>
<ReportColumnConfig field="identity" header="name" property="identity.name" sortable="true" width="80/">
</Columns>
</LiveReport>
</value>
</entry>
</Map>
</Attributes>
<RequiredRights>
<Reference class="sailpoint.object.SPRight" name="FullAccessAccountGroupMembershipReport"/>
</RequiredRights>
<Signature>
<Inputs>
<Argument multi="true" name="identityType" type="string"/>
<Argument multi="true" name="identityInactive" type="string"/>
</Inputs>
</Signature>
</TaskDefinition>
I did this template with query. Using your form I read the arguments and use them in a query script. In this case I use only the identityType but you can add the part for identityInactive, add colums acc…
For the query I put some things like manager, managedattribute and identityentitlement; you can add or remove elements