Scripts not running in editor, NPE appears in log
Hi,
In one of our project areas we have some custom work item types that use script-based calculated values. When creating a new work item, the scripts don't appear to be running. I've noticed a NPE appearing in the log when this happens, that I thought was related to the Required Properties precondition (id="com.ibm.team.workitem.advisor.requiredProperties"):
However, I've removed that precondition from the Save Work Item behaviour in the project area and restarted my client, yet I'm still seeing this Exception appearing in the log (and the scripts still aren't working)...
Any idea what else might be causing this, or how I can track down the cause?
Andy.
In one of our project areas we have some custom work item types that use script-based calculated values. When creating a new work item, the scripts don't appear to be running. I've noticed a NPE appearing in the log when this happens, that I thought was related to the Required Properties precondition (id="com.ibm.team.workitem.advisor.requiredProperties"):
!ENTRY com.ibm.team.jface 4 0 2012-03-05 14:39:27.477
!MESSAGE Exception running 'Updating Required Properties'
!STACK 0
java.lang.NullPointerException
at com.ibm.team.workitem.common.internal.attributeValueProviders.AttributeValueProviderRegistry.getDescriptor(Unknown Source)
at com.ibm.team.workitem.common.internal.attributeValueProviders.AttributeValueProviderRegistry.getRequiredAttributeRule(Unknown Source)
at com.ibm.team.workitem.common.internal.RequiredAttributesAdvisor.getRequiredAttributes(Unknown Source)
at com.ibm.team.workitem.common.internal.PropertiesManager.findRequiredProperties(Unknown Source)
at com.ibm.team.workitem.common.internal.WorkItemCommon.findRequiredProperties(Unknown Source)
at com.ibm.team.workitem.ide.ui.internal.editor.presentations.presentationhandler.RequiredPropertiesHandler$RequiredUpdaterJob.runInBackground(Unknown Source)
at com.ibm.team.jface.internal.util.UIUpdateManager$BackgroundJob.runProtected(Unknown Source)
at com.ibm.team.foundation.client.util.FoundationJob.run(Unknown Source)
at org.eclipse.core.internal.jobs.Worker.run(Unknown Source)
However, I've removed that precondition from the Save Work Item behaviour in the project area and restarted my client, yet I'm still seeing this Exception appearing in the log (and the scripts still aren't working)...
Any idea what else might be causing this, or how I can track down the cause?
Andy.
3 answers
Hi Andy, scripting is still experimental. You have to enable it in a special advanced property in the CCM/RTC server. I think you see an error if you have scripts attached but the script engine is not running. I am not sure it is the error you see below.
We do have scripting enabled, in fact one of my colleagues says the scripts on this form were working okay a couple of weeks ago...
I've managed to eliminate the NPEs; as well as the "Required Properties" precondition, there was also a "Mandatory Required Attributes" precondition that had been configured with a Condition that didn't exist. Removing that has got rid of the exceptions. Unfortunately the scripts still aren't running, so I'll have to keep digging :-(
Andy.