{"record":{"id":"8f1d93303d565fee","repo":"hibernate/hibernate-orm","slug":"could-not-determine-javatype-nor-jdbctype-to-use-f","errorCode":null,"errorMessage":"Could not determine JavaType nor JdbcType to use for BasicValue: owner = <ownerName>; property = <propertyName>; table = <tableName>; column = <columnName>","messagePattern":"Could not determine JavaType nor JdbcType to use for BasicValue: owner = <ownerName>; property = <propertyName>; table = <tableName>; column = <columnName>","errorType":"exception","errorClass":"MappingException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/InferredBasicValueResolver.java","lineNumber":199,"sourceCode":"\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif ( explicitJdbcType != null ) {\n\t\t\t\t// we have an explicit STD, but no JTD - infer JTD\n\t\t\t\t// NOTE: yes, it's an odd case, but easy to implement here, so...\n\t\t\t\tfinal var recommendedJavaType =\n\t\t\t\t\t\trecommendedJavaType( explicitJdbcType, selectable, typeConfiguration );\n\t\t\t\t// TODO: check this type cast\n\t\t\t\tfinal var recommendedJtd = (JavaType<T>) recommendedJavaType;\n\t\t\t\tjdbcMapping = resolveSqlTypeIndicators(\n\t\t\t\t\t\tstdIndicators,\n\t\t\t\t\t\tbasicTypeRegistry.resolve( recommendedJtd, explicitJdbcType ),\n\t\t\t\t\t\trecommendedJtd\n\t\t\t\t);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// we have neither a JTD nor STD\n\t\t\t\tthrow new MappingException(\n\t\t\t\t\t\t\"Could not determine JavaType nor JdbcType to use\" +\n\t\t\t\t\t\t\t\t\" for BasicValue: owner = \" + ownerName +\n\t\t\t\t\t\t\t\t\"; property = \" + propertyName +\n\t\t\t\t\t\t\t\t\"; table = \" + table.getName() +\n\t\t\t\t\t\t\t\t\"; column = \" + selectable.getText()\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tif ( jdbcMapping == null ) {\n\t\t\tthrow new MappingException(\n\t\t\t\t\t\"Could not determine JavaType nor JdbcType to use\" +\n\t\t\t\t\t\t\t\" for \" + ( (BasicValue) stdIndicators ).getResolvedJavaType() +\n\t\t\t\t\t\t\t\"; table = \" + table.getName() +\n\t\t\t\t\t\t\t\"; column = \" + selectable.getText()\n\t\t\t);\n\t\t}\n","sourceCodeStart":181,"sourceCodeEnd":217,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/InferredBasicValueResolver.java#L181-L217","documentation":"Error \"Could not determine JavaType nor JdbcType to use for BasicValue: owner = <ownerName>; property = <propertyName>; table = <tableName>; column = <columnName>\" thrown in hibernate/hibernate-orm.","triggerScenarios":"An entity mapping annotation or bootstrap configuration violates a Hibernate mapping rule.","commonSituations":"Annotation mapping mistakes: inverse-side @Id associations, @Column on @OneToOne, unmapped association targets, mismatched @EnumeratedValue/@Temporal usage, duplicate sequence generators.","solutions":["Annotate the property with an explicit type (@JavaType/@JdbcType, @Type, or a JPA @Convert) so Hibernate knows how to map it.","Check that the Java type is registered in the type registry; custom types must be contributed via a TypeContributor or @TypeDef."],"exampleFix":"Annotate the property with an explicit type (@JavaType/@JdbcType, @Type, or a JPA @Convert) so Hibernate knows how to map it.","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"}