Opened 16 years ago
Closed 15 years ago
#99 closed defect (fixed)
FGDC metadata extension with online linkage causes ClassCastException
Reported by: | mattblanchette | Owned by: | |
---|---|---|---|
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));
Change History (2)
comment:1 by , 16 years ago
comment:2 by , 15 years ago
Milestone: | → v2.4.0 RC2 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Fixed and tested by Simon Pigot
Current workaround: Add test in addValues method: