It's all about the answers!

Ask a question

Error invoking validator -

Balamurugan Selvarasu (331329) | asked Mar 01 '16, 5:57 a.m.

I am getting below exception messages in ccm logs and this makes the server performance very slow.

2016-03-01 14:26:30,318 [WebContainer : 3 @@ 14:26 soalagappan <> /ccm/service/] ERROR                        - Error invoking validator Unexpected exception type

Caused by: org.mozilla.javascript.EcmaError: TypeError: Cannot call method "getFullYear" of null ({"Bundle-SymbolicName":"org.dojotoolkit.dojo", "path":"\\resources", "name":"date.js"}#224)

Has anyone experienced this issue?

5 answers

permanent link
Tadeusz Janasiewicz (120149) | answered Mar 11 '16, 4:24 p.m.
Hi Balamurugan,

The issue is related with the attributes passing in the function.
You should shift them and the one that can be NULL should be the second one as only the second one is optional.
Right now targetfixdate when is NULL you will see this error message as this script will end on the line where you are calculating day difference:

var Daydiff =, currDate, "day");

More details about this function you will find here:
dojotoolkit guide

Please notice that:
// Returns the difference in the specified interval

.difference(date1, date2, "week");

date1 Date The first date for the difference.
date2 Date? Optional argument The second date for the difference. Defaults to current Date.

permanent link
Balamurugan Selvarasu (331329) | answered Mar 04 '16, 6:40 a.m.
 Unfortunately I don't have this line in my script. How to troubleshoot this issue? 

Tadeusz Janasiewicz commented Mar 04 '16, 8:27 a.m.

You should find the changes that were made at the time when this error was thrown (user ID as well as the time you will find in the error message details) and using those data you can debug this script using Firebug.

In this case you should find which line in this script is affected that should help.

permanent link
Balamurugan Selvarasu (331329) | answered Mar 01 '16, 7:42 a.m.
What could be the issue with the first exception message with respect to validators script.

2016-03-01 14:26:30,318 [WebContainer : 3 @@ 14:26 soalagappan < Save@e6e831a7-8797-4719-89f0-064f2597ace2=""> /ccm/service/] ERROR                        - Error invoking validator Unexpected exception type.

permanent link
Balamurugan Selvarasu (331329) | answered Mar 01 '16, 6:51 a.m.
Hi Ralph,

I already found the java script which causing the problem. This script used to validate the past date selection in a time stamp attribute.

Script below:

* Licensed Materials - Property of IBM
* (c) Copyright IBM Corporation 2011. All Rights Reserved.
* Note to U.S. Government Users Restricted Rights: 
* Use, duplication or disclosure restricted by GSA ADP Schedule
* Contract with IBM Corp.

(function() {
var WorkItemAttributes =;
var Severity=;
var Status=;

    dojo.declare("test", null, {

        validate: function(attribute, workItem, configuration) {

var defectstate = workItem.getLabel(WorkItemAttributes.STATE);
var targetfixdate ="attributeid"));
        var currDate = new Date();
        var Daydiff =, currDate, "day");
        if ( Daydiff < 1 ) {
return Status.OK_STATUS;
        } else {
         return new Status(Severity["ERROR"], "Target fixed date cannot be past date");


Do you find any issue in the above script?

Ralph Schoon commented Mar 01 '16, 7:23 a.m.

According to the posts from you you seem to have multiple issues with attribute customization. I cant say where all these scripts come from and where they break.

Donald Nong commented Mar 01 '16, 9:47 p.m.

Not sure whether you actually locate the correct script. The error in the OP is

org.mozilla.javascript.EcmaError: TypeError: Cannot call method "getFullYear" of null ({"Bundle-SymbolicName":"org.dojotoolkit.dojo", "path":"\resources", "name":"date.js"}#224)
Apparently, in your script there should be a line similar to "xxx.getFullYear" but "xxx" is null when the function is called.

Nate Decker commented Mar 04 '16, 1:17 p.m.

This line seems questionable:

var targetfixdate ="attributeid"));

What is "attributeid"? I'm guessing this is some kind of placeholder text that was supposed to be replaced, but has not yet been.

Donald Nong commented Mar 06 '16, 7:45 p.m.

Nate is right. You should make sure "attributeid" is the right ID for the attribute "Target Fix Date". It appears that the variable "targetfixdate" is null when the function, currDate, "day") is called, hence the error - the below screenshot show the exact line in that throws this error.

permanent link
Ralph Schoon (61.6k33643) | answered Mar 01 '16, 6:41 a.m.
As the log says, there is a JavaScript based validator that causes an error when being called. Not sure why and what, but you can use the process configuration source and search for
This should allow you to find the configuration in the process.

Your answer

Register or to post your answer.