Description | This article describes a workaround to fix the 'JSONException: JSON does not allow non-finite numbers' from the incident view. |
Scope | FrotiSIEM Pre-7.3.1. |
Solution |
The issue occurs because of forcefully converting a double to a float in the ph_risk_score table, which can cause overflow or underflow if the value is too large or too small, resulting in Infinity, -Infinity, or NaN. If it is set as Infinity, -Infinity, or NaN as numbers in JSON, it will throw this exception:
A system exception occurred during an invocation on EJB IncidentServiceBean, method: public org.json.JSONObject com.ph.phoenix.service.query.IncidentServiceBean.retrieveIncidentDashboard(java.util.List,java.lang.Long,java.lang.Long)]]
# psql -U phoenix phoenixdb -c "select id, delta_score, bucket_score_total, weight, last_score, apply_risk_score_momentum_effect( apply_risk_score_entity_importance( delta_score + bucket_score_total, weight ), last_score) as current_score from ph_risk_score where apply_risk_score_momentum_effect( apply_risk_score_entity_importance( delta_score + bucket_score_total, weight ), last_score) = 'Infinity'::FLOAT OR apply_risk_score_momentum_effect( apply_risk_score_entity_importance( delta_score + bucket_score_total, weight ), last_score) ='-Infinity'::FLOAT OR apply_risk_score_momentum_effect( apply_risk_score_entity_importance( delta_score + bucket_score_total, weight ), last_score) = 'NaN'::FLOAT8;"
# psql -U phoenix phoenixdb -c "delete from ph_risk_score where apply_risk_score_momentum_effect( apply_risk_score_entity_importance( delta_score + bucket_score_total, weight ), last_score) = 'Infinity'::FLOAT OR apply_risk_score_momentum_effect( apply_risk_score_entity_importance( delta_score + bucket_score_total, weight ), last_score) ='-Infinity'::FLOAT OR apply_risk_score_momentum_effect( apply_risk_score_entity_importance( delta_score + bucket_score_total, weight ), last_score) = 'NaN'::FLOAT8;" |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.