camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Wolf <markus.w...@nmmn.com>
Subject Re: Camel 2.0 + OSGi
Date Wed, 18 Nov 2009 09:37:01 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Guillaume,

> If you look at the pom, this package is explicitely *not* imported:
>    http://fisheye6.atlassian.com/browse/camel/trunk/camel-core/pom.xml?r=HEAD
> Not sure what the reason is though ...
> 
I tried with a patched camel-core bundle which imports this package and
our application then runs fine on Java 5... So this is the cause for the
problem.

Markus

> On Tue, Nov 17, 2009 at 17:42, Markus Wolf <markus.wolf@nmmn.com> wrote:
> The longer I think about this it seems like a bug in the camel-core
> bundle to me. The package 'javax.xml.bind.annotation.adapters' is
> missing in the import headers.
> The other JAXB packages (javax.xml.bind, javax.xml.bind.annotation) are
> imported into the bundle.
> 
> Is my assumption correct? Then I would open a ticket for this.
> Markus
> 
> 
>>>> I've traced that this exception (below) is caused by the camel-core
>>>> bundle. Is there a specific order in which the camel bundles should be
>>>> loaded by the runtime?
>>>>
>>>> Caused by: java.lang.ClassNotFoundException:
>>>> javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter
>>>>       at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>>>>       at java.security.AccessController.doPrivileged(Native Method)
>>>>       at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>>>>       at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>>>       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
>>>>       at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>>>       at
>>>> org.apache.felix.framework.ModuleImpl.searchDynamicImports(ModuleImpl.java:1459)
>>>>
>>>> Markus
>>>>
>>>>
>>>>> No other idea?
>>>>> I already tried to import the 'javax.xml.bind.annotation.adapters'
>>>>> package into my bundle it it does not seem to be related to my bundle
in
>>>>> any case.
>>>>> Regrads
>>>>> Markus
>>>>>> thanks for your responses.
>>>>>> I already tried this bundles because the guys at the felix user-list
>>>>>> also told me so but the them I get another exception.
>>>>>> For reference I do post it here also (below). The ContextFactory
is
>>>>>> found then, but the classloader issues are still not resolved...
Any
>>>>>> more ideas?
>>>>>> Thank you :)
>>>>>> The exception:
>>>>>> 2:08:10,777 | ERROR | ExtenderThread-6 | ContextLoaderListener
>>>>>>   | BundleApplicationContextListener   50 | Application context refresh
>>>>>> failed
>>>>>> (OsgiBundleXmlApplicationContext(bundle=de.llynch.esb.llynch-sender,
>>>>>> config=osgibundle:/META-INF/spring/*.xml))
>>>>>> org.springframework.beans.factory.BeanDefinitionStoreException: Failed
>>>>>> to parse JAXB element: javax.xml.bind.JAXBException: Unable to create
>>>>>> context
>>>>>>  - with linked exception:
>>>>>> [java.lang.reflect.InvocationTargetException]; nested exception is
>>>>>> javax.xml.bind.JAXBException: Unable to create context
>>>>>>  - with linked exception:
>>>>>> [java.lang.reflect.InvocationTargetException]
>>>>>>     at
>>>>>> org.apache.camel.spring.handler.CamelNamespaceHandler.parseUsingJaxb(CamelNamespaceHandler.java:147)
>>>>>>     at
>>>>>> org.apache.camel.spring.handler.CamelNamespaceHandler$CamelContextBeanDefinitionParser.doParse(CamelNamespaceHandler.java:199)
>>>>>>     at
>>>>>> org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:84)
>>>>>>     at
>>>>>> org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:56)
>>>>>>     at
>>>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
>>>>>>     at
>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)
>>>>>>     at
>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
>>>>>>     at
>>>>>> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
>>>>>>     at
>>>>>> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
>>>>>>     at
>>>>>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
>>>>>>     at
>>>>>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
>>>>>>     at
>>>>>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
>>>>>>     at
>>>>>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
>>>>>>     at
>>>>>> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
>>>>>>     at
>>>>>> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
>>>>>>     at
>>>>>> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
>>>>>>     at
>>>>>> org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:176)
>>>>>>     at
>>>>>> org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:142)
>>>>>>     at
>>>>>> org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
>>>>>>     at
>>>>>> org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
>>>>>>     at
>>>>>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$800(AbstractDelegatedExecutionApplicationContext.java:69)
>>>>>>     at
>>>>>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:269)
>>>>>>     at
>>>>>> org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
>>>>>>     at
>>>>>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:247)
>>>>>>     at
>>>>>> org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:222)
>>>>>>     at
>>>>>> org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:175)
>>>>>>     at
>>>>>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)
>>>>>>     at
>>>>>> org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:718)
>>>>>>     at java.lang.Thread.run(Thread.java:595)
>>>>>> Caused by: javax.xml.bind.JAXBException: Unable to create context
>>>>>>  - with linked exception:
>>>>>> [java.lang.reflect.InvocationTargetException]
>>>>>>     at javax.xml.bind.ContextFinder.find(ContextFinder.java:61)
>>>>>>     at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:77)
>>>>>>     at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:73)
>>>>>>     at
>>>>>> org.apache.camel.spring.handler.CamelNamespaceHandler.createJaxbContext(CamelNamespaceHandler.java:166)
>>>>>>     at
>>>>>> org.apache.camel.spring.handler.CamelNamespaceHandler.getJaxbContext(CamelNamespaceHandler.java:153)
>>>>>>     at
>>>>>> org.apache.camel.spring.handler.CamelNamespaceHandler.parseUsingJaxb(CamelNamespaceHandler.java:144)
>>>>>>     ... 28 more
>>>>>> Caused by: java.lang.reflect.InvocationTargetException
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>     at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>>>     at
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>>     at java.lang.reflect.Method.invoke(Method.java:585)
>>>>>>     at javax.xml.bind.ContextFinder.find(ContextFinder.java:59)
>>>>>>     ... 33 more
>>>>>> Caused by: java.lang.TypeNotPresentException: Type
>>>>>> javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter not present
>>>>>>     at
>>>>>> sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:98)
>>>>>>     at
>>>>>> sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:107)
>>>>>>     at
>>>>>> sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:31)
>>>>>>     at
>>>>>> sun.reflect.annotation.AnnotationParser.parseSig(AnnotationParser.java:351)
>>>>>>     at
>>>>>> sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:175)
>>>>>>     at
>>>>>> sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69)
>>>>>>     at
>>>>>> sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52)
>>>>>>     at java.lang.reflect.Field.declaredAnnotations(Field.java:1002)
>>>>>>     at java.lang.reflect.Field.getDeclaredAnnotations(Field.java:995)
>>>>>>     at
>>>>>> java.lang.reflect.AccessibleObject.getAnnotations(AccessibleObject.java:179)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.annotation.RuntimeInlineAnnotationReader.getAllFieldAnnotations(RuntimeInlineAnnotationReader.java:69)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.annotation.RuntimeInlineAnnotationReader.getAllFieldAnnotations(RuntimeInlineAnnotationReader.java:53)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.ClassInfoImpl.findFieldProperties(ClassInfoImpl.java:371)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.ClassInfoImpl.getProperties(ClassInfoImpl.java:301)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.getProperties(RuntimeClassInfoImpl.java:176)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:243)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:100)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:81)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:209)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:95)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:81)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.ReferencePropertyInfoImpl.addAllSubtypes(ReferencePropertyInfoImpl.java:345)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.ReferencePropertyInfoImpl.calcTypes(ReferencePropertyInfoImpl.java:168)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.ReferencePropertyInfoImpl.getElements(ReferencePropertyInfoImpl.java:118)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.RuntimeReferencePropertyInfoImpl.getElements(RuntimeReferencePropertyInfoImpl.java:67)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.ReferencePropertyInfoImpl.ref(ReferencePropertyInfoImpl.java:109)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.RuntimeReferencePropertyInfoImpl.ref(RuntimeReferencePropertyInfoImpl.java:71)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.RuntimeReferencePropertyInfoImpl.ref(RuntimeReferencePropertyInfoImpl.java:51)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:255)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:100)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:81)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:209)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:95)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:81)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:315)
>>>>>>     at com.sun.xml.bind.v2.model.impl.TypeRefImpl.calcRef(TypeRefImpl.java:92)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.TypeRefImpl.getTarget(TypeRefImpl.java:69)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:58)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:51)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:74)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:77)
>>>>>>     at java.util.AbstractList$Itr.next(AbstractList.java:422)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:255)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:100)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:81)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:209)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:95)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:81)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:315)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:330)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:466)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:302)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1136)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:154)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:121)
>>>>>>     at
>>>>>> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:202)
>>>>>>     ... 38 more
>>>>>> Caused by: java.lang.ClassNotFoundException:
>>>>>> javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter
>>>>>>     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>>>>>>     at java.security.AccessController.doPrivileged(Native Method)
>>>>>>     at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>>>>>>     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>>>>>     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
>>>>>>     at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>>>>>     at
>>>>>> org.apache.felix.framework.ModuleImpl.searchDynamicImports(ModuleImpl.java:1459)
>>>>>>     at
>>>>>> org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:677)
>>>>>>     at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:60)
>>>>>>     at
>>>>>> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1631)
>>>>>>     at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>>>>>     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>>>>>>     at java.lang.Class.forName0(Native Method)
>>>>>>     at java.lang.Class.forName(Class.java:242)
>>>>>>     at
>>>>>> sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:95)
>>>>>>     ... 93 more
>>>>
>>>>
>>>>>>> Hello,
>>>>>>> have you got org.apache.servicemix.bundles.jaxb-impl
>>>>>>> and org.apache.servicemix.specs.jaxb-api installed?
>>>>>>> smx4 uses some custom-magic way of resolving JAXB factories and
similar
>>>>>>> stuff
>>>>>>> br,
>>>>>>> maciek
>>>>>>> On Tue, 2009-11-17 at 11:34 +0100, Markus Wolf wrote:
>>>>>>> Hi there,
>>>>>>> I have a problem to deploy a bundle using camel-osgi + camel-spring
on
>>>>>>> Apache Karaf. When deploying on Java6 it does work fine but on
Java5 it
>>>>>>> fails, because there is no JAXB implementation found.
>>>>>>> I get the following exception:
>>>>>>> 11:25:13,924 | ERROR | ExtenderThread-9 | ContextLoaderListener
>>>>>>>    | BundleApplicationContextListener   50 | Application context
refresh
>>>>>>> failed
>>>>>>> (OsgiBundleXmlApplicationContext(bundle=de.llynch.esb.llynch-sender,
>>>>>>> config=osgibundle:/META-INF/spring/*.xml))
>>>>>>> org.springframework.beans.factory.BeanDefinitionStoreException:
Failed
>>>>>>> to parse JAXB element: javax.xml.bind.JAXBException: Provider
>>>>>>> com.sun.xml.bind.v2.ContextFactory not found
>>>>>>>  - with linked exception:
>>>>>>> [java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory];
>>>>>>> nested exception is javax.xml.bind.JAXBException: Provider
>>>>>>> com.sun.xml.bind.v2.ContextFactory not found
>>>>>>>  - with linked exception:
>>>>>>> [java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory]
>>>>>>>    at
>>>>>>> org.apache.camel.spring.handler.CamelNamespaceHandler.parseUsingJaxb(CamelNamespaceHandler.java:147)
>>>>>>>    at
>>>>>>> org.apache.camel.spring.handler.CamelNamespaceHandler$CamelContextBeanDefinitionParser.doParse(CamelNamespaceHandler.java:199)
>>>>>>>    at
>>>>>>> org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:84)
>>>>>>>    at
>>>>>>> org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:56)
>>>>>>>    at
>>>>>>> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
>>>>>>>    at
>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)
>>>>>>>    at
>>>>>>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
>>>>>>>    at
>>>>>>> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
>>>>>>>    at
>>>>>>> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
>>>>>>>    at
>>>>>>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
>>>>>>>    at
>>>>>>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
>>>>>>>    at
>>>>>>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
>>>>>>>    at
>>>>>>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
>>>>>>>    at
>>>>>>> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
>>>>>>>    at
>>>>>>> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
>>>>>>>    at
>>>>>>> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
>>>>>>>    at
>>>>>>> org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:176)
>>>>>>>    at
>>>>>>> org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:142)
>>>>>>>    at
>>>>>>> org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
>>>>>>>    at
>>>>>>> org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
>>>>>>>    at
>>>>>>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$800(AbstractDelegatedExecutionApplicationContext.java:69)
>>>>>>>    at
>>>>>>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:269)
>>>>>>>    at
>>>>>>> org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
>>>>>>>    at
>>>>>>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:247)
>>>>>>>    at
>>>>>>> org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:222)
>>>>>>>    at
>>>>>>> org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:175)
>>>>>>>    at
>>>>>>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)
>>>>>>>    at
>>>>>>> org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:718)
>>>>>>>    at java.lang.Thread.run(Thread.java:595)
>>>>>>> Caused by: javax.xml.bind.JAXBException: Provider
>>>>>>> com.sun.xml.bind.v2.ContextFactory not found
>>>>>>>  - with linked exception:
>>>>>>> [java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory]
>>>>>>>    at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:152)
>>>>>>>    at javax.xml.bind.ContextFinder.find(ContextFinder.java:299)
>>>>>>>    at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
>>>>>>>    at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
>>>>>>>    at
>>>>>>> org.apache.camel.spring.handler.CamelNamespaceHandler.createJaxbContext(CamelNamespaceHandler.java:166)
>>>>>>>    at
>>>>>>> org.apache.camel.spring.handler.CamelNamespaceHandler.getJaxbContext(CamelNamespaceHandler.java:153)
>>>>>>>    at
>>>>>>> org.apache.camel.spring.handler.CamelNamespaceHandler.parseUsingJaxb(CamelNamespaceHandler.java:144)
>>>>>>>    ... 28 more
>>>>>>> Caused by: java.lang.ClassNotFoundException:
>>>>>>> com.sun.xml.bind.v2.ContextFactory
>>>>>>>    at
>>>>>>> org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:744)
>>>>>>>    at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61)
>>>>>>>    at
>>>>>>> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1656)
>>>>>>>    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>>>>>>    at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:117)
>>>>>>>    ... 34 more
>>>>>>> I have installed the JAXB implementation bundle form springsource
which
>>>>>>> should work fine. The creation of the JAXB context fails, because
the
>>>>>>> spring-camel bundle is missing the required import-package statements
(I
>>>>>>> know no better way even if there is) so the com.sun.xml.bind.v2
>>>>>>> resources/classes could be resolved.
>>>>>>> I know its not fine to import the implementation but the JAXB
factory
>>>>>>> lookup is not that good for OSGi.
>>>>>>> Any idea how to resolve this in a graceful manner?
>>>>>>> Thanks for any help
>>>>>>> Markus Wolf
>>

- --
NMMN - New Media Markets & Networks GmbH
Langbehnstrasse 6, 22761 Hamburg
Geschäftsführung: Kfm. Michael Schütt
Finanzamt HH-Altona - UStID DE 812 699 852 - HRB 71102 Hamburg
HypoVereinsbank   -   BLZ 200 300 00   -   Konto-Nr. 156 29 82

http://www.nmmn.com
Tel.: +49 40 284 118-0  -  Fax: +49 40 284118-999
Softwareentwicklung LLynch: -720
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAksDwDYACgkQDBHISU1oEKG9SACgxLuF0Yd8YTd58XP7nwer/qXn
t+EAoIdPNZfr8lKZ0XxC1VR3Rznk3gOz
=YKqP
-----END PGP SIGNATURE-----

Mime
View raw message