You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by Kamlesh Awari <ka...@infosys.com> on 2013/05/09 12:40:50 UTC

Getting ClassCastException exception in ServiceMix 4.4.2

Hi,

I am getting below error in servicemix 4.4.2

| 4 - org.ops4j.pax.logging.pax-logging-api - 1.6.3 | Uncategorized
exception occured during JMS processing; 
nested exception is javax.jms.JMSException: Error in creating message;
nested exception is java.lang.ClassCastException: 
com.sun.xml.bind.v2.runtime.JAXBContextImpl cannot be cast to
com.sun.xml.bind.v2.runtime.JAXBContextImpl

Thanks in Advance.


Kamlesh



--
View this message in context: http://servicemix.396122.n5.nabble.com/Getting-ClassCastException-exception-in-ServiceMix-4-4-2-tp5716682.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.

Re: Getting ClassCastException exception in ServiceMix 4.4.2

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

This usually means com.sun.xml.bind.v2.runtime.JAXBContextImpl was loaded by different classloaders.
By default, the jaxb-impl bundle get installed in the container, so if your customer bundle also embed jaxb-impl jar, you can run into this error.
Please check if your customer bundle embed jaxb-impl jar, if so, remove it.
-------------
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-5-9, at 下午6:40, Kamlesh Awari wrote:

> Hi,
> 
> I am getting below error in servicemix 4.4.2
> 
> | 4 - org.ops4j.pax.logging.pax-logging-api - 1.6.3 | Uncategorized
> exception occured during JMS processing; 
> nested exception is javax.jms.JMSException: Error in creating message;
> nested exception is java.lang.ClassCastException: 
> com.sun.xml.bind.v2.runtime.JAXBContextImpl cannot be cast to
> com.sun.xml.bind.v2.runtime.JAXBContextImpl
> 
> Thanks in Advance.
> 
> 
> Kamlesh
> 
> 
> 
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/Getting-ClassCastException-exception-in-ServiceMix-4-4-2-tp5716682.html
> Sent from the ServiceMix - Dev mailing list archive at Nabble.com.


Re: Getting ClassCastException exception in ServiceMix 4.4.2

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

Add Import-Pacakge com.sun.xml.bind.marshaller for your customer bundle
-------------
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-5-10, at 下午2:52, Kamlesh Awari wrote:

> Hi,
> 
> If i remove jaxb-impl jar from bundle then i am getting
> java.lang.NoClassDefFoundError:
> com/sun/xml/bind/marshaller/NamespacePrefixMapper error.
> 
> Thanks in Advance
> 
> Kamlesh
> 
> 
> 
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/Getting-ClassCastException-exception-in-ServiceMix-4-4-2-tp5716682p5716689.html
> Sent from the ServiceMix - Dev mailing list archive at Nabble.com.


Re: Getting ClassCastException exception in ServiceMix 4.4.2

Posted by Kamlesh Awari <ka...@infosys.com>.
Hi,

If i remove jaxb-impl jar from bundle then i am getting
java.lang.NoClassDefFoundError:
com/sun/xml/bind/marshaller/NamespacePrefixMapper error.

Thanks in Advance

Kamlesh



--
View this message in context: http://servicemix.396122.n5.nabble.com/Getting-ClassCastException-exception-in-ServiceMix-4-4-2-tp5716682p5716689.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.