apereo/cas · warning
Dialect name must be a fully qualified class name…
Error message
Dialect name must be a fully qualified class name. Supported dialects by default are [{}] or you may specify the dialect class directly What it means
GenerateDdlCommand (CAS shell) maps short dialect names (e.g. H2, MYSQL) to Hibernate dialect class names via DIALECTS_MAP; any value not in the map is treated as a class name. If the resolved dialect name contains no dot, it cannot be a fully qualified class name, so the command warns and returns null without generating DDL.
Solutions
- Use one of the supported short dialect keys printed in the warning (DIALECTS_MAP keySet).
- Pass the fully qualified Hibernate dialect class instead, e.g. org.hibernate.dialect.PostgreSQLDialect.
- Check the exact spelling/casing of the dialect key; the lookup is exact after trim().
Example fix
// before generate-ddl --dialect POSTGRES // after generate-ddl --dialect org.hibernate.dialect.PostgreSQLDialect
Defensive patterns
Strategy: validation
Validate before calling
String dialectName = DIALECTS_MAP.getOrDefault(dialect.trim(), dialect);
if (!dialectName.contains(".")) {
throw new IllegalArgumentException("Use a supported key or FQCN: " + DIALECTS_MAP.keySet());
}
Class.forName(dialectName); // verify the dialect class exists before running Prevention
- Consult the printed DIALECTS_MAP.keySet() before choosing a short name.
- Use fully qualified Hibernate dialect class names when unsure.
- Match the dialect class to your Hibernate version.
When it happens
Trigger: Running generate-ddl with --dialect set to an unrecognized short name (not in DIALECTS_MAP) that is also not a fully qualified Hibernate dialect class, e.g. a typo like 'POSTGRES' or 'MSSQL' when only certain keys exist.
Common situations: Guessing the dialect keyword instead of checking the supported set; using a Hibernate 6 dialect class name against a different Hibernate version; passing a database product name like 'postgresql'.
Understand the failure class
Background: "Unknown argument", "Invalid value", and "must be one of": invalid CLI argument errors explained — this error's family across 35 libraries.
Related errors
- Encrypted Value: [ ] Decryption Failed
- Encrypted method [ ] is not supported for algorithm [ ]…
- Configuration file must be specified
- Configuration file [ ] is not readable/writable or is not a…
- Configuration file format
AI-assisted analysis of apereo/cas@e7288fc434 (2026-09-08).
Data as JSON: /api/errors/5b080ba8b3e8d32e.
Report an issue: GitHub.
Appendix: source
Thrown at support/cas-server-support-shell-core/src/main/java/org/apereo/cas/shell/commands/db/GenerateDdlCommand.java:134
longName = "createSchema",
description = "Generate DROP SQL statements in the DDL",
defaultValue = "false"
)
final Boolean createSchema,
@Option(
longName = "haltOnError",
description = "Halt if an error occurs during the generation process",
defaultValue = "false"
)
final Boolean haltOnError
) {
LOGGER.info("Requested database dialect type [{}]", dialect);
val dialectName = DIALECTS_MAP.getOrDefault(dialect.trim(), dialect);
LOGGER.info("Using database dialect class [{}]", dialectName);
if (!dialectName.contains(".")) {
LOGGER.warn("Dialect name must be a fully qualified class name. Supported dialects by default are [{}] "
+ "or you may specify the dialect class directly", DIALECTS_MAP.keySet());
return null;
}
val svcRegistry = new StandardServiceRegistryBuilder();
val settings = new HashMap<String, Object>();
settings.put(JdbcSettings.DIALECT, dialectName);
settings.put(JdbcSettings.JAKARTA_JDBC_URL, jdbcUrl);
settings.put(SchemaToolingSettings.HBM2DDL_AUTO, "none");
settings.put(JdbcSettings.SHOW_SQL, "true");
svcRegistry.applySettings(settings);
LOGGER.info("Collecting entity metadata sources...");
val metadata = new MetadataSources(svcRegistry.build());
ReflectionUtils.findClassesWithAnnotationsInPackage(
Set.of(MappedSuperclass.class, Entity.class),
"org.apereo.cas")View on GitHub (pinned to e7288fc434)