com.sun contains the sun private packages. These normally should not be imported as they tie your code to the oracle vm.

They are typically used when the standard jaxb impl is created from a factory. I typically use boot delegation.
If you look into the karaf config.properties you should see:
org.osgi.framework.bootdelegation = \
    com.sun.*, \

Boot delegation is a bit of a two bladed sword but it is very useful to leverage jdk default impls of specs like jaxb.

Having said that .. normally you do not need to change anything there as the karaf defaults should work.

Christian

On 03.02.2017 09:07, nino martinez wael wrote:
Hi Guys

Im in quite a peril here.

On in my pax exam test everythings fine. BUT after building my karaf
assembly and moving to offline systems, this shows up:
[java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory not
found by org.apache.cxf.cxf-rt-transports-http [165]]

Trying a manual approch, thinking that cxf-rt-transports-http had some
dynamic import resolving to

<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-impl/2.2.11_1</bundle>

I then forced that bundle to be installed before touching DOSGI / CXF.
It has made no change.

Interestingly enough the only mentions for the servix mix bundle are these:

Importing Bundles(on both working systems) org.apache.cxf.cxf-core
(140) <http://localhost:8181/system/console/bundles/140>
org.apache.servicemix.bundles.jaxb-xjc (201)
<http://localhost:8181/system/console/bundles/201>





--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

Reply via email to