[ https://issues.apache.org/jira/browse/CAMEL-21499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adriano Machado updated CAMEL-21499: ------------------------------------ Summary: Error while loading Spring XML context when using Eclipselink MOXy as the JAXB implementation (was: Error while loading Spring XML context when using MOXy as the JAXB implementation) > Error while loading Spring XML context when using Eclipselink MOXy as the > JAXB implementation > --------------------------------------------------------------------------------------------- > > Key: CAMEL-21499 > URL: https://issues.apache.org/jira/browse/CAMEL-21499 > Project: Camel > Issue Type: Bug > Components: camel-spring-xml > Affects Versions: 4.8.0 > Reporter: Adriano Machado > Priority: Minor > > The following error message is shown on a unit test after upgrading the Camel > version from 4.4.0 to 4.8.0: > {code:java} > at java.base/java.util.ArrayList.forEach(ArrayList.java:1596) > Caused by: jakarta.xml.bind.JAXBException: > Exception Description: An attempt was made to set more than one XmlAnyElement > property on class [org.apache.camel.model.app.BeansDefinition]. Property > [blueprintBeans] cannot be set as XmlAnyElement, because property > [springBeans] is already set as XmlAnyElement. > - with linked exception: > [Exception [EclipseLink-50032] (Eclipse Persistence Services - > 4.0.4.v202407190748-059428cdd2583c46f1f3e50d235854840a6fa9a7): > org.eclipse.persistence.exceptions.JAXBException > Exception Description: An attempt was made to set more than one XmlAnyElement > property on class [org.apache.camel.model.app.BeansDefinition]. Property > [blueprintBeans] cannot be set as XmlAnyElement, because property > [springBeans] is already set as XmlAnyElement.] > at > org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:994) > at > org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:923) > at > org.eclipse.persistence.jaxb.JAXBContext.<init>(JAXBContext.java:208) > at > org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:131) > at > org.eclipse.persistence.jaxb.XMLBindingContextFactory.createContext(XMLBindingContextFactory.java:61) > at jakarta.xml.bind.ContextFinder.find(ContextFinder.java:322) > at jakarta.xml.bind.JAXBContext.newInstance(JAXBContext.java:392) > at jakarta.xml.bind.JAXBContext.newInstance(JAXBContext.java:349) > at > org.apache.camel.xml.jaxb.DefaultModelJAXBContextFactory.newJAXBContext(DefaultModelJAXBContextFactory.java:44) > at > org.apache.camel.spring.xml.handler.CamelNamespaceHandler.getJaxbContext(CamelNamespaceHandler.java:206) > at > org.apache.camel.spring.xml.handler.CamelNamespaceHandler$CamelContextBeanDefinitionParser.doParse(CamelNamespaceHandler.java:428) > ... 72 more > Caused by: Exception [EclipseLink-50032] (Eclipse Persistence Services - > 4.0.4.v202407190748-059428cdd2583c46f1f3e50d235854840a6fa9a7): > org.eclipse.persistence.exceptions.JAXBException > Exception Description: An attempt was made to set more than one XmlAnyElement > property on class [org.apache.camel.model.app.BeansDefinition]. Property > [blueprintBeans] cannot be set as XmlAnyElement, because property > [springBeans] is already set as XmlAnyElement. > at > org.eclipse.persistence.exceptions.JAXBException.xmlAnyElementAlreadySet(JAXBException.java:489) > at > org.eclipse.persistence.jaxb.compiler.AnnotationsProcessor.finalizeProperties(AnnotationsProcessor.java:1036) > at > org.eclipse.persistence.jaxb.compiler.AnnotationsProcessor.processClassesAndProperties(AnnotationsProcessor.java:309) > at > org.eclipse.persistence.jaxb.compiler.Generator.<init>(Generator.java:112) > at > org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:991) > ... 82 more {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)