[ https://issues.apache.org/jira/browse/CAMEL-12678?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Zoran Regvart reassigned CAMEL-12678: ------------------------------------- Assignee: Zoran Regvart > Unmarshalling with JAXBContext does not work: JAXB 2.3.0.1 in > camel-spring-boot 2.22.0 > -------------------------------------------------------------------------------------- > > Key: CAMEL-12678 > URL: https://issues.apache.org/jira/browse/CAMEL-12678 > Project: Camel > Issue Type: Bug > Components: camel-spring-boot > Affects Versions: 2.22.0 > Reporter: storage > Assignee: Zoran Regvart > Priority: Minor > > * 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 > 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: > {code:java} > JAXBContext ctx = JAXBContext.newInstance(ErrorHandler.class); > JAXBElement<ErrorHandler> errorHandler = > ctx.createUnmarshaller().unmarshal(beanList.item(i), ErrorHandler.class); > {code} > Pojo: > {code:java} > @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; > {code} > XML: > {code: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> > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)