MyCATApache/Mycat-Server · critical · io.mycat.config.ConfigException
not supported yet !
Error message
not supported yet !{hostName} What it means
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.
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
Example fix
// before (schema.xml) <dbType>oracle</dbType> // after <dbType>mysql</dbType>
Defensive patterns
Strategy: validation
Validate before calling
String dbType = dataHost.getDbType();
if (!"mysql".equalsIgnoreCase(dbType) && !"postgresql".equalsIgnoreCase(dbType)) {
throw new IllegalArgumentException("Unsupported dbType for Mycat 1.x: " + dbType);
} Try / catch
try {
dataSource = createDataSource(...);
} catch (ConfigException e) {
if (e.getMessage().startsWith("not supported yet")) {
// fall back to mysql proxy type or abort startup with clear message
}
} Prevention
- 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
When it happens
Trigger: Defining a <dataHost> in schema.xml whose <dbType> is something other than mysql or postgresql, causing createDataSource to fall through to the else branch.
Common situations: 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.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- can not find the data node with name
- Can't find a valid data node for specified node index
- can't find class resource file
- can't find myid properties file
- can't find table define in schema
AI-assisted analysis of MyCATApache/Mycat-Server@65f8d8beb7 (2026-09-11).
Data as JSON: /api/errors/97d77555ce9b91e7.
Report an issue: GitHub.
Appendix: source
Thrown at src/main/java/io/mycat/config/ConfigInitializer.java:295
nodes[i].setIdleTimeout(system.getIdleTimeout());
MySQLDataSource ds = new MySQLDataSource(nodes[i], conf, isRead);
dataSources[i] = ds;
}
} else if (dbDriver.equals("jdbc")) {
for (int i = 0; i < nodes.length; i++) {
nodes[i].setIdleTimeout(system.getIdleTimeout());
JDBCDatasource ds = new JDBCDatasource(nodes[i], conf, isRead);
dataSources[i] = ds;
}
} else if ("postgresql".equalsIgnoreCase(dbType) && dbDriver.equalsIgnoreCase("native")){
for (int i = 0; i < nodes.length; i++) {
nodes[i].setIdleTimeout(system.getIdleTimeout());
PostgreSQLDataSource ds = new PostgreSQLDataSource(nodes[i], conf, isRead);
dataSources[i] = ds;
}
} else{
throw new ConfigException("not supported yet !" + hostName);
}
return dataSources;
}
private PhysicalDBPool getPhysicalDBPool(DataHostConfig conf,
ConfigLoader configLoader) {
String name = conf.getName();
//数据库类型,我们这里只讨论MySQL
String dbType = conf.getDbType();
//连接数据库驱动,我们这里只讨论MyCat自己实现的native
String dbDriver = conf.getDbDriver();
//针对所有写节点创建PhysicalDatasource
PhysicalDatasource[] writeSources = createDataSource(conf, name,
dbType, dbDriver, conf.getWriteHosts(), false);
Map<Integer, DBHostConfig[]> readHostsMap = conf.getReadHosts();
Map<Integer, PhysicalDatasource[]> readSourcesMap = new HashMap<Integer, PhysicalDatasource[]>(
readHostsMap.size());
//对于每个读节点建立key为writeHost下标value为readHost的PhysicalDatasource[]的哈希表View on GitHub (pinned to 65f8d8beb7)