{"record":{"id":"af1dcf302a2323b1","repo":"hibernate/hibernate-orm","slug":"unexpected-collection-element-type-pluralattrib","errorCode":null,"errorMessage":"Unexpected collection element type : <pluralAttributeJaxbMapping.getName()>","messagePattern":"Unexpected collection element type : <pluralAttributeJaxbMapping\\.getName\\(\\)>","errorType":"exception","errorClass":"MappingException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/boot/model/source/internal/hbm/AbstractPluralAttributeSourceImpl.java","lineNumber":236,"sourceCode":"\t\t\t);\n\t\t}\n\t\telse if ( pluralAttributeJaxbMapping.getManyToMany() != null ) {\n\t\t\treturn new PluralAttributeElementSourceManyToManyImpl(\n\t\t\t\t\tsourceMappingDocument(),\n\t\t\t\t\tthis,\n\t\t\t\t\tpluralAttributeJaxbMapping.getManyToMany()\n\t\t\t);\n\t\t}\n\t\telse if ( pluralAttributeJaxbMapping.getManyToAny() != null ) {\n\t\t\treturn new PluralAttributeElementSourceManyToAnyImpl(\n\t\t\t\t\tsourceMappingDocument(),\n\t\t\t\t\tthis,\n\t\t\t\t\tpluralAttributeJaxbMapping.getManyToAny(),\n\t\t\t\t\tpluralAttributeJaxbMapping.getCascade()\n\t\t\t);\n\t\t}\n\t\telse {\n\t\t\tthrow new MappingException(\n\t\t\t\t\t\"Unexpected collection element type : \" + pluralAttributeJaxbMapping.getName(),\n\t\t\t\t\tsourceMappingDocument().getOrigin()\n\t\t\t);\n\t\t}\n\t}\n\n\t@Override\n\tpublic AttributePath getAttributePath() {\n\t\treturn attributePath;\n\t}\n\n\t@Override\n\tpublic AttributeRole getAttributeRole() {\n\t\treturn attributeRole;\n\t}\n\n\t@Override\n\tpublic boolean usesJoinTable() {","sourceCodeStart":218,"sourceCodeEnd":254,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/boot/model/source/internal/hbm/AbstractPluralAttributeSourceImpl.java#L218-L254","documentation":"Error \"Unexpected collection element type : <pluralAttributeJaxbMapping.getName()>\" 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 supported collection element mapping (<element/>, <one-to-many/>, <many-to-many/>, <composite-element/>, <many-to-any/>) in the hbm.xml collection."],"exampleFix":"Use a supported collection element mapping (<element/>, <one-to-many/>, <many-to-many/>, <composite-element/>, <many-to-any/>) in the hbm.xml collection.","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"}