{"record":{"id":"42462ec48421a1a3","repo":"t8y2/dbx","slug":"unsupported-cassandra-url-parameter-s","errorCode":null,"errorMessage":"unsupported Cassandra URL parameter: %s","messagePattern":"unsupported Cassandra URL parameter: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/cassandra-go/config.go","lineNumber":342,"sourceCode":"\t\tcase \"kerberosusekeytab\", \"usekeytab\":\n\t\t\tenabled, err := strconv.ParseBool(value)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"invalid usekeytab option: %w\", err)\n\t\t\t}\n\t\t\tconfig.kerberos.useKeytab = enabled\n\t\t\tconfig.kerberos.useKeytabSet = true\n\t\tcase \"kerberosuseticketcache\", \"useticketcache\":\n\t\t\tenabled, err := strconv.ParseBool(value)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"invalid useticketcache option: %w\", err)\n\t\t\t}\n\t\t\tconfig.kerberos.useTicketCache = enabled\n\t\t\tconfig.kerberos.useTicketCacheSet = true\n\t\tcase \"compliancemode\":\n\t\t\t// JDBC compliance modes only alter java.sql behavior. The native DBX\n\t\t\t// JSON-RPC contract already defines statement and transaction behavior.\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"unsupported Cassandra URL parameter: %s\", rawKey)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (config cassandraConfig) clusterConfig(keyspace string) (*gocql.ClusterConfig, error) {\n\tvar cluster *gocql.ClusterConfig\n\tvar err error\n\tif config.secureConnectBundle != \"\" {\n\t\tcluster, err = gocqlastra.NewClusterFromBundle(\n\t\t\tconfig.secureConnectBundle,\n\t\t\tconfig.username,\n\t\t\tconfig.password,\n\t\t\tconfig.connectTimeout,\n\t\t)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"load Cassandra secure connect bundle: %w\", err)\n\t\t}","sourceCodeStart":324,"sourceCodeEnd":360,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/cassandra-go/config.go#L324-L360","documentation":"Any URL parameter not recognized by applyCassandraURLParams's switch is rejected with this error, listing the raw key. The native agent supports a fixed subset of the Java/JDBC driver options, so unknown parameters fail fast instead of being silently ignored.","triggerScenarios":"DSN contains a parameter key outside the supported set, e.g. cassandra://host/db?consistency=quorum or ssl_engine=true; also keys with unexpected prefixes or casing variants not in the switch (key matching is normalized to lowercase but the option set is fixed).","commonSituations":"Reusing a Java Cassandra driver JDBC URL verbatim with options like localdatacenter, protocolversion, or jemalloc-style flags; typos in supported keys (retry vs retries); tooling that appends generic SQL params like applicationname.","solutions":["Remove the unsupported parameter from the URL","Map the Java driver option to the closest supported agent option (e.g. use 'retry' or 'retries' instead of unknown retry-related keys)","Check the applyCassandraURLParams switch in agents/drivers/cassandra-go/config.go for the exact list of supported keys"],"exampleFix":"// before\ncassandra://127.0.0.1/myks?localdatacenter=dc1&retries=3\n// after\ncassandra://127.0.0.1/myks?retries=3","handlingStrategy":"validation","validationCode":"var supported = map[string]bool{\n\t\"username\": true, \"password\": true, \"debug\": true, \"retries\": true, \"retry\": true,\n\t\"disableinitialhostlookup\": true, \"loadbalancing\": true, \"sslenginefactory\": true,\n\t\"usekrb5\": true, \"secureconnectbundle\": true, \"configfile\": true,\n\t\"kerberosqop\": true, \"saslqop\": true, \"kerberosdisablepafxfast\": true, \"disablepafxfast\": true,\n\t\"kerberosusekeytab\": true, \"usekeytab\": true, \"kerberosuseticketcache\": true, \"useticketcache\": true,\n\t\"compliancemode\": true,\n}\nfor k := range q {\n\tif !supported[strings.ToLower(k)] { return fmt.Errorf(\"unsupported param: %s\", k) }\n}","typeGuard":null,"tryCatchPattern":"if err := parseCassandraConfig(dsn); err != nil {\n\tif strings.Contains(err.Error(), \"unsupported Cassandra URL parameter\") {\n\t\treturn parseCassandraConfig(stripUnsupportedParams(dsn))\n\t}\n\treturn err\n}","preventionTips":["Maintain a whitelist of supported params when migrating Java URLs","Log and drop unknown params during migration rather than passing them through","Test connection strings against the agent's supported option list"],"tags":["config","url-params","validation","cassandra","unsupported-feature"],"backgroundTag":"unsupported-driver-option","analyzedSha":"c0390bff16418b651f4728520d99adf8ce48829a","analyzedAt":"2026-09-05T23:05:10.900Z","contentChangedAt":"2026-09-05T23:05:10.900Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}