The karaf way to provide java specs is to use "libraries" in the custom
build. These override the spec apis to make them more OSGi friendly.
As the DOSGi feature is built for this style you should add the necessary
libraries:

See:
https://github.com/apache/karaf/blob/master/assemblies/apache-karaf/pom.xml#L192-L209


2017-03-08 0:33 GMT+01:00 ivoleitao <[email protected]>:

> Also and sorry for the spam :-)
>
> In my pax exam my test code above returns the following:
>
> 07-03-2017 23:27:39 [ERROR] - #### XOF INSTANCED ####
> 07-03-2017 23:27:39 [ERROR] - #### XOF CLASSNAME:
> com.sun.xml.internal.stream.XMLOutputFactoryImpl
>
> For paxexam I'm not installing all the bundles from the feature cxf_specs
> (described at
> http://repo.maven.apache.org/maven2/org/apache/cxf/karaf/
> apache-cxf/3.1.7/apache-cxf-3.1.7-features.xml)
>
> I'm doing something like this:
>
>         public static Option cxf_specs() {
>                 return composite(
>                                 systemPackages("javax.xml.stream;
> version=\"1.0.0\"",
> "javax.xml.stream.events; version=\"1.0.0\"",
>                                                 "javax.xml.stream.util;
> version=\"1.0.0\""),
>
> mavenBundle().groupId("org.codehaus.woodstox").artifactId("stax2-api").
> version(versionResolver),
>
> mavenBundle().groupId("org.codehaus.woodstox").
> artifactId("woodstox-core-asl").version(versionResolver),
>                                 mavenBundle().groupId("org.
> apache.servicemix.specs")
>
> .artifactId("org.apache.servicemix.specs.jsr339-api-2.
> 0.1").version(versionResolver));
>         }
>
> I'm not sure if the systemPackages configuration is the "why" this is
> working in paxexam or it's the removal of the other bundles in the
> cxf_specs
> feature (I've had a number of other problems and this was the winning
> combination :-) for paxexam)
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.
> com/DOSGI-2-1-0-calling-soap-service-results-in-javax-xml-
> stream-XMLOutputFactory-cannot-be-created-tp4049778p4049780.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.liquid-reality.de>

Open Source Architect
http://www.talend.com
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.talend.com>

Reply via email to