It's all about the answers!

Ask a question

persistent error in ccm logs


Rama SCM (4111320) | asked Jul 02 '19, 1:07 p.m.
edited Jul 02 '19, 4:33 p.m. by Ralph Schoon (63.1k33646)
Hi,

I see following error consistently in the ccm log. It looks like every time the workitem is saved the error gets logged. I have a calculated value provider (with dependencies defined). When the dependent field changes, the value provider gets triggered and returns calculated value without any issue. However, all other times (when WI is changed and no change to dependent field), following error getting logged. Not sure why the value provider is getting triggered even if there is no change to dependent field. Thanks for your help! 


 2019-04-25 10:30:56,242 [WebContainer : 6 @@ 10:30 
<com.ibm.team.workitem.newWorkItem@de747484-63ef-48d5-8452-9b93f665a9ce> /ccm/service/com.ibm.team.workitem.common.internal.rest.IWorkItemRestService/workItemDTO2] ERROR com.ibm.team.workitem.common                        - Error invoking value provider 'Outage Duration' associated with the attribute 'Outage Duration' in the project area with id '_GE1mYAytEea_MomVQeRYaQ'. You can link to the project area definition using a URL similar to https://thehostname:9443/jazz/process/project-areas/_GE1mYAytEea_MomVQeRYaQ, where the host name, port and jazz context are configured for your installation. Contact your project area administrator for assistance.
java.lang.ClassCastException: java.lang.String incompatible with java.lang.Number
at com.ibm.team.workitem.shared.common.internal.valueProviders.ScriptAttributeValueProvider.convert(ScriptAttributeValueProvider.java:218)
at com.ibm.team.workitem.shared.common.internal.valueProviders.ScriptAttributeValueProvider.getValue(ScriptAttributeValueProvider.java:72)
at com.ibm.team.workitem.common.internal.attributeValueProviders.AttributeValueProviderRegistry$SafeValueProvider.getValue(AttributeValueProvi

Accepted answer


permanent link
Ralph Schoon (63.1k33646) | answered Jul 02 '19, 3:39 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
  1. Open the project area with the ID '_GE1mYAytEea_MomVQeRYaQ' (read the error message). 
  2. Get the name of that project area.
  3. Open the project aread administration view in the Eclipse client. 
  4. Open the project area process configuration for work item 
  5. Open the attribute customization
  6. Fix the 'Outage Duration' attribute customization - likely a calculated value.
Rama SCM selected this answer as the correct answer

Comments
Rama SCM commented Jul 02 '19, 4:03 p.m.

 Thanks Ralph!  

#1 As I mentioned in my question, The calculated value provider works fine (when the dependent filed value changes) and doesn't log any errors. So I am not sure if this is issue with script. 
# 2  The issue is it logs the errors all other time when the work item is saved ( and dependent value did not change). 
I added a print statement in the beginning of the script and that is also not getting logged. So I am not sure if script is even getting triggered in # 2 scenario. 


Ralph Schoon commented Jul 02 '19, 4:29 p.m. | edited Jul 02 '19, 4:31 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

See https://jazz.net/wiki/bin/view/Main/AttributeCustomization when stuff gets triggered. Debug the code.


Usually it is the code that is not correct for whatever reason. So it is much more likely there is a bug in the provider.

You would not believe how many even syntactically incorrect JavaScript value providers I have seen in the past. E.g. you have to always return a value. A lot of examples do not. 

You want to use consle.log and the log is maybe not the log you expect.


Ralph Schoon commented Jul 02 '19, 4:32 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 Also there seems to be a conversion error. So I am 100% confident the script is broken.


Rama SCM commented Jul 03 '19, 12:45 p.m.

 Thanks Ralph! Apparently, it was return value (inside one of the if statement) that was creating the issue.

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.