It's all about the answers!

Ask a question

Scripts not running in editor, NPE appears in log


Andrew Stevens (1482629) | asked Mar 05 '12, 9:55 a.m.
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"):

!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



permanent link
Ralph Schoon (63.1k33646) | answered Mar 05 '12, 10:43 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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.

permanent link
Andrew Stevens (1482629) | answered Mar 05 '12, 10:50 a.m.
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.

permanent link
Ralph Schoon (63.1k33646) | answered Mar 05 '12, 11:03 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi Andy,

please post if you find the issue. One thing you could try is upload the scripts again.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.