{"record":{"id":"1cb1c61ddbcda388","repo":"hibernate/hibernate-orm","slug":"could-not-resolve-jdbc-type-name-name-jd","errorCode":null,"errorMessage":"Could not resolve <jdbc-type-name>\" + name + \"</jdbc-type-name>","messagePattern":"Could not resolve <jdbc-type-name>\" \\+ name \\+ \"</jdbc-type-name>","errorType":"exception","errorClass":"ModelsException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/boot/models/xml/internal/XmlAnnotationHelper.java","lineNumber":1191,"sourceCode":"\t\telse if ( jaxbBasicMapping.getJdbcTypeCode() != null ) {\n\t\t\tapplyJdbcTypeCode( jaxbBasicMapping.getJdbcTypeCode(), memberDetails, xmlDocumentContext );\n\t\t}\n\t\telse if ( isNotEmpty( jaxbBasicMapping.getJdbcTypeName() ) ) {\n\t\t\tapplyJdbcTypeCode(\n\t\t\t\t\tresolveJdbcTypeName( jaxbBasicMapping.getJdbcTypeName() ),\n\t\t\t\t\tmemberDetails,\n\t\t\t\t\txmlDocumentContext\n\t\t\t);\n\t\t}\n\t}\n\n\tprivate static int resolveJdbcTypeName(String name) {\n\t\ttry {\n\t\t\tfinal Field matchingField = SqlTypes.class.getDeclaredField( name );\n\t\t\treturn matchingField.getInt( null );\n\t\t}\n\t\tcatch (NoSuchFieldException | IllegalAccessException e) {\n\t\t\tthrow new ModelsException( \"Could not resolve <jdbc-type-name>\" + name + \"</jdbc-type-name>\", e );\n\t\t}\n\t}\n\n\tpublic static void applyJavaTypeDescriptor(\n\t\t\tString descriptorClassName,\n\t\t\tMutableMemberDetails memberDetails,\n\t\t\tXmlDocumentContext xmlDocumentContext) {\n\t\tfinal JavaTypeAnnotation typeAnn = (JavaTypeAnnotation) memberDetails.applyAnnotationUsage(\n\t\t\t\tHibernateAnnotations.JAVA_TYPE,\n\t\t\t\txmlDocumentContext.getModelBuildingContext()\n\t\t);\n\n\t\tfinal ClassDetails descriptorClass = xmlDocumentContext\n\t\t\t\t.getModelBuildingContext()\n\t\t\t\t.getClassDetailsRegistry()\n\t\t\t\t.resolveClassDetails( descriptorClassName );\n\t\ttypeAnn.value( descriptorClass.toJavaClass() );\n\t}","sourceCodeStart":1173,"sourceCodeEnd":1209,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/boot/models/xml/internal/XmlAnnotationHelper.java#L1173-L1209","documentation":"Error \"Could not resolve <jdbc-type-name>\" + name + \"</jdbc-type-name>\" thrown in hibernate/hibernate-orm.","triggerScenarios":"An hbm.xml / orm.xml mapping document violates a mapping rule during bootstrap.","commonSituations":"Legacy XML mappings with invalid combinations (column+formula, mixed inheritance, missing identifiers, bad extends references).","solutions":["Use a registered JDBC type name (see JdbcType registration / standard SQL type codes) in the <jdbc-type-name> element."],"exampleFix":"Use a registered JDBC type name (see JdbcType registration / standard SQL type codes) in the <jdbc-type-name> element.","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"}