{"record":{"id":"97d77555ce9b91e7","repo":"MyCATApache/Mycat-Server","slug":"not-supported-yet-hostname","errorCode":null,"errorMessage":"not supported yet !{hostName}","messagePattern":"not supported yet !(.+?)","errorType":"exception","errorClass":"io.mycat.config.ConfigException","httpStatus":null,"severity":"critical","filePath":"src/main/java/io/mycat/config/ConfigInitializer.java","lineNumber":295,"sourceCode":"\t\t\t\tnodes[i].setIdleTimeout(system.getIdleTimeout());\n\t\t\t\tMySQLDataSource ds = new MySQLDataSource(nodes[i], conf, isRead);\n\t\t\t\tdataSources[i] = ds;\n\t\t\t}\n\n\t\t} else if (dbDriver.equals(\"jdbc\")) {\n\t\t\tfor (int i = 0; i < nodes.length; i++) {\n\t\t\t\tnodes[i].setIdleTimeout(system.getIdleTimeout());\n\t\t\t\tJDBCDatasource ds = new JDBCDatasource(nodes[i], conf, isRead);\n\t\t\t\tdataSources[i] = ds;\n\t\t\t}\n\t\t} else if (\"postgresql\".equalsIgnoreCase(dbType) && dbDriver.equalsIgnoreCase(\"native\")){\n\t\t\tfor (int i = 0; i < nodes.length; i++) {\n\t\t\t\tnodes[i].setIdleTimeout(system.getIdleTimeout());\n\t\t\t\tPostgreSQLDataSource ds = new PostgreSQLDataSource(nodes[i], conf, isRead);\n\t\t\t\tdataSources[i] = ds;\n\t\t\t}\n\t\t} else{\n\t\t\tthrow new ConfigException(\"not supported yet !\" + hostName);\n\t\t}\n\t\treturn dataSources;\n\t}\n\n\tprivate PhysicalDBPool getPhysicalDBPool(DataHostConfig conf,\n\t\t\tConfigLoader configLoader) {\n\t\tString name = conf.getName();\n\t\t//数据库类型，我们这里只讨论MySQL\n\t\tString dbType = conf.getDbType();\n\t\t//连接数据库驱动，我们这里只讨论MyCat自己实现的native\n\t\tString dbDriver = conf.getDbDriver();\n\t\t//针对所有写节点创建PhysicalDatasource\n\t\tPhysicalDatasource[] writeSources = createDataSource(conf, name,\n\t\t\t\tdbType, dbDriver, conf.getWriteHosts(), false);\n\t\tMap<Integer, DBHostConfig[]> readHostsMap = conf.getReadHosts();\n\t\tMap<Integer, PhysicalDatasource[]> readSourcesMap = new HashMap<Integer, PhysicalDatasource[]>(\n\t\t\t\treadHostsMap.size());\n\t\t//对于每个读节点建立key为writeHost下标value为readHost的PhysicalDatasource[]的哈希表","sourceCodeStart":277,"sourceCodeEnd":313,"githubUrl":"https://github.com/MyCATApache/Mycat-Server/blob/65f8d8beb752f935752f2a0eec0ab017facab9ef/src/main/java/io/mycat/config/ConfigInitializer.java#L277-L313","documentation":"ConfigInitializer.createDataSource only supports MySQL and PostgreSQL data hosts; for any other DB type it throws ConfigException('not supported yet !' + hostName) because there is no DataSource implementation for that host's DB type.","triggerScenarios":"Defining a <dataHost> in schema.xml whose <dbType> is something other than mysql or postgresql, causing createDataSource to fall through to the else branch.","commonSituations":"Users configure oracle, sqlserver, mongodb, or a typo'd dbType (e.g. 'MYSQL' with wrong case in older versions) in dataHost config; also seen after upgrading Mycat and expecting a newly advertised DB type to work.","solutions":["Change the dataHost's dbType to mysql or postgresql in schema.xml","Check the configured dbType string for typos/case mismatches","Use a Mycat version or fork that includes a DataSource implementation for your DB type","Wrap that backend with a MySQL-protocol proxy if you must keep Mycat 1.x"],"exampleFix":"// before (schema.xml)\n<dbType>oracle</dbType>\n// after\n<dbType>mysql</dbType>","handlingStrategy":"validation","validationCode":"String dbType = dataHost.getDbType();\nif (!\"mysql\".equalsIgnoreCase(dbType) && !\"postgresql\".equalsIgnoreCase(dbType)) {\n    throw new IllegalArgumentException(\"Unsupported dbType for Mycat 1.x: \" + dbType);\n}","typeGuard":null,"tryCatchPattern":"try {\n    dataSource = createDataSource(...);\n} catch (ConfigException e) {\n    if (e.getMessage().startsWith(\"not supported yet\")) {\n        // fall back to mysql proxy type or abort startup with clear message\n    }\n}","preventionTips":["Only use mysql or postgresql as dbType unless your Mycat version documents more","Pin and review the Mycat version's supported DB types before writing schema.xml","Add schema.xml linting/CI validation before deploy"],"tags":["config","datasource","unsupported-db-type"],"backgroundTag":"unsupported-operation","analyzedSha":"65f8d8beb752f935752f2a0eec0ab017facab9ef","analyzedAt":"2026-09-11T00:12:21.696Z","contentChangedAt":"2026-09-11T00:12:21.696Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}