camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (CAMEL-11281) camel-spring is not usable in an osgi-context
Date Tue, 16 May 2017 08:29:04 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-11281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Claus Ibsen reassigned CAMEL-11281:
-----------------------------------

    Assignee: Claus Ibsen

> camel-spring is not usable in an osgi-context
> ---------------------------------------------
>
>                 Key: CAMEL-11281
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11281
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-spring
>    Affects Versions: 2.18.0, 2.18.1, 2.18.2, 2.18.3, 2.19.0
>         Environment: osgi
>            Reporter: Guy Veraghtert
>            Assignee: Claus Ibsen
>             Fix For: 2.18.4
>
>
> When using camel-spring in an osgi-context with xml-based spring config, following exception
occurs: 
> org.springframework.beans.factory.BeanDefinitionStoreException: Failed to create the
JAXB binder; nested exception is javax.xml.bind.JAXBException: Provider com.sun.xml.internal.bind.v2.ContextFactory
could not be instantiated: javax.xml.bind.JAXBException: "org.apache.camel.model.config" doesnt
contain ObjectFactory.class or jaxb.index
>  - with linked exception:
> [javax.xml.bind.JAXBException: "org.apache.camel.model.config" doesnt contain ObjectFactory.class
or jaxb.index]
> 	at org.apache.camel.spring.handler.CamelNamespaceHandler$CamelContextBeanDefinitionParser.doParse(CamelNamespaceHandler.java:380)
~[?:?]
> 	at org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:85)
~[43:org.apache.servicemix.bundles.spring-beans:4.2.6.RELEASE_1]
> 	at org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:61)
~[43:org.apache.servicemix.bundles.spring-beans:4.2.6.RELEASE_1]
> 	at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:74)
~[43:org.apache.servicemix.bundles.spring-beans:4.2.6.RELEASE_1]
> 	at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1411)
~[43:org.apache.servicemix.bundles.spring-beans:4.2.6.RELEASE_1]
> 	at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1401)
~[43:org.apache.servicemix.bundles.spring-beans:4.2.6.RELEASE_1]
> 	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:168)
~[43:org.apache.servicemix.bundles.spring-beans:4.2.6.RELEASE_1]
> 	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:138)
~[43:org.apache.servicemix.bundles.spring-beans:4.2.6.RELEASE_1]
> 	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:94)
~[43:org.apache.servicemix.bundles.spring-beans:4.2.6.RELEASE_1]
> 	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:508)
~[43:org.apache.servicemix.bundles.spring-beans:4.2.6.RELEASE_1]
> 	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:392)
~[43:org.apache.servicemix.bundles.spring-beans:4.2.6.RELEASE_1]
> 	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
~[43:org.apache.servicemix.bundles.spring-beans:4.2.6.RELEASE_1]
> 	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304)
~[43:org.apache.servicemix.bundles.spring-beans:4.2.6.RELEASE_1]
> 	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:181)
~[43:org.apache.servicemix.bundles.spring-beans:4.2.6.RELEASE_1]
> 	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:217)
~[43:org.apache.servicemix.bundles.spring-beans:4.2.6.RELEASE_1]
> 	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188)
~[43:org.apache.servicemix.bundles.spring-beans:4.2.6.RELEASE_1]
> 	at org.eclipse.gemini.blueprint.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:170)
~[?:?]
> 	at org.eclipse.gemini.blueprint.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:140)
~[?:?]
> 	at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129)
~[64:org.apache.servicemix.bundles.spring-context:4.2.6.RELEASE_1]
> 	at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:609)
~[64:org.apache.servicemix.bundles.spring-context:4.2.6.RELEASE_1]
> 	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.access$800(AbstractDelegatedExecutionApplicationContext.java:60)
~[58:org.eclipse.gemini.blueprint.core:2.0.0.RELEASE]
> 	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:242)
~[58:org.eclipse.gemini.blueprint.core:2.0.0.RELEASE]
> 	at org.eclipse.gemini.blueprint.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
~[58:org.eclipse.gemini.blueprint.core:2.0.0.RELEASE]
> 	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:220)
~[58:org.eclipse.gemini.blueprint.core:2.0.0.RELEASE]
> 	at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:224)
[49:org.eclipse.gemini.blueprint.extender:2.0.0.RELEASE]
> 	at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:177)
[49:org.eclipse.gemini.blueprint.extender:2.0.0.RELEASE]
> 	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:157)
[58:org.eclipse.gemini.blueprint.core:2.0.0.RELEASE]
> 	at org.eclipse.gemini.blueprint.extender.internal.activator.LifecycleManager$1.run(LifecycleManager.java:207)
[49:org.eclipse.gemini.blueprint.extender:2.0.0.RELEASE]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?]
> 	at java.lang.Thread.run(Thread.java:745) [?:?]
> Caused by: javax.xml.bind.JAXBException: Provider com.sun.xml.internal.bind.v2.ContextFactory
could not be instantiated: javax.xml.bind.JAXBException: "org.apache.camel.model.config" doesnt
contain ObjectFactory.class or jaxb.index
> 	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:146) ~[?:?]
> 	at javax.xml.bind.ContextFinder.find(ContextFinder.java:356) ~[?:?]
> 	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:431) ~[?:?]
> 	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:394) ~[?:?]
> 	at org.apache.camel.impl.DefaultModelJAXBContextFactory.newJAXBContext(DefaultModelJAXBContextFactory.java:31)
~[?:?]
> 	at org.apache.camel.spring.handler.CamelNamespaceHandler.getJaxbContext(CamelNamespaceHandler.java:217)
~[?:?]
> 	at org.apache.camel.spring.handler.CamelNamespaceHandler$CamelContextBeanDefinitionParser.doParse(CamelNamespaceHandler.java:378)
~[?:?]
> 	... 30 more
> Caused by: javax.xml.bind.JAXBException: "org.apache.camel.model.config" doesnt contain
ObjectFactory.class or jaxb.index
> 	at com.sun.xml.internal.bind.v2.ContextFactory.createContext(ContextFactory.java:266)
~[?:?]
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[?:?]
> 	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
> 	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:171) ~[?:?]
> 	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:131) ~[?:?]
> 	at javax.xml.bind.ContextFinder.find(ContextFinder.java:356) ~[?:?]
> 	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:431) ~[?:?]
> 	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:394) ~[?:?]
> 	at org.apache.camel.impl.DefaultModelJAXBContextFactory.newJAXBContext(DefaultModelJAXBContextFactory.java:31)
~[?:?]
> 	at org.apache.camel.spring.handler.CamelNamespaceHandler.getJaxbContext(CamelNamespaceHandler.java:217)
~[?:?]
> 	at org.apache.camel.spring.handler.CamelNamespaceHandler$CamelContextBeanDefinitionParser.doParse(CamelNamespaceHandler.java:378)
~[?:?]
> 	... 30 moresun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[?:?]
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[?:?]
> 	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
> 	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:171) ~[?:?]
> 	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:131) ~[?:?]
> 	at javax.xml.bind.ContextFinder.find(ContextFinder.java:356) ~[?:?]
> 	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:431) ~[?:?]
> 	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:394) ~[?:?]
> 	at org.apache.camel.impl.DefaultModelJAXBContextFactory.newJAXBContext(DefaultModelJAXBContextFactory.java:31)
~[?:?]
> 	at org.apache.camel.spring.handler.CamelNamespaceHandler.getJaxbContext(CamelNamespaceHandler.java:217)
~[?:?]
> 	at org.apache.camel.spring.handler.CamelNamespaceHandler$CamelContextBeanDefinitionParser.doParse(CamelNamespaceHandler.java:378)
~[?:?]
> 	... 30 more
> The reason is the fact that not all packages defined in:
> org.apache.camel.model.Constants.JAXB_CONTEXT_PACKAGES
> are listed as Import-Package in the MANIFEST.MF



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message