Create query for work item state returning NullPointException
Hi Everyone,
2018-06-20 10:31:55,670 [ccm: AsynchronousTaskRunner-2 @@ 10:31] ERROR com.ibm.team.repository - CRJAZ0852I An exception occurred while executing the task "Send_Reminder_Letter_taskID", contributed by component "com.ibm.team.repository". The task will be removed from the schedule. <o:p> </o:p>
java.lang.NullPointerException <o:p> </o:p>
at com.ibm.team.workitem.common.expression.AttributeExpression.getValueType(AttributeExpression.java:186) <o:p> </o:p>
at com.ibm.team.workitem.common.expression.AttributeExpression.<init>(AttributeExpression.java:72) <o:p> </o:p>
at com.ibm.team.workitem.common.expression.VariableAttributeExpression.<init>(VariableAttributeExpression.java:36) <o:p> </o:p>
at com.delta.workitem.asynchronousTask.SendReminderLetter.queryCriteriaGeneral(SendReminderLetter.java:474) <o:p> </o:p>
at com.delta.workitem.asynchronousTask.SendReminderLetter.distinctWhichProjectCriteria(SendReminderLetter.java:331) <o:p> </o:p>
at com.delta.workitem.asynchronousTask.SendReminderLetter.fetchOwnerFromDelayWorkItems(SendReminderLetter.java:291) <o:p> </o:p>
at com.delta.workitem.asynchronousTask.SendReminderLetter.dueWorkitemQuery(SendReminderLetter.java:258) <o:p> </o:p>
at com.delta.workitem.asynchronousTask.SendReminderLetter.runTask(SendReminderLetter.java:200)
2 answers
https://rsjazz.wordpress.com/2012/11/19/using-expressions-for-automation/ uses client API. Why would that be deployed on an application server?
Comments
Hi Ralph,
In my example there is client API. E.g. I needed at least IQueryClient and to get that IWorkItemClient. I am not sure if this can be achieved in the Server/Common API. I am sorry.
With respect to the Null pointer exception I would suggest to try to debug that to find out what is null and search the SDK for similar calls/examples.
Also, check the include statement for package names that include .client. This is not going to be available in a WAS server. but could be available in Jetty through the client SDK.
Hi Ralph, please find my comment on below Answer section because of the character limit of Comment section.
Hi Ralph,
Comments
Sorry, but I haven't used these API calls. I find this suspicious:
IQueryableAttribute cached= entry.attributeMap.get(attributeIdentifier);
This is no API I have used so far and if I look at IQueryableAttribute this is usually retrieved using a factory if I look into the SDK.
You could try to get the unresolved results. You should also consider to use the access permission aware API.
Sorry I can not help.