Error in Rules engine: java.lang.NumberFormatException: For input string: ""

Error in Rules engine: java.lang.NumberFormatException: For input string: ""

book

Article ID: KB0093490

calendar_today

Updated On:

Products Versions
TIBCO BusinessWorks ProcessMonitor -
Not Applicable -

Description

Description:
TIBCO BusinessWorks ProcessMonitor (BWPM) allows users to create rules by defining conditions and actions to perform when conditions evaluate to "true". In rules, conditions can be defined on length if length is configured with a space or non numeric value. It will then fail to convert to a numeric value and log an error on saving rules.

Symptoms:
2015-03-04 12:51:47,071 ERROR [Dataprovider:dpQueue_0.thread] dataprovider: error in rules engine:
java.lang.NumberFormatException: For input string: ""
    at java.lang.NumberFormatException.forInputString(Unknown Source)
    at java.lang.Long.parseLong(Unknown Source)
    at java.lang.Long.parseLong(Unknown Source)
    at com.faizsiegeln.njams.rules.rules.expressions.LengthExpression.test(LengthExpression.java:13)
    at com.faizsiegeln.njams.rules.rules.expressions.AbstractExpression.test(AbstractExpression.java:38)
    at com.faizsiegeln.njams.rules.rules.Rule.run(Rule.java:34)
    at com.faizsiegeln.njams.rules.rules.MasterRule.runTheRules(MasterRule.java:66)
    at com.faizsiegeln.njams.rules.rules.MasterRule.run(MasterRule.java:58)
    at com.faizsiegeln.njams.rules.bus.RuleEngine.process(RuleEngine.java:47)
    at com.faizsiegeln.njams.rules.bus.RulesIncomingMsgProcessor.process(RulesIncomingMsgProcessor.java:16)
    at com.faizsiegeln.njams.dataprovider.DpWorker.writeMessage(DpWorker.java:515)
    at com.faizsiegeln.njams.dataprovider.DpWorker.run(DpWorker.java:268)
Cause:
While evaluating a condition defined in a rule when the TIBCO BusinessWorks ProcessMonitor (BWPM) rule engine is running, it fails to convert the configured value(space) into a numeric value and throws java.lang.NumberFormatException.forInputString.

Resolution

Configure the rules with numeric values for conditions defined on length.

Issue/Introduction

Error in Rules engine: java.lang.NumberFormatException: For input string: ""