{"record":{"id":"999ab42a8c632718","repo":"quarkusio/quarkus","slug":"option-pipe-is-not-available-for-mariadb-in-nati","errorCode":null,"errorMessage":"Option 'pipe' is not available for MariaDB in native mode","messagePattern":"Option 'pipe' is not available for MariaDB in native mode","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions/jdbc/jdbc-mariadb/runtime/src/main/java/io/quarkus/jdbc/mariadb/runtime/graal/SimpleSocketHandlerFunction.java","lineNumber":16,"sourceCode":"package io.quarkus.jdbc.mariadb.runtime.graal;\n\nimport java.io.IOException;\nimport java.net.Socket;\nimport java.sql.SQLException;\n\nimport org.mariadb.jdbc.Configuration;\nimport org.mariadb.jdbc.HostAddress;\nimport org.mariadb.jdbc.client.impl.ConnectionHelper;\nimport org.mariadb.jdbc.client.socket.impl.SocketHandlerFunction;\n\npublic class SimpleSocketHandlerFunction implements SocketHandlerFunction {\n    @Override\n    public Socket apply(Configuration conf, HostAddress hostAddress) throws IOException, SQLException {\n        if (conf.pipe() != null) {\n            throw new IllegalArgumentException(getErrorMessage(\"pipe\"));\n        } else if (conf.localSocket() != null) {\n            throw new IllegalArgumentException(getErrorMessage(\"localSocket\"));\n        }\n\n        return ConnectionHelper.standardSocket(conf, hostAddress);\n    }\n\n    private String getErrorMessage(String option) {\n        return \"Option '\" + option + \"' is not available for MariaDB in native mode\";\n    }\n}\n","sourceCodeStart":1,"sourceCodeEnd":28,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/jdbc/jdbc-mariadb/runtime/src/main/java/io/quarkus/jdbc/mariadb/runtime/graal/SimpleSocketHandlerFunction.java#L1-L28","documentation":"MariaDB's native-image socket handler in Quarkus replaces the original SocketHandlerFunction with a Graal substitution that only supports standard TCP sockets. If the JDBC URL requests a named pipe (Windows named pipe connection), the substituted code rejects it at connection time with IllegalArgumentException, because pipe-based transport is not supported by the native build.","triggerScenarios":"Native-mode build/runtime with a MariaDB JDBC URL containing 'pipe' (e.g. jdbc:mariadb://.../?pipe=\\\\.\\pipe\\mysql or localSocket combined configuration where conf.pipe() returns non-null) when the socket handler's apply() is invoked while opening a connection.","commonSituations":"Developers porting a working JVM configuration to native image; Windows setups that previously connected via named pipe to a local MariaDB/MySQL server; copied connection URLs including the pipe parameter.","solutions":["Remove the 'pipe' parameter from the JDBC URL and connect over TCP (default host/port or explicit host:port)","If the MariaDB instance only listens on a named pipe, enable TCP networking on the server (skip-networking=OFF) and connect via localhost:3306","Run in JVM mode if a pipe connection is strictly required (native mode will never support it)","Use an SSH/socket proxy that exposes the server over TCP"],"exampleFix":"// before\nString url = \"jdbc:mariadb://localhost/mydb?pipe=\\\\\\\\.\\\\pipe\\\\mysql\";\n// after\nString url = \"jdbc:mariadb://localhost:3306/mydb\";","handlingStrategy":"validation","validationCode":"if (url.contains(\"pipe=\")) { throw new IllegalArgumentException(\"MariaDB 'pipe' connections are not supported in native mode; use TCP host:port\"); }","typeGuard":"static boolean isNativeIncompatibleMariaDbUrl(String url) { return url != null && (url.contains(\"pipe=\") || url.contains(\"localSocket=\")); }","tryCatchPattern":"try { ds.getConnection(); } catch (IllegalArgumentException e) { if (e.getMessage().contains(\"not available for MariaDB in native mode\")) { log.error(\"Rewrite JDBC URL to TCP host:port\"); } throw e; }","preventionTips":["Keep JDBC URLs TCP-based (host:port) for native deployments","Document native-mode driver limitations next to datasource config","Test datasource connectivity in a native build before release","Use CI with a native-image test profile"],"tags":["native-image","jdbc","mariadb","named-pipe"],"backgroundTag":"native-image-unsupported-feature","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"}