{"record":{"id":"69b3f46f387e0ae0","repo":"hs-web/hsweb-framework","slug":"unsupported-dialect","errorCode":null,"errorMessage":"unsupported dialect : ","messagePattern":"unsupported dialect : ","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"hsweb-commons/hsweb-commons-crud/src/main/java/org/hswebframework/web/crud/configuration/DialectProviders.java","lineNumber":32,"sourceCode":"\n        for (DialectProvider dialectProvider : ServiceLoader.load(DialectProvider.class)) {\n            allSupportedDialect.put(dialectProvider.name(), dialectProvider);\n        }\n    }\n\n    public static List<DialectProvider> all(){\n        return new ArrayList<>(allSupportedDialect.values());\n    }\n\n    @SneakyThrows\n    public static DialectProvider lookup(String dialect) {\n        DialectProvider provider = allSupportedDialect.get(dialect);\n        if (provider == null) {\n            if (dialect.contains(\".\")) {\n                provider = (DialectProvider) Class.forName(dialect).getConstructor().newInstance();\n                allSupportedDialect.put(dialect, provider);\n            } else {\n                throw new UnsupportedOperationException(\"unsupported dialect : \" + dialect + \",all alive dialect :\" + allSupportedDialect.keySet());\n            }\n        }\n        return provider;\n    }\n}\n","sourceCodeStart":14,"sourceCodeEnd":38,"githubUrl":"https://github.com/hs-web/hsweb-framework/blob/b2cfc85a57c70bf5b5cf6e7edae2d37102652ec8/hsweb-commons/hsweb-commons-crud/src/main/java/org/hswebframework/web/crud/configuration/DialectProviders.java#L14-L38","documentation":"DialectProviders.lookup(dialect) resolves a database dialect provider by name (or fully-qualified class name). If the name is not in the registry and does not contain a dot (so it cannot be reflectively loaded as a DialectProvider class), it throws UnsupportedOperationException listing the currently supported dialects.","triggerScenarios":"Calling DialectProviders.lookup(...) with a short dialect name that is not registered, or configuring hsweb crud with an unsupported/misspelled dialect string that lacks a package prefix.","commonSituations":"Typo in the dialect property (e.g. 'postgresql9' vs 'postgresql'); using a database hsweb ships no provider for; hsweb version change where dialect keys differ; passing a short name instead of the FQCN of a custom DialectProvider.","solutions":["Use a supported dialect name from the message's 'all alive dialect' list.","If using a custom dialect, pass its fully-qualified class name (must contain '.') so it is loaded reflectively and cached.","Correct the spelling/case of the dialect in your configuration.","Implement a custom DialectProvider class for your database, then reference it by FQCN."],"exampleFix":"// before\nString dialect = \"postgresql9\"; // not registered, no '.'\nDialectProvider p = DialectProviders.lookup(dialect); // throws\n// after\nString dialect = \"postgresql\"; // supported name\n// or: \"com.example.CustomDialectProvider\"\nDialectProvider p = DialectProviders.lookup(dialect);","handlingStrategy":"try-catch","validationCode":"// only call lookup for known dialect names or FQCNs\nif (!dialect.contains(\".\") && !KNOWN_DIALECTS.contains(dialect)) {\n    throw new IllegalArgumentException(\"unsupported dialect: \" + dialect);\n}","typeGuard":null,"tryCatchPattern":"try {\n    DialectProvider p = DialectProviders.lookup(dialect);\n} catch (UnsupportedOperationException e) {\n    log.error(\"bad dialect '{}'; supported: {}\", dialect, e.getMessage());\n    throw new ConfigurationException(\"fix hsweb dialect setting\", e);\n}","preventionTips":["Copy the dialect name from the supported list printed in the exception.","For custom dialects always use the fully-qualified class name (contains '.').","Re-check dialect config when upgrading hsweb versions.","Call lookup() early at startup so bad dialect settings fail at boot."],"tags":["java","unsupported-operation","database","dialect","configuration"],"backgroundTag":"unsupported-operation","analyzedSha":"b2cfc85a57c70bf5b5cf6e7edae2d37102652ec8","analyzedAt":"2026-09-13T09:05:02.172Z","contentChangedAt":"2026-09-13T09:05:02.172Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}