{"record":{"id":"dc8769bbb06d55ed","repo":"quarkusio/quarkus","slug":"unsupported-compressor","errorCode":null,"errorMessage":"Unsupported compressor '","messagePattern":"Unsupported compressor '","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions/mongodb-client/runtime/src/main/java/io/quarkus/mongodb/runtime/graal/MongoClientSubstitutions.java","lineNumber":61,"sourceCode":"\n}\n\n@TargetClass(ConnectionString.class)\nfinal class ConnectionStringSubstitution {\n\n    @Substitute\n    private List<MongoCompressor> buildCompressors(final String compressors, @Nullable final Integer zlibCompressionLevel) {\n        List<MongoCompressor> compressorsList = new ArrayList<>();\n\n        for (String cur : compressors.split(\",\")) {\n            if (cur.equals(\"zlib\")) {\n                MongoCompressor zlibCompressor = MongoCompressor.createZlibCompressor();\n                zlibCompressor = zlibCompressor.withProperty(MongoCompressor.LEVEL, zlibCompressionLevel);\n                compressorsList.add(zlibCompressor);\n            } else if (cur.equals(\"snappy\")) {\n                // DO NOTHING\n            } else if (!cur.isEmpty()) {\n                throw new IllegalArgumentException(\"Unsupported compressor '\" + cur + \"'\");\n            }\n        }\n\n        return unmodifiableList(compressorsList);\n    }\n\n}\n\n@TargetClass(UnixServerAddress.class)\nfinal class UnixServerAddressSubstitution {\n\n}\n\n@TargetClass(SocketStreamFactory.class)\nfinal class SocketStreamFactorySubstitution {\n\n    @Alias\n    private InetAddressResolver inetAddressResolver;","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/mongodb-client/runtime/src/main/java/io/quarkus/mongodb/runtime/graal/MongoClientSubstitutions.java#L43-L79","documentation":"Quarkus's buildCompressors substitution validates the quarkus.mongodb.compressors config in native mode and throws IllegalArgumentException for any compressor name other than zlib or snappy (or empty). It indicates an invalid or misspelled compressor name in configuration.","triggerScenarios":"Setting quarkus.mongodb.compressors to a value like 'zlip', 'snappyx', 'deflate', or any non-empty string other than zlib/snappy; the substitution parses each comma-separated entry and rejects unknown names.","commonSituations":"Typo in application.properties; copying a compressor list from the MongoDB URI docs (e.g. 'zstd') that Quarkus native substitution does not support; including trailing entries like 'disabled'.","solutions":["Fix the value to one of: zlib, snappy (ignored in native), or empty string","Use quarkus.mongodb.compressors=zlib for native-compatible compression","Clear the property entirely to disable compression"],"exampleFix":"// before\nquarkus.mongodb.compressors=zstd\n// after\nquarkus.mongodb.compressors=zlib","handlingStrategy":"validation","validationCode":"Set<String> allowed = Set.of(\"zlib\", \"snappy\", \"\");\nfor (String c : compressorsProperty.split(\",\")) {\n    if (!allowed.contains(c.trim())) {\n        throw new IllegalArgumentException(\"Unknown compressor: \" + c + \"; allowed: zlib, snappy\");\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    mongoClient = buildFromConfig();\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().startsWith(\"Unsupported compressor\")) {\n        log.error(\"Bad quarkus.mongodb.compressors value; using zlib\");\n    } else throw e;\n}","preventionTips":["Validate quarkus.mongodb.compressors values at startup (config mapping with pattern)","Never paste compressor names from generic MongoDB docs without checking Quarkus support","Keep a small allowlist: zlib, snappy"],"tags":["mongodb","configuration","illegal-argument","compression"],"backgroundTag":"mongodb-invalid-compressor-config","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}