cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Reason for null pointer exception executing setPickFieldValue ?

AN_10548594
10-Marble

Reason for null pointer exception executing setPickFieldValue ?

Hello team,

 

I have defined a field of Pick type (nikoPickValues3) with multiple allowed values and try to set values (even simpe ones just to check it)

Trigger code is:

 

sb = bsf.lookupBean("imServerBean");
var delta = bsf.lookupBean("imIssueDeltaBean");


if(delta.getDocumentID() !=0) {

theReqDocBean = sb.getIssueBean(theRequirementDocumentID);
thePickValuesAllowed = theReqDocBean.getFieldValue(pickValuesAllowedFieldName);
print("###### thePickValuesAllowed are: " + thePickValuesAllowed + " ######");
var values = new java.util.HashSet();
values.add("pick-value1");
values.add("pick-value15");
delta.setPickFieldValue("nikoPickValues3", values);

}

 

Error is always:

* * * * ERROR * * * * (5): user1 [RMI Executor-thread-5]: Issue.changed.pre: Action cancelled due to unexpected trigger exception in script file: "setTCasePickValues2.js": JavaScript Error: java.lang.NullPointerException
2024-02-05 16:03:52,929 INFO [mksis.IntegrityServer] GENERAL(0): user1 [RMI Executor-thread-5]: mks.ci.exception.IMTriggerException -- mks.frame.triggers.TriggerExceptionVeto: JavaScript Error: java.lang.NullPointerException
at mks.frame.triggers.BaseTriggerManager.fireEventTrigger(BaseTriggerManager.java:159)
at mks.ci.server.engine.LocalTriggerManager.fireEventTrigger(LocalTriggerManager.java:163)
at mks.ci.server.engine.LocalTriggerManager.fireIssueChangedTrigger(LocalTriggerManager.java:887)
at mks.ci.server.engine.LocalTriggerManager.fireIssueChangedTrigger(LocalTriggerManager.java:74

 

It works the same way for other fields defined as picks

 

Any ideas if where am I wrong?

 

Thanks

0 REPLIES 0
Announcements


Top Tags