{"record":{"id":"946065d23b6c4251","repo":"flowable/flowable-engine","slug":"could-not-parse-to-long-or-double-from","errorCode":null,"errorMessage":"Could not parse to Long or Double from: {}","messagePattern":"Could not parse to Long or Double from: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/el/util/DMNParseUtil.java","lineNumber":179,"sourceCode":"                returnValue = new BigInteger(value);\n            } else { // Default case Double\n                returnValue = Double.valueOf(value);\n            }\n        } catch (NumberFormatException nfe) {\n            LOGGER.warn(\"Could not parse to Integer, Long, Float or Double from: {}\", value);\n        }\n\n        return returnValue;\n    }\n\n    protected static Object getNumberValue(String value) {\n        try {\n            return Long.parseLong(value);\n        } catch (NumberFormatException nfe1) {\n            try {\n                return Double.parseDouble(value);\n            } catch (NumberFormatException nfe2) {\n                LOGGER.warn(\"Could not parse to Long or Double from: {}\", value);\n                return null;\n            }\n        }\n    }\n\n    protected static Class<?> getTargetType(Object targetTypeObject) {\n        if (targetTypeObject == null) {\n            return null;\n        }\n\n        if (isJavaCollection(targetTypeObject)) {\n            if (((Collection) targetTypeObject).isEmpty()) {\n                return null;\n            }\n            return ((Collection) targetTypeObject).iterator().next().getClass();\n        } else {\n            return targetTypeObject.getClass();\n        }","sourceCodeStart":161,"sourceCodeEnd":197,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/el/util/DMNParseUtil.java#L161-L197","documentation":"A WARN from the two-argument getNumberValue in DMNParseUtil: the value string failed both Long.parseLong and Double.parseDouble, so null is returned. The calling DMN evaluation continues with a missing numeric element.","triggerScenarios":"formatElementValue is asked to format a value for an unspecified numeric target type (not Integer/Float/etc.), and the string is non-numeric (e.g. \"N/A\", \"12,5\", empty).","commonSituations":"Spreadsheet/CSV-imported decision tables with blank or textual cells typed as numbers; locale decimal commas; null-ish placeholders like '-' or 'null' in cells.","solutions":["Correct the value in the decision table to a valid Long or Double literal.","Remove empty/placeholder cells or give the cell an explicit matching type.","Normalize input (trim, replace ',' with '.') before DMN execution when data originates externally."],"exampleFix":"// before\n<text>N/A</text>\n// after\n<text>0</text>","handlingStrategy":"validation","validationCode":"boolean parseable(String s) { try { Long.parseLong(s.trim()); return true; } catch (Exception e) { try { Double.parseDouble(s.trim()); return true; } catch (Exception e2) { return false; } } }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Remove placeholder text (N/A, -) from numeric cells","Normalize input values (trim, decimal point) before execution","Give ambiguous cells an explicit numeric type"],"tags":["dmn","parsing","number-format"],"backgroundTag":"invalid-argument-format","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}