Products | Versions |
---|---|
TIBCO BusinessEvents Enterprise Edition | - |
Not Applicable | - |
Resolution:
Description:
=========
NumberFormatException is seen for Number.valueOfString() method in a rule when input is greater than 10 digits in length.
Environment:
==========
TIBCO Product name and version: TIBCO BusinessEvents (BE) 4.0.1
Operating System(s): All
Symptoms:
========
The following NumberFormatException is seen for valueOfString() method in a rule:
+++++++++++
java.lang.NumberFormatException: For input string: "101877286136"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:461)
at java.lang.Integer.valueOf(Integer.java:528)
at com.tibco.be.functions.java.integer.JavaFunctions.valueOfString(JavaFunctions.java:124)
at be.gen.OfferEngine.Rules.BatchOperationRules.CacheDataUpdate.UpdateCluster$UpdateCluster_a.execute(UpdateCluster.java:61)
at com.tibco.cep.kernel.core.rete.ReteWM.resolveConflict(ReteWM.java:311)
at com.tibco.cep.kernel.core.rete.ReteWM.resolveConflict(ReteWM.java:289)
at com.tibco.cep.kernel.core.rete.ReteWM.assertObject(ReteWM.java:1524)
at com.tibco.cep.runtime.session.impl.RuleSessionImpl.assertObject(RuleSessionImpl.java:1255)
at com.tibco.cep.runtime.service.om.coherence.cluster.agents.ClusterTaskController.executeTask(ClusterTaskController.java:68)
at com.tibco.cep.runtime.scheduler.impl.WorkerBasedControllerV2$WorkerTask.run(WorkerBasedControllerV2.java:386)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at com.tibco.cep.runtime.util.CustomBEManagedThread.run(CustomBEManagedThread.java:23)
+++++++++++
Cause:
=====
The NumberFormatException could be because of the int max value limit (see call to parseInt in trace)
http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html
Resolution:
========
Use the longValue() method instead.
References:
=========
http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html