{"record":{"id":"ee777e1bd919c1a2","repo":"Netflix/Hystrix","slug":"failed-to-set-command-properties","errorCode":null,"errorMessage":"Failed to set Command properties. {}","messagePattern":"Failed to set Command properties\\. (.+?)","errorType":"exception","errorClass":"HystrixPropertyException","httpStatus":null,"severity":"error","filePath":"hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/command/GenericSetterBuilder.java","lineNumber":88,"sourceCode":"     *\n     * @return the instance of {@link HystrixCommand.Setter}\n     */\n    public HystrixCommand.Setter build() throws HystrixPropertyException {\n        HystrixCommand.Setter setter = HystrixCommand.Setter\n                .withGroupKey(HystrixCommandGroupKey.Factory.asKey(groupKey))\n                .andCommandKey(HystrixCommandKey.Factory.asKey(commandKey));\n        if (StringUtils.isNotBlank(threadPoolKey)) {\n            setter.andThreadPoolKey(HystrixThreadPoolKey.Factory.asKey(threadPoolKey));\n        }\n        try {\n            setter.andThreadPoolPropertiesDefaults(HystrixPropertiesManager.initializeThreadPoolProperties(threadPoolProperties));\n        } catch (IllegalArgumentException e) {\n            throw new HystrixPropertyException(\"Failed to set Thread Pool properties. \" + getInfo(), e);\n        }\n        try {\n            setter.andCommandPropertiesDefaults(HystrixPropertiesManager.initializeCommandProperties(commandProperties));\n        } catch (IllegalArgumentException e) {\n            throw new HystrixPropertyException(\"Failed to set Command properties. \" + getInfo(), e);\n        }\n        return setter;\n    }\n\n    // todo dmgcodevil: it would be better to reuse the code from build() method\n    public HystrixObservableCommand.Setter buildObservableCommandSetter() {\n        HystrixObservableCommand.Setter setter = HystrixObservableCommand.Setter\n                .withGroupKey(HystrixCommandGroupKey.Factory.asKey(groupKey))\n                .andCommandKey(HystrixCommandKey.Factory.asKey(commandKey));\n        try {\n            setter.andCommandPropertiesDefaults(HystrixPropertiesManager.initializeCommandProperties(commandProperties));\n        } catch (IllegalArgumentException e) {\n            throw new HystrixPropertyException(\"Failed to set Command properties. \" + getInfo(), e);\n        }\n        return setter;\n    }\n\n    public HystrixCollapser.Setter buildCollapserCommandSetter(){","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/Netflix/Hystrix/blob/5ce3bc58c38e7ca60ef2fe0e516e390e294ad941/hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/command/GenericSetterBuilder.java#L70-L106","documentation":"Same wrapper path as the thread-pool error, but for the commandProperties attribute: when HystrixPropertiesManager.initializeCommandProperties throws IllegalArgumentException (unknown command property name, or a value that cannot be parsed to int/boolean/enum), GenericSetterBuilder.build() wraps it in HystrixPropertyException with the command's keys appended. It fires the first time the annotated method executes and the Setter is constructed.","triggerScenarios":"@HystrixCommand(commandProperties = { @HystrixProperty(name = \"execution.isolation.thread.timeoutInMillisecond\", value = \"1000\") }) (typo'd name), or value = \"fast\" for an int property like execution.isolation.thread.timeoutInMilliseconds, or an invalid enum value for execution.isolation.strategy.","commonSituations":"Typos in the long dotted property names; copying property names from a different Hystrix version (properties were added/renamed across 1.3.x/1.4.x/1.5.x); injecting property values from external config where an empty or non-numeric placeholder is resolved.","solutions":["Use getInfo() in the message to locate the exact command (groupKey/commandKey)","Check each commandProperties @HystrixProperty name against HystrixPropertiesManager.COMMAND_PROP_MAP for your exact Hystrix version","Confirm value strings parse: ints for timeouts/window sizes, true/false for booleans, THREAD/SEMAPHORE for execution.isolation.strategy","Correct or remove the bad property; redeploy"],"exampleFix":"// before\n@HystrixProperty(name = \"execution.isolation.thread.timeoutInMillisecond\", value = \"1000\")\n\n// after\n@HystrixProperty(name = \"execution.isolation.thread.timeoutInMilliseconds\", value = \"1000\")","handlingStrategy":"validation","validationCode":"Set<String> VALID_CMD = new HashSet<>(Arrays.asList(\n    \"execution.isolation.strategy\", \"execution.isolation.thread.timeoutInMilliseconds\",\n    \"execution.isolation.semaphore.maxConcurrentRequests\", \"circuitBreaker.requestVolumeThreshold\",\n    \"circuitBreaker.errorThresholdPercentage\", \"metrics.rollingStats.timeInMilliseconds\" /* ... full map */ ));\n\nfor (Method m : clazz.getDeclaredMethods()) {\n  HystrixCommand a = m.getAnnotation(HystrixCommand.class);\n  if (a == null) continue;\n  for (HystrixProperty p : a.commandProperties()) {\n    if (!VALID_CMD.contains(p.name()))\n      throw new IllegalStateException(m + \" unknown command property \" + p.name());\n  }\n}","typeGuard":null,"tryCatchPattern":"catch (HystrixPropertyException e) { throw new IllegalStateException(\"Fix @HystrixCommand config: \" + e.getMessage(), e); }","preventionTips":["Copy property names from HystrixPropertiesManager source for your exact version","Never hand-type long dotted names; use constants or copy-paste from passing commands","Add integration test invoking each annotated method once so config errors fail CI"],"tags":["hystrix","javanica","configuration","command-properties","annotation"],"backgroundTag":null,"analyzedSha":"5ce3bc58c38e7ca60ef2fe0e516e390e294ad941","analyzedAt":"2026-08-14T10:55:35.600Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}