Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

NumberFormatException, Strategy component failed in DSM



In Expression Builder, during conversion from Double to BigDecimal, you receive a NumberFormatException after performing a division by zero using a property stored as a Double and then placing the result into a Decimal property.

Error Messages

Java Decimal default exception of "NumberFormatException"

Strategy component Relevancy failed to execute
Strategy component Eligibility failed to execute
Strategy component Validity failed to execute
Strategy component SetCommonProperties failed to execute
Expression in Strategy Set failed to execute for property <property_name>

Steps to Reproduce

  1. In an activity, add a step having “Property-Set” method.
  2. In first text box, enter <.DecimalProperty>.
  3. In the second text box, enter <.DoubleProperty/.DoubleProperty>.
  4. Run the activity, bypassing <.DoubleProperty> value as zero.

Root Cause

While the Java Double data type specification has an internal representation for NaN (Not a Number), the Java Decimal data type does not.  

When NaN is attempted to be converted into a Java Decimal, it throws a Java NumberFormatException, which is the exception received.


Perform the following local-change:

Wrap your DoubleProperty in logic that handles the possibility of an Infinity or NAN value.
Choose logic that assigns a value that is meaningful to the business.  
​For example, use an if-then-else expression:

@if((.DoubleProperty == 0), 0, (.SomeProperty/.DoubleProperty)) to assign the value of 0 to the expression as opposed to NAN or Infinity.  Choose a result appropriate to your business.
Suggest Edit

Published September 25, 2015 - Updated October 8, 2020

Did you find this content helpful? Yes No

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us