| Summary: | NullPointerException using XMLAnyCollectionMapping with XDK Parser | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Rick Barkhouse <rick.barkhouse> |
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Rick Barkhouse
After debugging this issue, the problem stems from the following method in DomHandlerConverter. Before the transform, the element is correct, but afterwards the element is removed and only the text content remains, problem seems to lie in the XDK Transformer.
public Object convertDataValueToObjectValue(Object dataValue, Session session, XMLUnmarshaller unmarshaller) {
if(dataValue instanceof org.w3c.dom.Element) {
ErrorHandler handler = unmarshaller.getErrorHandler();
Result result = null;
if(handler != null && handler instanceof JAXBErrorHandler) {
result = domHandler.createUnmarshaller(((JAXBErrorHandler)handler).getValidationEventHandler());
} else {
result = domHandler.createUnmarshaller(null);
}
xmlTransformer.transform((org.w3c.dom.Element)dataValue, result);
Object value = domHandler.getElement(result);
return value;
}
return dataValue;
}
A temporary fix for this issue has been checked in as part of bug 329674. When this bug is fixed, the changes to XmlAnyElementLaxTestCases/XmlAnyElementTestCases that are present on that bug should be rolled back. Fixed as a result of the fix for bug 339734. The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |