apache/incubator-seata · error · NotSupportYetException

"PageUtil not support this dbType:" + dbType

Error message

"PageUtil not support this dbType:" + dbType

What it means

PageUtil.pageSql builds a dialect-specific paging wrapper (LIMIT/OFFSET for mysql, ROWNUM for oracle, ROW_NUMBER for sqlserver) around a source SQL. If the dbType switch matches none of the supported dialects, it throws NotSupportYetException("PageUtil not support this dbType:" + dbType), signalling the store type has no paging template yet.

Source

Thrown at common/src/main/java/org/apache/seata/common/util/PageUtil.java:133

            case "oceanbase":
            case "dm":
            case "oscar":
                return LIMIT_TEMPLATE
                        .replace(SOURCE_SQL_PLACE_HOLD, sourceSql)
                        .replace(LIMIT_PLACE_HOLD, String.valueOf(pageSize))
                        .replace(OFFSET_PLACE_HOLD, String.valueOf((pageNum - 1) * pageSize));
            case "oracle":
                return ORACLE_PAGE_TEMPLATE
                        .replace(SOURCE_SQL_PLACE_HOLD, sourceSql)
                        .replace(START_PLACE_HOLD, String.valueOf(pageSize * (pageNum - 1) + 1))
                        .replace(END_PLACE_HOLD, String.valueOf(pageSize * pageNum));
            case "sqlserver":
                return SQLSERVER_PAGE_TEMPLATE
                        .replace(SOURCE_SQL_PLACE_HOLD, sourceSql)
                        .replace(START_PLACE_HOLD, String.valueOf(pageSize * (pageNum - 1) + 1))
                        .replace(END_PLACE_HOLD, String.valueOf(pageSize * pageNum));
            default:
                throw new NotSupportYetException("PageUtil not support this dbType:" + dbType);
        }
    }

    /**
     * get countsql
     *
     * @param sourceSql the source sql
     * @param dbType the db type
     * @return the count sql
     */
    public static String countSql(String sourceSql, String dbType) {
        switch (dbType) {
            case "mysql":
            case "h2":
            case "oceanbase":
            case "oracle":
            case "dm":
            case "oscar":

View on GitHub (pinned to e01f97c6db)

Solutions

  1. Use one of the supported dbTypes for paging queries: mysql, oracle, sqlserver (check the full case list in PageUtil.pageSql, including postgres variants if present in your version)
  2. Fix typos/casing in the store.db.dbType configuration
  3. If you genuinely need another dialect, contribute or implement a paging template upstream instead of bypassing the check

Example fix

# before (config)
store.db.dbType = H2

# after
store.db.dbType = mysql
Defensive patterns

Strategy: type-guard

Validate before calling

Set<String> PAGING_DB = Set.of("mysql", "oracle", "sqlserver");
if (!PAGING_DB.contains(dbType)) throw new NotSupportYetException("no paging template for " + dbType);
PageUtil.pageSql(sql, dbType);

Type guard

static boolean isPagingSupported(String dbType) { return dbType != null && Set.of("mysql","oracle","sqlserver").contains(dbType.toLowerCase()); }

Try / catch

try { sql = PageUtil.pageSql(src, dbType); } catch (NotSupportYetException e) { throw new ConfigurationException("unsupported store dbType: " + dbType, e); }

Prevention

When it happens

Trigger: Calling PageUtil.pageSql(sourceSql, dbType) with an unsupported/misspelled dbType — e.g. "h2", "db2", "sqlite", or a wrong-case/aliased value that misses the case labels (the switch is on the raw string, so casing matters).

Common situations: Connecting the Seata console/store to a database not in the supported list, or a custom store.db.dbType value with a typo or different case than expected.

Related errors


AI-assisted analysis of apache/incubator-seata@e01f97c6db (2026-08-14). Data as JSON: /api/errors/6b381ac795bd5a30. Report an issue: GitHub.