{"record":{"id":"7636406bfdc8cfb2","repo":"testcontainers/testcontainers-java","slug":"the-clickhouse-does-not-support-this","errorCode":null,"errorMessage":"The ClickHouse does not support this","messagePattern":"The ClickHouse does not support this","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"modules/clickhouse/src/main/java/org/testcontainers/containers/ClickHouseContainer.java","lineNumber":121,"sourceCode":"\n    @Override\n    public String getUsername() {\n        return username;\n    }\n\n    @Override\n    public String getPassword() {\n        return password;\n    }\n\n    @Override\n    public String getTestQueryString() {\n        return TEST_QUERY;\n    }\n\n    @Override\n    public ClickHouseContainer withUrlParam(String paramName, String paramValue) {\n        throw new UnsupportedOperationException(\"The ClickHouse does not support this\");\n    }\n}\n","sourceCodeStart":103,"sourceCodeEnd":124,"githubUrl":"https://github.com/testcontainers/testcontainers-java/blob/8e549514e3f01c57d70546fbb8599d138f3903e5/modules/clickhouse/src/main/java/org/testcontainers/containers/ClickHouseContainer.java#L103-L124","documentation":"ClickHouseContainer overrides JDBC URL parameter customization to deliberately reject it. Calling withUrlParam on a ClickHouse container always throws UnsupportedOperationException('The ClickHouse does not support this'), because ClickHouse JDBC URL params are not routed through this mechanism.","triggerScenarios":"new ClickHouseContainer(...).withUrlParam(\"param\", \"value\") — any call, immediately, before start().","commonSituations":"Copy-pasting container setup code from MySQL/Postgres examples (where withUrlParam is supported) into ClickHouse configuration.","solutions":["Remove the withUrlParam call; configure driver settings through the JDBC URL string instead if needed","Use the ClickHouse-specific configuration surface (image env vars / withEnv) for server settings","Upgrade testcontainers if you need this feature — check whether a newer version supports URL params for ClickHouse"],"exampleFix":"// before\ncontainer.withUrlParam(\"socket_timeout\", \"300000\");\n// after\ncontainer.withUrlParamRemoved(); // or configure via JDBC URL / withEnv\nJDBCContainer jdbc = new JDBCContainer().withUrl(...)","handlingStrategy":"validation","validationCode":"if (container instanceof ClickHouseContainer) {\n  // never call withUrlParam on ClickHouse containers\n}","typeGuard":null,"tryCatchPattern":"try { container.withUrlParam(k, v); } catch (UnsupportedOperationException e) { /* fall back to URL/env config */ }","preventionTips":["Do not copy withUrlParam calls from MySQL/Postgres examples into ClickHouse setup","Configure ClickHouse via image env vars or the JDBC URL","Check the container class's supported methods before chaining"],"tags":["clickhouse","testcontainers","unsupported-operation","jdbc"],"backgroundTag":"unsupported-operation","analyzedSha":"8e549514e3f01c57d70546fbb8599d138f3903e5","analyzedAt":"2026-09-12T14:56:41.227Z","contentChangedAt":"2026-09-12T14:56:41.227Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}