{"record":{"id":"7acf2b2bff34e47a","repo":"hibernate/hibernate-orm","slug":"oracle-array-constructor-emulation-requires-knowle","errorCode":null,"errorMessage":"Oracle array constructor emulation requires knowledge about the return type, but resolved return type could not be determined","messagePattern":"Oracle array constructor emulation requires knowledge about the return type, but resolved return type could not be determined","errorType":"exception","errorClass":"SemanticException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/dialect/function/array/OracleArrayConstructorFunction.java","lineNumber":29,"sourceCode":"import org.hibernate.sql.ast.SqlAstTranslator;\nimport org.hibernate.sql.ast.spi.SqlAppender;\nimport org.hibernate.sql.ast.tree.SqlAstNode;\nimport org.hibernate.type.BasicPluralType;\n\npublic class OracleArrayConstructorFunction extends ArrayConstructorFunction {\n\n\tpublic OracleArrayConstructorFunction(boolean list) {\n\t\tsuper( list, false );\n\t}\n\n\t@Override\n\tpublic void render(\n\t\t\tSqlAppender sqlAppender,\n\t\t\tList<? extends SqlAstNode> sqlAstArguments,\n\t\t\tReturnableType<?> returnType,\n\t\t\tSqlAstTranslator<?> walker) {\n\t\tif ( returnType == null ) {\n\t\t\tthrow new SemanticException(\n\t\t\t\t\t\"Oracle array constructor emulation requires knowledge about the return type, but resolved return type could not be determined\"\n\t\t\t);\n\t\t}\n\t\tif ( !(returnType instanceof BasicPluralType<?, ?> pluralType) ) {\n\t\t\tthrow new SemanticException(\n\t\t\t\t\t\"Oracle array constructor emulation requires a basic plural return type, but resolved return type was: \" + returnType\n\t\t\t);\n\t\t}\n\t\tfinal String arrayTypeName = DdlTypeHelper.getCastTypeName(\n\t\t\t\tpluralType,\n\t\t\t\twalker.getSessionFactory().getTypeConfiguration()\n\t\t);\n\t\tsqlAppender.appendSql( arrayTypeName );\n\t\tfinal int size = sqlAstArguments.size();\n\t\tif ( size == 0 ) {\n\t\t\tsqlAppender.append( '(' );\n\t\t}\n\t\telse {","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/dialect/function/array/OracleArrayConstructorFunction.java#L11-L47","documentation":"Error \"Oracle array constructor emulation requires knowledge about the return type, but resolved return type could not be determined\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Triggered when the application calls a Hibernate dialect feature that the configured database dialect cannot provide: Oracle array constructor emulation requires knowledge about the return type, but resolved return type could not be determined.","commonSituations":"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 knowledge about the return type, but resolved return type could not be determined.","solutions":["Provide an explicit return type for the array constructor."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fad1729dce015f908198d57a8d80274a30f905a5","analyzedAt":"2026-08-22T04:13:57.527Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}