{"record":{"id":"c35f5b47a524f4a1","repo":"hibernate/hibernate-orm","slug":"error-transforming-any","errorCode":null,"errorMessage":"Error transforming <any/> : {}","messagePattern":"Error transforming <any/> : (.+?)","errorType":"exception","errorClass":"TransformationException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/boot/jaxb/hbm/transform/HbmXmlTransformer.java","lineNumber":2200,"sourceCode":"\t\t\t\tcatch (Exception e) {\n\t\t\t\t\tthrow new TransformationException( \"Error transforming <one-to-one/> : \" + hbmOneToOne.getName(), e, origin() );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( hbmAttributeMapping instanceof JaxbHbmManyToOneType hbmManyToOne ) {\n\t\t\t\ttry {\n\t\t\t\t\ttransferManyToOne( managedTypeInfo, attributes, hbmManyToOne );\n\t\t\t\t}\n\t\t\t\tcatch (Exception e) {\n\t\t\t\t\tthrow new TransformationException( \"Error transforming <many-to-one/> : \" + hbmManyToOne.getName(), e, origin() );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( hbmAttributeMapping instanceof JaxbHbmAnyAssociationType any ) {\n\t\t\t\ttry {\n\t\t\t\t\tfinal var propertyInfo = managedTypeInfo.propertyInfoMap().get( any.getName() );\n\t\t\t\t\tattributes.getAnyMappingAttributes().add( transformAnyAttribute( any, propertyInfo ) );\n\t\t\t\t}\n\t\t\t\tcatch (Exception e) {\n\t\t\t\t\tthrow new TransformationException( \"Error transforming <any/> : \" + any.getName(), e, origin() );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( hbmAttributeMapping instanceof PluralAttributeInfo hbmCollection ) {\n\t\t\t\tfinal var propertyInfo = managedTypeInfo.propertyInfoMap().get( hbmCollection.getName() );\n\t\t\t\tif ( hbmCollection.getElement() != null || hbmCollection.getCompositeElement() != null ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tattributes.getElementCollectionAttributes().add( transformElementCollection( roleBase, hbmCollection, propertyInfo ) );\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception e) {\n\t\t\t\t\t\tthrow new TransformationException( \"Error transforming element-collection : \" + hbmCollection.getName(), e, origin() );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ( hbmCollection.getOneToMany() != null ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tattributes.getOneToManyAttributes().add( transformOneToMany( hbmCollection, propertyInfo ) );\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception e) {\n\t\t\t\t\t\tthrow new TransformationException( \"Error transforming one-to-many : \" + hbmCollection.getName(), e, origin() );","sourceCodeStart":2182,"sourceCodeEnd":2218,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/boot/jaxb/hbm/transform/HbmXmlTransformer.java#L2182-L2218","documentation":"Error \"Error transforming <any/> : {}\" thrown in hibernate/hibernate-orm.","triggerScenarios":"The hbm.xml to mapping.xml transformer hits an unexpected structure.","commonSituations":"Converting legacy hbm.xml documents containing constructs the transformer does not handle.","solutions":["Check the <any/> element's meta-type and id-type attributes and its <meta-value> mappings.","Ensure all discriminator values map to existing entity classes.","Inspect the causal exception for the exact transformation failure."],"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"}