{"record":{"id":"c76acde0339ba737","repo":"redis/jedis","slug":"it-is-not-allowed-to-create-pipeline-from-this-g","errorCode":null,"errorMessage":"It is not allowed to create Pipeline from this ${getClass()}","messagePattern":"It is not allowed to create Pipeline from this (.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"src/main/java/redis/clients/jedis/UnifiedJedis.java","lineNumber":5997,"sourceCode":"  }\n\n  @Override\n  public List<Double> tdigestByRank(String key, long... ranks) {\n    return executeCommand(commandObjects.tdigestByRank(key, ranks));\n  }\n\n  @Override\n  public List<Double> tdigestByRevRank(String key, long... ranks) {\n    return executeCommand(commandObjects.tdigestByRevRank(key, ranks));\n  }\n  // RedisBloom commands\n\n  /**\n   * @return pipeline object\n   */\n  public AbstractPipeline pipelined() {\n    if (provider == null) {\n      throw new IllegalStateException(\"It is not allowed to create Pipeline from this \" + getClass());\n    } else if (provider instanceof MultiDbConnectionProvider) {\n      return new MultiDbPipeline((MultiDbConnectionProvider) provider, commandObjects);\n    } else {\n      return new Pipeline(provider.getConnection(), true, commandObjects);\n    }\n  }\n\n  /**\n   * @return transaction object\n   */\n  public AbstractTransaction multi() {\n    return transaction(true);\n  }\n\n  /**\n   * @param doMulti {@code false} should be set to enable manual WATCH, UNWATCH and MULTI\n   * @return transaction object\n   */","sourceCodeStart":5979,"sourceCodeEnd":6015,"githubUrl":"https://github.com/redis/jedis/blob/6dac31d4c224fb3257c216f3985340c6f500cdcb/src/main/java/redis/clients/jedis/UnifiedJedis.java#L5979-L6015","documentation":"UnifiedJedis.pipelined() needs a ConnectionProvider to obtain a connection for the pipeline. Some UnifiedJedis subclasses (e.g. cluster/failover setups where provider is null or unused) cannot create a plain pipeline, so Jedis throws IllegalStateException naming the concrete class.","triggerScenarios":"Calling pipelined() on a client instance whose provider field is null — typically certain UnifiedJedis subclasses or custom clients that never install a ConnectionProvider (e.g. some failover/cluster configurations).","commonSituations":"Using pipelined() on RedisClusterClient-style or custom clients where pipelines aren't supported; constructing a bare UnifiedJedis in tests; mocking clients.","solutions":["Use the client type that supports pipelining (RedisClient / standalone UnifiedJedis with a provider).","For cluster clients, use ClusterPipeline via the cluster-specific API instead.","Build the client through its builder so a default ConnectionProvider is installed.","Check whether your subclass overrides pipelined() or supports it before calling."],"exampleFix":"// before\nUnifiedJedis custom = new MyClusterClient(cfg);\nAbstractPipeline p = custom.pipelined(); // throws\n// after\nRedisClient c = RedisClient.builder().endpoint(ep).build();\nAbstractPipeline p = c.pipelined();","handlingStrategy":"type-guard","validationCode":"AbstractPipeline p = null;\ntry { p = client.pipelined(); } catch (IllegalStateException e) { /* unsupported */ }","typeGuard":"// Java: feature-test via class or capability check\nboolean supportsPipeline = !(client instanceof ClusterOrFailoverUnsupportedType)\n    && client.pipelinedAvailable(); // if exposed; otherwise try-catch","tryCatchPattern":"try {\n  AbstractPipeline p = client.pipelined();\n} catch (IllegalStateException e) {\n  // fall back to per-command execution\n}","preventionTips":["Use RedisClient/standalone clients for pipelining","Use cluster pipelines on cluster clients","Build clients through their builders so providers are installed"],"tags":["pipeline","unsupported-operation","jedis","cluster"],"backgroundTag":"unsupported-operation","analyzedSha":"6dac31d4c224fb3257c216f3985340c6f500cdcb","analyzedAt":"2026-09-08T04:55:01.204Z","contentChangedAt":"2026-09-08T04:55:01.204Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}