2 Replies Latest reply on Oct 15, 2010 4:54 AM by rafal.janik

    problem with javax.xml.datatype in Fuse 4.1.0.2

    rafal.janik

      Hi, a have a problem with fuse and  javax.xml.datatype.Duration.

      I want to send from one osgi bundle to other the object which contains Duration object. When the method is started i get the information:

       

       

      java.lang.NoClassDefFoundError: Ljavax/xml/datatype/Duration;

              at java.lang.Class.getDeclaredFields0(Native Method)

              at java.lang.Class.privateGetDeclaredFields(Class.java:2291)

       

       

       

      when I add the javax.xml.datatype package to a config.properties i've got:

       

      Exception in thread "SpringOsgiExtenderThread-90" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'servicemix-wsn2005' defined in URL bundle://168.0:0/META-INF/spring/servicemix-wsn2005.xml: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class : Constructor threw exception; nested exception is java.lang.RuntimeException: Could not create jaxb context              

              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)                                                                               

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)                                                                               

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)                                                                               

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)                                                                               

      at java.security.AccessController.doPrivileged(Native Method)                                                                               

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)                                                                               

      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)                                                                               

      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)                                                                               

      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)                                                                               

      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)                                                                               

      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)                                                                               

      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)                                                                               

      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)                                                                               

      at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:68)                                                                               

      at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:343)

              at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)

              at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:308)

              at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:138)

              at java.lang.Thread.run(Thread.java:619)

      Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class : Constructor threw exception; nested exception is java.lang.RuntimeException: Could not create jaxb context

              at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115)

              at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)

              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)

              ... 18 more

      Caused by: java.lang.RuntimeException: Could not create jaxb context

              at org.apache.servicemix.wsn.component.WSNDeployer.(WSNComponent.java:78)

              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

              at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

              at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)

              ... 20 more

      Caused by: javax.xml.bind.JAXBException: Unable to create context

      - with linked exception:

              at javax.xml.bind.ContextFinder.find(ContextFinder.java:93)

              at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:65)

              at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:56)

              at org.apache.servicemix.wsn.component.WSNEndpoint.createJAXBContext(WSNEndpoint.java:121)

              at org.apache.servicemix.wsn.component.WSNEndpoint.createJAXBContext(WSNEndpoint.java:105)

              at org.apache.servicemix.wsn.component.WSNDeployer.(JAXBContextImpl.java:286)

              at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139)

              at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:117)

              ... 38 more

       

       

      Could someone of you help me to resolve this problem ?

       

      ServiceMix Kernel (1.1.0.1-fuse)

      ServiceMix (4.1.0.2-fuse)

       

      List of installed features:

       

        transaction

        servicemix-drools

        servicemix-quartz

        servicemix-jms     

        camel                  

        jbi-cluster            

        web-core               

        servicemix-eip     

        cxf

        servicemix-cxf-se

        camel-nmr

        servicemix-camel

        connector

        jbi

        servicemix-shared

        servicemix-saxon

        servicemix-ftp

        camel-http

        servicemix-cxf-bc

        camel-core

        servicemix-wsn2005

        activemq

        camel-stream

        servicemix-validation

        servicemix-bean

        camel-jms

        naming

        servicemix-osworkflow

        camel-script

        servicemix-file

        servicemix-scripting

        cxf-jaxrs

        web

        camel-groovy

        cxf-osgi

        servicemix-http

        nmr

        cxf-nmr

        servicemix-mail

        camel-jetty