Ticket #99 (closed defect: fixed)
FGDC metadata extension with online linkage causes ClassCastException
| Reported by: | mattblanchette | Owned by: | geonetwork-devel@… |
|---|---|---|---|
| Priority: | critical | Milestone: | v2.4.0 RC2 |
| Component: | General | Version: | v2.2.0 Final |
| Keywords: | FGDC, metextns, onlink, ClassCastException | Cc: |
Description
Attempting to add a FGDC metextns (Metadata Extension) element with an onlink (Online Linkage) in the metadata edit forms causes the following Error message:
Error
The requested operation could not be performed.
ClassCastException? : java.util.ArrayList? cannot be cast to java.lang.String
Once these elements (<metextns><onlink/></metextns>) are added to an FGDC metadata entry, it can no longer be opened for editing since it will always throw this Error.
Error log shows that this Exception originated from the addValues method of org.fao.geonet.kernel.EditLib? class, which appears to be line 999 since it performs a String cast:
text.setAttribute(Edit.Attribute.Attr.VALUE, (String) values.get(i));
