hibernate/hibernate-orm · error · SemanticException
Oracle array constructor emulation requires a basic plural r
Error message
Oracle array constructor emulation requires a basic plural return type, but resolved return type was: " + returnType
What it means
Error "Oracle array constructor emulation requires a basic plural return type, but resolved return type was: " + returnType" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/dialect/function/array/OracleArrayConstructorFunction.java:34
public class OracleArrayConstructorFunction extends ArrayConstructorFunction {
public OracleArrayConstructorFunction(boolean list) {
super( list, false );
}
@Override
public void render(
SqlAppender sqlAppender,
List<? extends SqlAstNode> sqlAstArguments,
ReturnableType<?> returnType,
SqlAstTranslator<?> walker) {
if ( returnType == null ) {
throw new SemanticException(
"Oracle array constructor emulation requires knowledge about the return type, but resolved return type could not be determined"
);
}
if ( !(returnType instanceof BasicPluralType<?, ?> pluralType) ) {
throw new SemanticException(
"Oracle array constructor emulation requires a basic plural return type, but resolved return type was: " + returnType
);
}
final String arrayTypeName = DdlTypeHelper.getCastTypeName(
pluralType,
walker.getSessionFactory().getTypeConfiguration()
);
sqlAppender.appendSql( arrayTypeName );
final int size = sqlAstArguments.size();
if ( size == 0 ) {
sqlAppender.append( '(' );
}
else {
char separator = '(';
for ( int i = 0; i < size; i++ ) {
SqlAstNode argument = sqlAstArguments.get( i );
sqlAppender.append( separator );
argument.accept( walker );View on GitHub (pinned to fad1729dce)
Solutions
- Ensure the array constructor has a basic plural (array) return type.
When it happens
Trigger: Triggered when the application calls a Hibernate dialect feature that the configured database dialect cannot provide: Oracle array constructor emulation requires a basic plural return type.
Common situations: Common when running against a database whose dialect lacks this capability, when a mapping or HQL/Criteria query requests unsupported functionality, or when the wrong dialect is configured for the database in use. Error: Oracle array constructor emulation requires a basic plural return type.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/8ce1e003fc97d3d5.
Report an issue: GitHub.