apache/incubator-seata · error · NotSupportYetException
unknown dbType:%s
Error message
unknown dbType:%s
What it means
AbstractLockStoreSql.getInsertLockSQL is the base-class fallback: every dialect-specific subclass (MySqlLockStoreSql, PostgresqlLockStoreSql, OracleLockStoreSql, ...) overrides it with a real INSERT for the lock table. If the configured store.db.type does not resolve to one of those subclasses, the base implementation throws NotSupportYetException('unknown dbType:' + current store.db.type value), flagging unsupported DB storage.
Source
Thrown at core/src/main/java/org/apache/seata/core/store/db/sql/lock/AbstractLockStoreSql.java:134
*/
private static final String CHECK_LOCK_SQL = "select " + ALL_COLUMNS + " from " + LOCK_TABLE_PLACE_HOLD
+ " where " + LOCK_TABLE_PK_WHERE_CONDITION_PLACE_HOLD
+ " order by status desc ";
/**
* The constant QUERY_ALL_LOCK.
*/
private static final String QUERY_ALL_LOCK = "select " + ALL_COLUMNS + " from " + LOCK_TABLE_PLACE_HOLD
+ WHERE_PLACE_HOLD + " order by gmt_create desc ";
@Override
public String getAllLockSql(String lockTable, String whereCondition) {
return QUERY_ALL_LOCK.replace(LOCK_TABLE_PLACE_HOLD, lockTable).replace(WHERE_PLACE_HOLD, whereCondition);
}
@Override
public String getInsertLockSQL(String lockTable) {
throw new NotSupportYetException("unknown dbType:" + CONFIG.getConfig(ConfigurationKeys.STORE_DB_TYPE));
}
@Override
public String getDeleteLockSql(String lockTable) {
return DELETE_LOCK_SQL.replace(LOCK_TABLE_PLACE_HOLD, lockTable);
}
@Override
public String getBatchDeleteLockSql(String lockTable, int rowSize) {
List<String> pkNameList = new ArrayList<>();
pkNameList.add(ServerTableColumnsName.LOCK_TABLE_ROW_KEY);
String whereCondition = buildWhereConditionByPKs(pkNameList, rowSize, MAX_IN_SIZE);
return BATCH_DELETE_LOCK_SQL
.replace(LOCK_TABLE_PLACE_HOLD, lockTable)
.replace(LOCK_TABLE_PK_WHERE_CONDITION_PLACE_HOLD, whereCondition);
}
@OverrideView on GitHub (pinned to e01f97c6db)
Solutions
- Correct store.db.type to a supported value exactly as documented (e.g. 'mysql', 'postgresql', 'oracle', 'db2', 'mariadb' where supported by your version).
- Check the error text: it echoes the current config value — fix whatever that literal shows (typo, whitespace, wrong case).
- If your DB is genuinely unsupported, use store.mode=file (or db with a compatible dialect), or implement a LockStoreSql dialect and register it in the store-sql SPI/factory.
- Re-read the store section of your version's config template to confirm valid db type names.
Example fix
# before
seata:
store:
mode: db
db:
db-type: mydb # typo -> unknown dbType:mydb on first lock insert
# after
seata:
store:
mode: db
db:
db-type: mysql Defensive patterns
Strategy: validation
Validate before calling
String dbType = seataConfig.get("store.db.type");
Set<String> supported = new HashSet<>(Arrays.asList("mysql", "h2", "postgresql", "oracle", "derby", "db2", "mariadb", "mssql")); // adjust per version
if (!supported.contains(dbType == null ? null : dbType.trim().toLowerCase())) {
throw new ConfigurationException("Unsupported store.db.type '" + dbType + "' - use one of " + supported);
} Type guard
// language-appropriate narrowing for config values
static boolean isSupportedDbType(String dbType) {
if (dbType == null) return false;
try {
org.apache.seata.common.util.StringUtils.toLowerCase(dbType);
return DBType.valueof(dbType.trim().toLowerCase()) != null;
} catch (IllegalArgumentException e) {
return false;
}
} Try / catch
try {
lockDao.acquireLock(conn, locks);
} catch (NotSupportYetException e) {
if (e.getMessage() != null && e.getMessage().startsWith("unknown dbType:")) {
throw new ConfigurationException("store.db.type has no lock-store SQL dialect: " + e.getMessage(), e);
}
throw e;
} Prevention
- Copy store.db.type verbatim from the official template for your Seata version.
- Validate db type against DBType enum values at startup before any transaction load hits the lock store.
- If you need an unsupported DB, plan for store.mode=file or a custom LockStoreSql dialect instead of discovering this at first lock insert.
When it happens
Trigger: store.mode=db with store.db.type set to a value that has no dedicated LockStoreSql dialect (anything beyond mysql/h2/postgresql/oracle/derby/db2/mssql etc. depending on version) — e.g. a typo ('mydb', 'mysql8'), an unsupported database (sqlite, clickhouse), or the store SQL factory falling back to the abstract base because the type key didn't match.
Common situations: Typo in store.db.type in file.conf/application.yml; using a database Seata's lock store does not have dialect SQL for; after upgrading, renamed/removed db type values; case sensitivity issues in the config value.
Related errors
- unknown lock mode:{}
- The driver {%s} cannot be found in the path %s. Please ensur
- the {%s} can't be empty
- not found service provider for : {}
- Invalid port number in: {}
AI-assisted analysis of apache/incubator-seata@e01f97c6db (2026-08-14).
Data as JSON: /api/errors/365b0a2396f8c987.
Report an issue: GitHub.