{"record":{"id":"37e5a16a520017dd","repo":"alibaba/spring-ai-alibaba","slug":"no-strategy-registered-for-type","errorCode":null,"errorMessage":"No strategy registered for type: ","messagePattern":"No strategy registered for type: ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"spring-ai-alibaba-agent-framework/src/main/java/com/alibaba/cloud/ai/graph/agent/flow/strategy/FlowGraphBuildingStrategyRegistry.java","lineNumber":110,"sourceCode":"\t\tstrategyFactories.put(type, factory);\n\t}\n\n\t/**\n\t * Creates a new strategy instance by type. For built-in strategies a new instance is\n\t * returned each time; for strategies registered via {@link #registerStrategy(FlowGraphBuildingStrategy)}\n\t * the same instance is returned.\n\t * @param type the strategy type\n\t * @return a strategy implementation\n\t * @throws IllegalArgumentException if no strategy is found for the type\n\t */\n\tpublic FlowGraphBuildingStrategy createStrategy(String type) {\n\t\tif (type == null || type.trim().isEmpty()) {\n\t\t\tthrow new IllegalArgumentException(\"Strategy type cannot be null or empty\");\n\t\t}\n\n\t\tSupplier<FlowGraphBuildingStrategy> factory = strategyFactories.get(type);\n\t\tif (factory == null) {\n\t\t\tthrow new IllegalArgumentException(\"No strategy registered for type: \" + type);\n\t\t}\n\n\t\treturn factory.get();\n\t}\n\n\t/**\n\t * Gets a strategy by type (delegates to the registered factory).\n\t * @param type the strategy type\n\t * @return the strategy implementation\n\t * @throws IllegalArgumentException if no strategy is found for the type\n\t */\n\tpublic FlowGraphBuildingStrategy getStrategy(String type) {\n\t\treturn createStrategy(type);\n\t}\n\n\t/**\n\t * Checks if a strategy is registered for the given type.\n\t * @param type the strategy type","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/alibaba/spring-ai-alibaba/blob/f82da0b50f35744c13968191be2b1cd2452ef550/spring-ai-alibaba-agent-framework/src/main/java/com/alibaba/cloud/ai/graph/agent/flow/strategy/FlowGraphBuildingStrategyRegistry.java#L92-L128","documentation":"Thrown by FlowGraphBuildingStrategyRegistry.createStrategy(String) when no factory is registered under the requested type. The registry only resolves types that were registered (built-ins plus any custom registrations), so this means an unknown or misspelled strategy type. Unlike error 574, the type is non-blank but not recognized.","triggerScenarios":"createStrategy(\"sequantial\") (typo); asking for a custom strategy type before registerStrategy was called; custom strategy module not on the classpath so its registration never ran; case mismatch (\"Parallel\" vs \"parallel\").","commonSituations":"Typos in YAML/properties strategy type; forgetting to register a custom strategy before use; wrong casing after a refactor; using a type from a newer/older library version that doesn't exist.","solutions":["Check the exact registered type strings and fix the typo/casing.","Call registerStrategy(type, factory) for your custom type before createStrategy.","Ensure the module defining/registering the strategy is a dependency and its registration code executes.","List available types via registry inspection (e.g. getRegisteredTypes, if present) to confirm valid values."],"exampleFix":"// before\nregistry.createStrategy(\"sequantial\");\n// after\nregistry.createStrategy(\"sequential\"); // or register: registry.registerStrategy(\"sequantial\", ...) if intentional","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":["java","illegal-argument","registry","unknown-type"],"backgroundTag":"resource-not-found","analyzedSha":"f82da0b50f35744c13968191be2b1cd2452ef550","analyzedAt":"2026-09-09T15:32:42.421Z","contentChangedAt":"2026-09-09T15:32:42.421Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}