{"record":{"id":"836827b6ea7d3fe6","repo":"hibernate/hibernate-orm","slug":"given-type-is-not-an-outputabletype-typerefer","errorCode":null,"errorMessage":"Given type is not an OutputableType: \" + typeReference","messagePattern":"Given type is not an OutputableType: \" \\+ typeReference","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/procedure/internal/ProcedureCallImpl.java","lineNumber":665,"sourceCode":"\n\t@Override\n\t@Nonnull\n\tpublic ProcedureCallImplementor<R> markAsFunctionCall(@Nonnull Class<?> resultType) {\n\t\tcheckNotClosed();\n\t\tfinal var basicType = getTypeConfiguration().getBasicTypeForJavaType( resultType );\n\t\tif ( basicType == null ) {\n\t\t\tthrow new IllegalArgumentException( \"Could not resolve a BasicType for the Java type: \" + resultType.getName() );\n\t\t}\n\t\tmarkAsFunctionCall( basicType );\n\t\treturn this;\n\t}\n\n\t@Override\n\t@Nonnull\n\tpublic ProcedureCall markAsFunctionCall(@Nonnull Type<?> typeReference) {\n\t\tcheckNotClosed();\n\t\tif ( !(typeReference instanceof OutputableType<?> outputableType) ) {\n\t\t\tthrow new IllegalArgumentException( \"Given type is not an OutputableType: \" + typeReference );\n\t\t}\n\n\t\tassert !resultSetMappings.isEmpty();\n\t\tfinal var firstResultSetMapping = resultSetMappings.get( 0 );\n\t\tif ( firstResultSetMapping.getNumberOfResultBuilders() == 0 ) {\n\t\t\tfinal var expressible = resolveExpressible( typeReference );\n\t\t\t// Function returns might not be represented as callable parameters,\n\t\t\t// but we still want to convert the result to the requested java type if possible\n\t\t\tfirstResultSetMapping.addResultBuilder( new ScalarDomainResultBuilder<>( expressible.getExpressibleJavaType() ) );\n\t\t}\n\t\tfunctionReturn = new FunctionReturnImpl<>( this, (OutputableType<?>) outputableType );\n\t\treturn this;\n\t}\n\n\tprivate void markAsFunctionCall(BasicType<?> basicType) {\n\t\tassert !resultSetMappings.isEmpty();\n\t\tfinal var firstResultSetMapping = resultSetMappings.get( 0 );\n\t\tif ( firstResultSetMapping.getNumberOfResultBuilders() == 0 ) {","sourceCodeStart":647,"sourceCodeEnd":683,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/procedure/internal/ProcedureCallImpl.java#L647-L683","documentation":"Error \"Given type is not an OutputableType: \" + typeReference\" thrown in hibernate/hibernate-orm.","triggerScenarios":"A runtime precondition of the Hibernate API is violated.","commonSituations":"Occurs when application code or configuration does not satisfy the documented contract of the API being called.","solutions":["Register the parameter with a type that implements OutputableType (e.g. a BasicType).","Use a supported JDBC-mappable type for the OUT parameter."],"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"}