Data Aggregator karaf.log errors due to polling temperature metric that returns a null value

Document ID : KB000095239
Last Modified Date : 25/05/2018
Show Technical Document Details
Issue:
The following error is observed in the Data Aggregator karaf.log file:

018-04-30 14:52:01,7812018-04-30 14:52:01,781 | ERROR | ExceptionLog | An existing application exception RECURRED (Key=92d1673abcf7a07ff8a76595c978d56784983bd0), Recurrence count=36 : Unable to process response. : Input object of class java.lang.String with value false32 cannot be converted to class java.lang.Number | (ExceptionLogger.java:104) 

The file is found, under the default install path /opt/IMDataAggregator/apache*/data/log.
Environment:
All supported CA Performance Management releases r3.5 and older
Cause:
The cause is that the device isn’t reporting a temperature in the first place (TemperatureCelsius is null), so the Fahrenheit calculation is failing. 

In the usual F = (9/5)C + 32 calculation, the (9/5)C is turning out to be a Boolean false. MVEL is trying to add false+32. It won't allow adding Boolean+int, it is instead converting them both to String. This results in a value “false32” which it can’t convert to double.
Resolution:
The updated expression should be included in the pending CA Performance Management r3.6 release via Defect ID DE365982.

Confirm the solution is present via the Fixed Issues list and upgrade to resolve the error.

The error is benign only indicating a temperature sensor doesn't have a value when it should.
Additional Information:
Edit the affected Certifications metric with the following expression to resolve the errors:

​if ( (isdef tempertureSensorValue) && tempertureSensorValue != null ) 

double x=Double.parseDouble(tempertureSensorValue); 
return (9.0/5)*x + 32; 

else 

return null;

return null; 

Edit the affected Certifications metric with the following expression to send debug messages to the exception log on the Data Collector:

​if ( (isdef tempertureSensorValue) && tempertureSensorValue != null ) 

double x=Double.parseDouble(tempertureSensorValue); 
return (9.0/5)*x + 32; 

else 

mvelInfo({sysName," ",Index," ","Defined? ",isdef(tempertureSensorValue)," ",tempertureSensorValue}) 

return null;