Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Abandoned
-
2.22.0
-
None
-
None
-
Unknown
Description
- camel-spring-boot-starter 2.22.0
- camel-spring-boot 2.22.0
- jaxb-core 2.3.0.1
- jaxb-impl 2.3.0.1
- camel-spring-boot 2.22.0
In some code we have we use JAXB to unmarschall some XML to a POJO class we have containing a RedeliveryPolicyDefinition as a property.
This seems to fail without errors and the property remains null.
When we replace jaxb-core and jaxb-impl version 2.3.0.1 to 2.2.11 the code seems to work again.
Unmarshalling code:
JAXBContext ctx = JAXBContext.newInstance(ErrorHandler.class); JAXBElement<ErrorHandler> errorHandler = ctx.createUnmarshaller().unmarshal(beanList.item(i), ErrorHandler.class);
Pojo:
@Getter @Setter @XmlRootElement(name = "errorHandler", namespace = "http://camel.apache.org/schema/spring") @XmlAccessorType(XmlAccessType.FIELD) public class ErrorHandler { @XmlAttribute private String id; @XmlElement private RedeliveryPolicyDefinition redeliveryPolicy; @XmlAttribute private org.apache.camel.spring.ErrorHandlerType type;
XML:
<errorHandlers> <errorHandler xmlns="http://camel.apache.org/schema/spring" id="eh-http" type="DefaultErrorHandler"> <redeliveryPolicy maximumRedeliveries="4" redeliveryDelay="250" backOffMultiplier="2" useExponentialBackOff="true"/> </errorHandler> </errorHandlers>