cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Freeman Fang <>
Subject Re: Why is RI JAXB context is required in JAXBDataBinding class ?
Date Wed, 15 Aug 2012 10:32:25 GMT

Which OSGi container you are using?

To use CXF in OSGi container, a lot of effort need be done,  jaxb-api and jaxb-impl bundle
is one of them, but not all. Servicemix wrap lots of bundles(spec bundle like jaxb-api need
use OSGiLocator stuff)  and karaf provide a provisioning mechanism(feature) to is convenient
to install CXF, so I suggest you use Apache Servicemix or Karaf as the OSGi container, which
support CXF better.

Actually Servicemix support CXF OOTB now, and Karaf 2.2.x also support to install CXF feature
easily,  you just need replace the with, both in $KARAF_HOME/etc

For Karaf 2.3.x and 3.x(which could be released soon), as it endorse new spec api jar from
Servicemix, so both can support CXF OOTB.


Freeman Fang

Twitter: freemanfang

On 2012-8-15, at 下午4:57, Ivan wrote:

> I am trying to use CXF 2.6.1 in OSGi environment, as jdk 6 does not ship
> the latest JAXB API and implementation, so deployed a JAXB 2.2 API and a
> repackaged RI JAXB impl as bundles. While running my application, it shows
> ClassCastException one line 392 of JAXBDataBinding. Think the problem is
> that, the CXF bundle is wired to the 2.2 API and the codes load the
> hardcode RI JAXB classes (which should be from JDK).
> From the code logic, seems that it is used for schema things, so does it
> mean that CXF always need the RI JAXB impl ? If does, it it possible to
> have a way to configure a RI class name, as I repackaged the RI jaxb impl
> for some other reasons.
> Thanks.
> -- 
> Ivan

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message