I was able to start the cxf dosgi multi bundle distro by using the settings from karaf. I copied the jre.properties into the config.properties. The resulting config looks like this. https://gist.github.com/4418746
The problem is that this is a lot of configuration. So I am pretty sure most of it is unnecessary and it is also hard to maintain when cxf changes. So the question is how far can we slim this down? Is the stream package the only one we need to modify? Can we define the settings for the stream packages without enumerating the rest of the packages to export? Tang already asked about the package from servicemix stax api. I am also unsure about it. Do we need the stax package from servicemix or is the jre one ok for us? If we do not need the package from servicemix we could simply not load the stax api jar. Christian On 26.12.2012 04:14, Tang Yong wrote: > Deeply, > > Firstly, "Import-Package" section of cxf-api-2.7.1.jar's MANIFEST.MF > needs to be modified in order to use javax.xml.stream package from > org.apache.servicemix.specs.stax-api-1.0-2.1.0.jar rather than system > package, > > [Before modification] > Import-Package: ...,javax.xml.stream;version="[0.0,2)",... > > [After modification] > Import-Package: ...,javax.xml.stream;version="[1.0.1,2)",... > > Secondly, once finishing the above modification and re-launching felix > 4.0.3, another similar error happened: > > ERROR: Bundle org.apache.cxf.cxf-api [53] Error starting > file:/E:/gfv4/apachedcxf/distribution/multi-bundle/target/cxf-dosgi-ri-multibundle-distribution-1.4-SNAPSHOT-dir/apache-cxf-dosgi-ri-1.4-SNAPSHOT/dosgi_bundles/cxf-api-2.7.1.jar > (org.osgi.framework.BundleException: Uses constraint violation. Unable > to resolve bundle revision org.apache.cxf.cxf-api [53.0] because it is > exposed to package 'javax.xml.stream' from bundle revisions > org.apache.servicemix.specs.stax-api-1.0 [22.0] and > org.apache.felix.framework [0] via two dependency chains. > > Chain 1: > org.apache.cxf.cxf-api [53.0] > import: > (&(osgi.wiring.package=javax.xml.stream)(version>=1.0.1)(!(version>=2.0.0))) > | > export: osgi.wiring.package=javax.xml.stream > org.apache.servicemix.specs.stax-api-1.0 [22.0] > > Chain 2: > org.apache.cxf.cxf-api [53.0] > import: (osgi.wiring.package=javax.xml.transform.stax) > | > export: osgi.wiring.package=javax.xml.transform.stax; > uses:=javax.xml.stream > export: osgi.wiring.package=javax.xml.stream > org.apache.felix.framework [0]) > > For such a problem, I made a *temp* confirmation/fixing: modify > felix.jar/default.properties > >
