Hi, This ClassCastException generally caused by two javax/xml/bind/JAXBContext was loaded by different classloaders, which SMX version you are using? ------------- Freeman(Yue) Fang
Red Hat, Inc. FuseSource is now part of Red Hat Web: http://fusesource.com | http://www.redhat.com/ Twitter: freemanfang Blog: http://freemanfang.blogspot.com http://blog.sina.com.cn/u/1473905042 weibo: @Freeman小屋 On 2013-9-20, at 下午6:58, madusanka wrote: > Hi All, > > I created a camel project using the "camel-archetype-spring" archetype and > built it using mvn install. > But when I deployed the jar into ServiceMix, I get the following error. > > > 2013-09-20 16:22:24,544 | ERROR | ExtenderThread-3 | ContextLoaderListener > > | ? ? | 78 - > org.springframework.osgi.extender - 1.2.1 | Application context refresh > failed (OsgiBundleXmlApplicationContext(bundle=camel-test, > config=osgibundle:/META-INF/spring/*.xml)) > 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: ClassCastException: attempting > to cast > jar:file:/usr/local/jdk1.6.0_26/jre/lib/rt.jar!/javax/xml/bind/JAXBContext.class > to bundle://82.0:1/javax/xml/bind/JAXBContext.class. Please make sure that > you are specifying the proper ClassLoader. > - with linked exception: > [javax.xml.bind.JAXBException: ClassCastException: attempting to cast > jar:file:/usr/local/jdk1.6.0_26/jre/lib/rt.jar!/javax/xml/bind/JAXBContext.class > to bundle://82.0:1/javax/xml/bind/JAXBContext.class. Please make sure that > you are specifying the proper ClassLoader. ] > > > > Please help me to solve this > > Thank you !!! > > > > -- > View this message in context: > http://servicemix.396122.n5.nabble.com/Application-context-refresh-failed-Error-tp5717830.html > Sent from the ServiceMix - User mailing list archive at Nabble.com.
