{"record":{"id":"faad1908fe8c3131","repo":"flowable/flowable-engine","slug":"the-attribute-must-resolve-to-an-number-or-a-s-faad19","errorCode":null,"errorMessage":"The [<attribute>] must resolve to an Number or a String that can be parsed as a Double. Resolved to [<class>] for [<value>]","messagePattern":"The \\[<attribute>\\] must resolve to an Number or a String that can be parsed as a Double\\. Resolved to \\[<class>\\] for \\[<value>\\]","errorType":"validation","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"modules/flowable-event-registry-spring/src/main/java/org/flowable/eventregistry/spring/kafka/KafkaChannelDefinitionProcessor.java","lineNumber":492,"sourceCode":"        } else if (resolved instanceof Number) {\n            result = ((Number) resolved).longValue();\n        } else if (resolved != null) {\n            throw new IllegalStateException(\n                    \"The [\" + attribute + \"] must resolve to an Number or a String that can be parsed as a Long. \"\n                            + \"Resolved to [\" + resolved.getClass() + \"] for [\" + value + \"]\");\n        }\n        return result;\n    }\n\n    protected Double resolveExpressionAsDouble(String value, String attribute) {\n        Object resolved = resolveExpression(value);\n        Double result = null;\n        if (resolved instanceof String) {\n            result = Double.parseDouble((String) resolved);\n        } else if (resolved instanceof Number) {\n            result = ((Number) resolved).doubleValue();\n        } else if (resolved != null) {\n            throw new IllegalStateException(\n                    \"The [\" + attribute + \"] must resolve to an Number or a String that can be parsed as a Double. \"\n                            + \"Resolved to [\" + resolved.getClass() + \"] for [\" + value + \"]\");\n        }\n        return result;\n    }\n\n    protected Boolean resolveExpressionAsBoolean(String value, String attribute) {\n        return resolveExpressionAsBoolean(value, attribute, null);\n    }\n\n    protected Boolean resolveExpressionAsBoolean(String value, String attribute, Boolean defaultValue) {\n        Object resolved = resolveExpression(value);\n        Boolean result = defaultValue;\n        if (resolved instanceof String) {\n            result = Boolean.parseBoolean((String) resolved);\n        } else if (resolved instanceof Boolean) {\n            result = (Boolean) resolved;\n        } else if (resolved != null) {","sourceCodeStart":474,"sourceCodeEnd":510,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-event-registry-spring/src/main/java/org/flowable/eventregistry/spring/kafka/KafkaChannelDefinitionProcessor.java#L474-L510","documentation":"resolveExpressionAsDouble resolves an attribute expression expecting a Double, Double-parseable String, or null; anything else throws IllegalStateException. It backs the retry backoff multiplier, so a wrongly typed multiplier expression triggers this during endpoint creation.","triggerScenarios":"The multiplier attribute of the retry backoff configuration resolves to a type that is neither Number, String, nor null (e.g. Boolean, List) when resolveRetryConfiguration builds the retry template.","commonSituations":"Multiplier bound to a boolean flag by mistake; placeholder points at a list of multipliers instead of a single value; locale-formatted decimal string like \"1,5\" fails parse (NumberFormatException) vs wrong class here is object type mismatch.","solutions":["Set multiplier to a numeric value or numeric String with a decimal point, e.g. 2.0 or \"2.0\".","Fix the referenced property so it is a Double, not a collection/boolean.","Check the expression/placeholder key for typos resolving to an unrelated bean.","Use a dot as decimal separator; avoid locale-formatted strings."],"exampleFix":"// before\nflowable:\n  kafka:\n    retry:\n      multiplier: [2.0, 3.0]   # resolves to a List\n\n// after\nflowable:\n  kafka:\n    retry:\n      multiplier: 2.0","handlingStrategy":"type-guard","validationCode":"Object v = resolveExpression(value);\nif (v != null && !(v instanceof Number) && !(v instanceof String)) throw new IllegalArgumentException(attribute + \" must be double-like\");","typeGuard":"boolean isDoubleLike(Object v) { return v == null || v instanceof Number || (v instanceof String s && s.matches(\"-?\\\\d+(\\\\.\\\\d+)?\")); }","tryCatchPattern":"try { ... } catch (IllegalStateException e) { if (e.getMessage().contains(\"parsed as a Double\")) { log.error(\"Backoff multiplier not a Double: {}\", e.getMessage()); } else throw e; }","preventionTips":["Configure multiplier as a single decimal number (e.g. 2.0)","Never bind multiplier to lists or flags","Use dot decimal separator regardless of locale"],"tags":["kafka","type-mismatch","retry-backoff"],"backgroundTag":"type-mismatch","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"}