{"record":{"id":"2336261948079036","repo":"Netflix/Hystrix","slug":"unsupported-execution-type","errorCode":null,"errorMessage":"unsupported execution type: {}","messagePattern":"unsupported execution type: (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/command/CommandExecutor.java","lineNumber":67,"sourceCode":"\n        switch (executionType) {\n            case SYNCHRONOUS: {\n                return castToExecutable(invokable, executionType).execute();\n            }\n            case ASYNCHRONOUS: {\n                HystrixExecutable executable = castToExecutable(invokable, executionType);\n                if (metaHolder.hasFallbackMethodCommand()\n                        && ExecutionType.ASYNCHRONOUS == metaHolder.getFallbackExecutionType()) {\n                    return new FutureDecorator(executable.queue());\n                }\n                return executable.queue();\n            }\n            case OBSERVABLE: {\n                HystrixObservable observable = castToObservable(invokable);\n                return ObservableExecutionMode.EAGER == metaHolder.getObservableExecutionMode() ? observable.observe() : observable.toObservable();\n            }\n            default:\n                throw new RuntimeException(\"unsupported execution type: \" + executionType);\n        }\n    }\n\n    private static HystrixExecutable castToExecutable(HystrixInvokable invokable, ExecutionType executionType) {\n        if (invokable instanceof HystrixExecutable) {\n            return (HystrixExecutable) invokable;\n        }\n        throw new RuntimeException(\"Command should implement \" + HystrixExecutable.class.getCanonicalName() + \" interface to execute in: \" + executionType + \" mode\");\n    }\n\n    private static HystrixObservable castToObservable(HystrixInvokable invokable) {\n        if (invokable instanceof HystrixObservable) {\n            return (HystrixObservable) invokable;\n        }\n        throw new RuntimeException(\"Command should implement \" + HystrixObservable.class.getCanonicalName() + \" interface to execute in observable mode\");\n    }\n\n}","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/Netflix/Hystrix/blob/5ce3bc58c38e7ca60ef2fe0e516e390e294ad941/hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/command/CommandExecutor.java#L49-L85","documentation":"CommandExecutor.execute dispatches on ExecutionType (SYNCHRONOUS, ASYNCHRONOUS, OBSERVABLE) derived from the method's return type; any other/null value falls to the default branch and throws RuntimeException. In practice this signals an internal inconsistency — the execution type computed by MetaHolder did not match one of the known enum constants — rather than a normal user configuration error.","triggerScenarios":"metaHolder.getExecutionType() (or collapserExecutionType) returning null or an unexpected value, e.g. after mixing incompatible hystrix-javanica and hystrix-core versions where ExecutionType semantics diverged, or a custom MetaHolderFactory/extension returning a bad type.","commonSituations":"Version skew between hystrix-contrib/hystrix-javanica and hystrix-core artifacts on the classpath; custom forks or shaded copies of javanica classes; collapser whose execution-type resolution was customized.","solutions":["Align hystrix-javanica, hystrix-core (and hystrix-metrics-event-stream etc.) to the same released 1.5.x version — check for duplicates with 'mvn dependency:tree | grep hystrix'.","Exclude transitively pulled older/newer javanica jars from other dependencies.","If you extend MetaHolderFactory or CommandExecutor, ensure the produced executionType is one of the three enum constants for every annotated signature."],"exampleFix":"<!-- before: mixed versions -->\n<dependency><groupId>com.netflix.hystrix</groupId><artifactId>hystrix-javanica</artifactId><version>1.5.8</version></dependency>\n<dependency><groupId>com.netflix.hystrix</groupId><artifactId>hystrix-core</artifactId><version>1.5.18</version></dependency>\n\n<!-- after: aligned -->\n<dependency><groupId>com.netflix.hystrix</groupId><artifactId>hystrix-javanica</artifactId><version>1.5.18</version></dependency>\n<dependency><groupId>com.netflix.hystrix</groupId><artifactId>hystrix-core</artifactId><version>1.5.18</version></dependency>","handlingStrategy":"try-catch","validationCode":"// Verify a single javanica version on classpath at build time:\n// mvn dependency:tree -Dincludes=com.netflix.hystrix  -> expect one hystrix-javanica and one hystrix-core version","typeGuard":null,"tryCatchPattern":"try { CommandExecutor.execute(invokable, executionType, metaHolder); } catch (RuntimeException e) { if (\"unsupported execution type\".equals(prefix(e))) { log.error(\"hystrix version/extension mismatch — audit dependency tree and custom factories\"); } throw e; }","preventionTips":["Pin all com.netflix.hystrix artifacts to one version via dependencyManagement; run dependency:tree in CI to catch duplicates.","If you fork/extend javanica internals, add tests covering all three ExecutionType paths."],"tags":["hystrix","javanica","execution-type","version-conflict","internal"],"backgroundTag":null,"analyzedSha":"5ce3bc58c38e7ca60ef2fe0e516e390e294ad941","analyzedAt":"2026-08-14T10:55:35.600Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}