-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Guillaume,


> Have you tried with the following bundles instead:
>   
> http://repo2.maven.org/maven2/org/apache/servicemix/specs/org.apache.servicemix.specs.jaxb-api-2.1/1.3.0/org.apache.servicemix.specs.jaxb-api-2.1-1.3.0.jar
>   
> http://repo2.maven.org/maven2/org/apache/servicemix/bundles/org.apache.servicemix.bundles.jaxb-impl/2.1.12_1/org.apache.servicemix.bundles.jaxb-impl-2.1.12_1.jar
> 
> I think the problem is related to the discovery mechanism of JAXB api.
>  If you want to stick with the spring source bundles, you might want
> to tweak your own bundle to add a require bundle header on the
> jaxb-impl bundle.  That may help ...
> 
I already tried to add the requirement to the headers of our bundles.
But it does not help. I will try to use the servicemix bundles instead
of the spring-source ones. It seems hard to decide which bundles to use
tho...
Dependency management with OSGi is complicated I think. But thanks for
your help. :-)

Regards
Markus



> On Mon, Nov 16, 2009 at 14:32, Markus Wolf <[email protected]> wrote:
> Hi there,
> 
> we have a problem using JAXB2 in Karaf with Java5. We tried to install
> the following bundles from the Spring bundle repository:
> * mvn:javax.xml.bind/com.springsource.javax.xml.bind/2.1.7
> * mvn:com.sun.xml/com.springsource.com.sun.xml.bind/2.1.7
> 
> When deploying our application (not depending on jaxb2 directly) we get
> the following exception:
> 
> 14:10:07,781 | DEBUG | xtenderThread-12 | BlueprintListener
>   | actory$SpringApplicationListener  136 | Spring app state changed to
> Failed for bundle 30
> 14:10:07,782 | ERROR | xtenderThread-12 | 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:726)
>        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 javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:117)
>        ... 34 more
> 
> 
> Any ideas what we did wrong? When we deploy our application on Java6
> (leaving out the javax.xml bundles because they are available on Java6)
> it does work as expected.
> 
> Thanks
> Markus Wolf
>>
- ---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
>>
>>

- --
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

iEYEARECAAYFAksBX6gACgkQDBHISU1oEKFh6gCg0X6m0loaHARpt1t9FF0fYp/2
2qUAn2jt36yZd/Z4jEcBJ3oOMjQslFtw
=LbAh
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to