hibernate/hibernate-orm · error · UnsupportedOperationException
No drop schema syntax supported by " + getClass().getName()
Error message
No drop schema syntax supported by " + getClass().getName()
What it means
Besides query CTEs, a WITH clause can hold named CteObjects (auxiliary named objects declared in the WITH clause, used by dialect-specific and structured-type features). They are stored in a map keyed by name, and addCteObject throws IllegalArgumentException when a second object with the same name is registered on one statement. Like the CTE-label duplicate, this guards the query-construction phase against name collisions.
Source
Thrown at hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/AltibaseDialect.java:570
@Override
public boolean canCreateSchema() {
return false;
}
@Override
public NameQualifierSupport getNameQualifierSupport() {
return NameQualifierSupport.SCHEMA;
}
@Override
public String[] getCreateSchemaCommand(String schemaName) {
throw new UnsupportedOperationException( "No create schema syntax supported by " + getClass().getName() );
}
@Override
public String[] getDropSchemaCommand(String schemaName) {
throw new UnsupportedOperationException( "No drop schema syntax supported by " + getClass().getName() );
}
@Override
public boolean qualifyIndexName() {
return false;
}
@Override
public boolean supportsTruncateWithCast(){
return false;
}
@Override
public boolean supportsCommentOn() {
return true;
}
@OverrideView on GitHub (pinned to fad1729dce)
Solutions
- Rename one of the CteObjects so names are unique within the statement.
- Register the object once at a shared/outer statement level instead of once per sub-part.
- Guard with getCteObject(name) before adding and reuse the existing object.
- If no custom code registers CteObjects, report an HHH issue naming the dialect and query shape.
Example fix
// before: adding two same-named objects
statement.addCteObject( new MyCteObject( "obj" ) );
statement.addCteObject( otherTranslator.getObj( "obj" ) ); // IllegalArgumentException
// after: check and reuse
if ( statement.getCteObject( "obj" ) == null ) {
statement.addCteObject( new MyCteObject( "obj" ) );
} Defensive patterns
Strategy: validation
Validate before calling
// If you register WITH-clause objects programmatically: check first
if ( statement.getCteObject( cteObject.getName() ) == null ) {
statement.addCteObject( cteObject );
} else {
// reuse the existing object instead of re-adding
} Try / catch
try {
statement.addCteObject( obj );
} catch ( IllegalArgumentException e ) {
if ( e.getMessage() != null && e.getMessage().startsWith("A CTE object with the name") ) {
statement.addCteObject( rename( obj, uniqueName() ) );
} else {
throw e;
}
} Prevention
- Register each named WITH-clause object exactly once per statement, at the outermost useful container.
- Guard addCteObject with getCteObject(name) in any code that merges statements or subqueries.
- Track CTE-object names alongside CTE labels when auditing generated queries.
When it happens
Trigger: Calling addCteObject twice with objects of the same getName() on one AbstractStatement - typically inside framework code, custom translators, or criteria/CTE extensions that materialize named WITH-clause objects; also two subquery statements being merged onto a shared container that both carry the same-named object.
Common situations: Dialect extensions or Hibernate versions that add typed/structured CTE objects (e.g. for array/struct features) colliding with user- or tool-generated ones; regression after upgrade changing where CTE objects get attached.
Related errors
- No create schema syntax supported by " + getClass().getName(
- A CTE with the label %s already exists
- Could not configure Agroal: " + e.getMessage()
- unsupported temporal unit for CUBRID: " + unit
- Summarization is not supported by DBMS!
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/fd2074dd0860ca85.
Report an issue: GitHub.