You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Javier Delgadillo <jd...@esri.com> on 2018/10/25 15:07:52 UTC

Help Running Karaf 4.2.1 + CXF 3.2.6 + JRE8

Hello,

I’m trying to upgrade our application to use more recent versions of Karaf and CXF.  Our app is currently running using Karaf 4.2.1 and CXF 3.2.6 running under JRE 1.8.0_102.  But when I hit rest endpoints, I get an exception.

Below are the cxf features/bundles I’ve got installed:
<feature version="${cxf.version}">cxf</feature>
<feature version="${cxf.version}">cxf-rs-security-cors</feature>
<feature version="${cxf.version}">cxf-rs-description-swagger2</feature>
<bundle>mvn:org.apache.cxf/cxf-rt-rs-security-cors/${cxf.version}</bundle>

Based on the following stacktrace, it seems like the woodstox engine isn’t registered correctly with the JVM:

javax.xml.stream.FactoryConfigurationError: Provider for class javax.xml.stream.XMLOutputFactory cannot be created
        at javax.xml.stream.$FactoryFinder.findServiceProvider($FactoryFinder.java:193) ~[?:?]
        at javax.xml.stream.$FactoryFinder.find($FactoryFinder.java:164) ~[?:?]
        at javax.xml.stream.$FactoryFinder.find($FactoryFinder.java:106) ~[?:?]
        at javax.xml.stream.XMLOutputFactory.newInstance(XMLOutputFactory.java:37) ~[?:?]
        at org.apache.cxf.staxutils.StaxUtils.getXMLOutputFactory(StaxUtils.java:295) ~[?:?]
        at org.apache.cxf.staxutils.StaxUtils.createXMLStreamWriter(StaxUtils.java:410) ~[?:?]
        at org.apache.cxf.interceptor.StaxOutInterceptor.handleMessage(StaxOutInterceptor.java:82) ~[?:?]
        at org.apache.cxf.jaxrs.interceptor.JAXRSDefaultFaultOutInterceptor.handleMessage(JAXRSDefaultFaultOutInterceptor.java:77) ~[?:?]
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[?:?]
        at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:112) ~[?:?]
        at org.apache.cxf.phase.PhaseInterceptorChain.wrapExceptionAsFault(PhaseInterceptorChain.java:374) ~[?:?]
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:332) ~[?:?]
        at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:90) ~[?:?]
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[?:?]
        at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) ~[?:?]
        at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267) ~[?:?]
        at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) ~[?:?]
        at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) ~[?:?]
        at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) ~[?:?]
        at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:216) ~[?:?]
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:301) ~[?:?]
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:225) ~[?:?]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) ~[243:javax.servlet-api:3.1.0]
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:276) ~[?:?]
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865) ~[?:?]
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) ~[?:?]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) ~[?:?]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) ~[?:?]
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293) ~[?:?]
        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) ~[?:?]
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
        at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) ~[?:?]
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
        at org.eclipse.jetty.server.Server.handle(Server.java:531) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352) [414:org.eclipse.jetty.server:9.4.11.v20180605]
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260) [414:org.eclipse.jetty.server:9.4.11.v20180605]
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281) [406:org.eclipse.jetty.io:9.4.11.v20180605]
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) [406:org.eclipse.jetty.io:9.4.11.v20180605]
        at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:291) [406:org.eclipse.jetty.io:9.4.11.v20180605]
        at org.eclipse.jetty.io.ssl.SslConnection$3.succeeded(SslConnection.java:151) [406:org.eclipse.jetty.io:9.4.11.v20180605]
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) [406:org.eclipse.jetty.io:9.4.11.v20180605]
        at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) [406:org.eclipse.jetty.io:9.4.11.v20180605]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) [417:org.eclipse.jetty.util:9.4.11.v20180605]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) [417:org.eclipse.jetty.util:9.4.11.v20180605]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) [417:org.eclipse.jetty.util:9.4.11.v20180605]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) [417:org.eclipse.jetty.util:9.4.11.v20180605]
        at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) [417:org.eclipse.jetty.util:9.4.11.v20180605]
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:762) [417:org.eclipse.jetty.util:9.4.11.v20180605]
        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:680) [417:org.eclipse.jetty.util:9.4.11.v20180605]
        at java.lang.Thread.run(Thread.java:745) [?:?]
Caused by: java.lang.RuntimeException: Provider for class javax.xml.stream.XMLOutputFactory cannot be created
        at javax.xml.stream.$FactoryFinder.findServiceProvider($FactoryFinder.java:192) ~[?:?]
        ... 59 more
Caused by: java.util.ServiceConfigurationError: javax.xml.stream.XMLOutputFactory: Provider com.ctc.wstx.stax.WstxOutputFactory not found
        at java.util.ServiceLoader.fail(ServiceLoader.java:239) ~[?:?]
        at java.util.ServiceLoader.access$300(ServiceLoader.java:185) ~[?:?]
        at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:372) ~[?:?]
        at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404) ~[?:?]
        at java.util.ServiceLoader$1.next(ServiceLoader.java:480) ~[?:?]
        at javax.xml.stream.$FactoryFinder.lambda$findServiceProvider$3($FactoryFinder.java:186) ~[?:?]
        at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
        at javax.xml.stream.$FactoryFinder.findServiceProvider($FactoryFinder.java:181) ~[?:?]
        ... 59 more

Is there something I’m missing from my configuration?  Is there a jar file I need to put in the endorsed directory?


--
Javer Delgadillo | Realtime GIS Engineer/ScrumMaster
Esri | 380 New York St | Redlands, CA 92373 | USA
T 909 793 2853 x1068 | jdelgadillol@esri.com | esri.com

THE
SCIENCE
OF
WHERE™


Re: Help Running Karaf 4.2.1 + CXF 3.2.6 + JRE8

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

Could you please append  a reproducer testcase(your rest endpoint bundle) so that I can take a close look?

Thanks!
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat



> On Oct 25, 2018, at 11:07 PM, Javier Delgadillo <jd...@esri.com> wrote:
> 
> Hello,
> 
> I’m trying to upgrade our application to use more recent versions of Karaf and CXF.  Our app is currently running using Karaf 4.2.1 and CXF 3.2.6 running under JRE 1.8.0_102.  But when I hit rest endpoints, I get an exception.
> 
> Below are the cxf features/bundles I’ve got installed:
> <feature version="${cxf.version}">cxf</feature>
> <feature version="${cxf.version}">cxf-rs-security-cors</feature>
> <feature version="${cxf.version}">cxf-rs-description-swagger2</feature>
> <bundle>mvn:org.apache.cxf/cxf-rt-rs-security-cors/${cxf.version}</bundle>
> 
> Based on the following stacktrace, it seems like the woodstox engine isn’t registered correctly with the JVM:
> 
> javax.xml.stream.FactoryConfigurationError: Provider for class javax.xml.stream.XMLOutputFactory cannot be created
>        at javax.xml.stream.$FactoryFinder.findServiceProvider($FactoryFinder.java:193) ~[?:?]
>        at javax.xml.stream.$FactoryFinder.find($FactoryFinder.java:164) ~[?:?]
>        at javax.xml.stream.$FactoryFinder.find($FactoryFinder.java:106) ~[?:?]
>        at javax.xml.stream.XMLOutputFactory.newInstance(XMLOutputFactory.java:37) ~[?:?]
>        at org.apache.cxf.staxutils.StaxUtils.getXMLOutputFactory(StaxUtils.java:295) ~[?:?]
>        at org.apache.cxf.staxutils.StaxUtils.createXMLStreamWriter(StaxUtils.java:410) ~[?:?]
>        at org.apache.cxf.interceptor.StaxOutInterceptor.handleMessage(StaxOutInterceptor.java:82) ~[?:?]
>        at org.apache.cxf.jaxrs.interceptor.JAXRSDefaultFaultOutInterceptor.handleMessage(JAXRSDefaultFaultOutInterceptor.java:77) ~[?:?]
>        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[?:?]
>        at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:112) ~[?:?]
>        at org.apache.cxf.phase.PhaseInterceptorChain.wrapExceptionAsFault(PhaseInterceptorChain.java:374) ~[?:?]
>        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:332) ~[?:?]
>        at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:90) ~[?:?]
>        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[?:?]
>        at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) ~[?:?]
>        at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267) ~[?:?]
>        at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) ~[?:?]
>        at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) ~[?:?]
>        at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) ~[?:?]
>        at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:216) ~[?:?]
>        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:301) ~[?:?]
>        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:225) ~[?:?]
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) ~[243:javax.servlet-api:3.1.0]
>        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:276) ~[?:?]
>        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865) ~[?:?]
>        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) ~[?:?]
>        at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) ~[?:?]
>        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) ~[?:?]
>        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293) ~[?:?]
>        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) ~[?:?]
>        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) ~[?:?]
>        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.Server.handle(Server.java:531) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352) [414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260) [414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281) [406:org.eclipse.jetty.io:9.4.11.v20180605]
>        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) [406:org.eclipse.jetty.io:9.4.11.v20180605]
>        at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:291) [406:org.eclipse.jetty.io:9.4.11.v20180605]
>        at org.eclipse.jetty.io.ssl.SslConnection$3.succeeded(SslConnection.java:151) [406:org.eclipse.jetty.io:9.4.11.v20180605]
>        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) [406:org.eclipse.jetty.io:9.4.11.v20180605]
>        at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) [406:org.eclipse.jetty.io:9.4.11.v20180605]
>        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) [417:org.eclipse.jetty.util:9.4.11.v20180605]
>        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) [417:org.eclipse.jetty.util:9.4.11.v20180605]
>        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) [417:org.eclipse.jetty.util:9.4.11.v20180605]
>        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) [417:org.eclipse.jetty.util:9.4.11.v20180605]
>        at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) [417:org.eclipse.jetty.util:9.4.11.v20180605]
>        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:762) [417:org.eclipse.jetty.util:9.4.11.v20180605]
>        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:680) [417:org.eclipse.jetty.util:9.4.11.v20180605]
>        at java.lang.Thread.run(Thread.java:745) [?:?]
> Caused by: java.lang.RuntimeException: Provider for class javax.xml.stream.XMLOutputFactory cannot be created
>        at javax.xml.stream.$FactoryFinder.findServiceProvider($FactoryFinder.java:192) ~[?:?]
>        ... 59 more
> Caused by: java.util.ServiceConfigurationError: javax.xml.stream.XMLOutputFactory: Provider com.ctc.wstx.stax.WstxOutputFactory not found
>        at java.util.ServiceLoader.fail(ServiceLoader.java:239) ~[?:?]
>        at java.util.ServiceLoader.access$300(ServiceLoader.java:185) ~[?:?]
>        at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:372) ~[?:?]
>        at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404) ~[?:?]
>        at java.util.ServiceLoader$1.next(ServiceLoader.java:480) ~[?:?]
>        at javax.xml.stream.$FactoryFinder.lambda$findServiceProvider$3($FactoryFinder.java:186) ~[?:?]
>        at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
>        at javax.xml.stream.$FactoryFinder.findServiceProvider($FactoryFinder.java:181) ~[?:?]
>        ... 59 more
> 
> Is there something I’m missing from my configuration?  Is there a jar file I need to put in the endorsed directory?
> 
> 
> --
> Javer Delgadillo | Realtime GIS Engineer/ScrumMaster
> Esri | 380 New York St | Redlands, CA 92373 | USA
> T 909 793 2853 x1068 | jdelgadillol@esri.com | esri.com
> 
> THE
> SCIENCE
> OF
> WHERE™
> 


RE: Help Running Karaf 4.2.1 + CXF 3.2.6 + JRE8

Posted by Javier Delgadillo <jd...@esri.com>.
Yes,

The workaround provided by Freeman fixed the issue for me.

-Javier

-----Original Message-----
From: Freeman Fang <fr...@gmail.com> 
Sent: Thursday, October 25, 2018 6:11 PM
To: users@cxf.apache.org
Subject: Re: Help Running Karaf 4.2.1 + CXF 3.2.6 + JRE8

Hi,

I think this is already fixed, please see my comment here[1]

[1]https://urldefense.proofpoint.com/v2/url?u=http-3A__karaf.922171.n3.nabble.com_Karaf-2D4-2D2-2D1-2DJRE-2D8-2DSTAX-2Dtd4054285.html&d=DwIFaQ&c=n6-cguzQvX_tUIrZOS_4Og&r=JSIxy5AMmEsGoHVm1_3NNX9HNUZaD3GUl-6qX0oX41E&m=943JNd5d4zQpAUMRbSDjXK5Gz_CsydWwOIa2woT2V_c&s=LBSuAoeB3vc88Uv1DjU1xpub4ze-FwelC-77Q3jfT0k&e=
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat



> On Oct 25, 2018, at 11:07 PM, Javier Delgadillo <jd...@esri.com> wrote:
> 
> Hello,
> 
> I’m trying to upgrade our application to use more recent versions of Karaf and CXF.  Our app is currently running using Karaf 4.2.1 and CXF 3.2.6 running under JRE 1.8.0_102.  But when I hit rest endpoints, I get an exception.
> 
> Below are the cxf features/bundles I’ve got installed:
> <feature version="${cxf.version}">cxf</feature>
> <feature version="${cxf.version}">cxf-rs-security-cors</feature>
> <feature 
> version="${cxf.version}">cxf-rs-description-swagger2</feature>
> <bundle>mvn:org.apache.cxf/cxf-rt-rs-security-cors/${cxf.version}</bun
> dle>
> 
> Based on the following stacktrace, it seems like the woodstox engine isn’t registered correctly with the JVM:
> 
> javax.xml.stream.FactoryConfigurationError: Provider for class javax.xml.stream.XMLOutputFactory cannot be created
>        at javax.xml.stream.$FactoryFinder.findServiceProvider($FactoryFinder.java:193) ~[?:?]
>        at javax.xml.stream.$FactoryFinder.find($FactoryFinder.java:164) ~[?:?]
>        at javax.xml.stream.$FactoryFinder.find($FactoryFinder.java:106) ~[?:?]
>        at javax.xml.stream.XMLOutputFactory.newInstance(XMLOutputFactory.java:37) ~[?:?]
>        at org.apache.cxf.staxutils.StaxUtils.getXMLOutputFactory(StaxUtils.java:295) ~[?:?]
>        at org.apache.cxf.staxutils.StaxUtils.createXMLStreamWriter(StaxUtils.java:410) ~[?:?]
>        at org.apache.cxf.interceptor.StaxOutInterceptor.handleMessage(StaxOutInterceptor.java:82) ~[?:?]
>        at org.apache.cxf.jaxrs.interceptor.JAXRSDefaultFaultOutInterceptor.handleMessage(JAXRSDefaultFaultOutInterceptor.java:77) ~[?:?]
>        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[?:?]
>        at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:112) ~[?:?]
>        at org.apache.cxf.phase.PhaseInterceptorChain.wrapExceptionAsFault(PhaseInterceptorChain.java:374) ~[?:?]
>        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:332) ~[?:?]
>        at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:90) ~[?:?]
>        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[?:?]
>        at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) ~[?:?]
>        at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267) ~[?:?]
>        at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) ~[?:?]
>        at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) ~[?:?]
>        at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) ~[?:?]
>        at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:216) ~[?:?]
>        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:301) ~[?:?]
>        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:225) ~[?:?]
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) ~[243:javax.servlet-api:3.1.0]
>        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:276) ~[?:?]
>        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865) ~[?:?]
>        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) ~[?:?]
>        at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) ~[?:?]
>        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) ~[?:?]
>        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293) ~[?:?]
>        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) ~[?:?]
>        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) ~[?:?]
>        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.Server.handle(Server.java:531) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352) [414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260) [414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281) [406:org.eclipse.jetty.io:9.4.11.v20180605]
>        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) [406:org.eclipse.jetty.io:9.4.11.v20180605]
>        at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:291) [406:org.eclipse.jetty.io:9.4.11.v20180605]
>        at org.eclipse.jetty.io.ssl.SslConnection$3.succeeded(SslConnection.java:151) [406:org.eclipse.jetty.io:9.4.11.v20180605]
>        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) [406:org.eclipse.jetty.io:9.4.11.v20180605]
>        at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) [406:org.eclipse.jetty.io:9.4.11.v20180605]
>        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) [417:org.eclipse.jetty.util:9.4.11.v20180605]
>        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) [417:org.eclipse.jetty.util:9.4.11.v20180605]
>        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) [417:org.eclipse.jetty.util:9.4.11.v20180605]
>        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) [417:org.eclipse.jetty.util:9.4.11.v20180605]
>        at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) [417:org.eclipse.jetty.util:9.4.11.v20180605]
>        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:762) [417:org.eclipse.jetty.util:9.4.11.v20180605]
>        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:680) [417:org.eclipse.jetty.util:9.4.11.v20180605]
>        at java.lang.Thread.run(Thread.java:745) [?:?] Caused by: 
> java.lang.RuntimeException: Provider for class javax.xml.stream.XMLOutputFactory cannot be created
>        at javax.xml.stream.$FactoryFinder.findServiceProvider($FactoryFinder.java:192) ~[?:?]
>        ... 59 more
> Caused by: java.util.ServiceConfigurationError: javax.xml.stream.XMLOutputFactory: Provider com.ctc.wstx.stax.WstxOutputFactory not found
>        at java.util.ServiceLoader.fail(ServiceLoader.java:239) ~[?:?]
>        at java.util.ServiceLoader.access$300(ServiceLoader.java:185) ~[?:?]
>        at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:372) ~[?:?]
>        at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404) ~[?:?]
>        at java.util.ServiceLoader$1.next(ServiceLoader.java:480) ~[?:?]
>        at javax.xml.stream.$FactoryFinder.lambda$findServiceProvider$3($FactoryFinder.java:186) ~[?:?]
>        at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
>        at javax.xml.stream.$FactoryFinder.findServiceProvider($FactoryFinder.java:181) ~[?:?]
>        ... 59 more
> 
> Is there something I’m missing from my configuration?  Is there a jar file I need to put in the endorsed directory?
> 
> 
> --
> Javer Delgadillo | Realtime GIS Engineer/ScrumMaster Esri | 380 New 
> York St | Redlands, CA 92373 | USA T 909 793 2853 x1068 | 
> jdelgadillol@esri.com | esri.com
> 
> THE
> SCIENCE
> OF
> WHERE™
> 


Re: Help Running Karaf 4.2.1 + CXF 3.2.6 + JRE8

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

I think this is already fixed, please see my comment here[1]

[1]http://karaf.922171.n3.nabble.com/Karaf-4-2-1-JRE-8-STAX-td4054285.html
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat



> On Oct 25, 2018, at 11:07 PM, Javier Delgadillo <jd...@esri.com> wrote:
> 
> Hello,
> 
> I’m trying to upgrade our application to use more recent versions of Karaf and CXF.  Our app is currently running using Karaf 4.2.1 and CXF 3.2.6 running under JRE 1.8.0_102.  But when I hit rest endpoints, I get an exception.
> 
> Below are the cxf features/bundles I’ve got installed:
> <feature version="${cxf.version}">cxf</feature>
> <feature version="${cxf.version}">cxf-rs-security-cors</feature>
> <feature version="${cxf.version}">cxf-rs-description-swagger2</feature>
> <bundle>mvn:org.apache.cxf/cxf-rt-rs-security-cors/${cxf.version}</bundle>
> 
> Based on the following stacktrace, it seems like the woodstox engine isn’t registered correctly with the JVM:
> 
> javax.xml.stream.FactoryConfigurationError: Provider for class javax.xml.stream.XMLOutputFactory cannot be created
>        at javax.xml.stream.$FactoryFinder.findServiceProvider($FactoryFinder.java:193) ~[?:?]
>        at javax.xml.stream.$FactoryFinder.find($FactoryFinder.java:164) ~[?:?]
>        at javax.xml.stream.$FactoryFinder.find($FactoryFinder.java:106) ~[?:?]
>        at javax.xml.stream.XMLOutputFactory.newInstance(XMLOutputFactory.java:37) ~[?:?]
>        at org.apache.cxf.staxutils.StaxUtils.getXMLOutputFactory(StaxUtils.java:295) ~[?:?]
>        at org.apache.cxf.staxutils.StaxUtils.createXMLStreamWriter(StaxUtils.java:410) ~[?:?]
>        at org.apache.cxf.interceptor.StaxOutInterceptor.handleMessage(StaxOutInterceptor.java:82) ~[?:?]
>        at org.apache.cxf.jaxrs.interceptor.JAXRSDefaultFaultOutInterceptor.handleMessage(JAXRSDefaultFaultOutInterceptor.java:77) ~[?:?]
>        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[?:?]
>        at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:112) ~[?:?]
>        at org.apache.cxf.phase.PhaseInterceptorChain.wrapExceptionAsFault(PhaseInterceptorChain.java:374) ~[?:?]
>        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:332) ~[?:?]
>        at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:90) ~[?:?]
>        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[?:?]
>        at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) ~[?:?]
>        at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267) ~[?:?]
>        at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) ~[?:?]
>        at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) ~[?:?]
>        at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) ~[?:?]
>        at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:216) ~[?:?]
>        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:301) ~[?:?]
>        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:225) ~[?:?]
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) ~[243:javax.servlet-api:3.1.0]
>        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:276) ~[?:?]
>        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865) ~[?:?]
>        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) ~[?:?]
>        at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) ~[?:?]
>        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) ~[?:?]
>        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293) ~[?:?]
>        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) ~[?:?]
>        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) ~[?:?]
>        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.Server.handle(Server.java:531) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352) [414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260) [414:org.eclipse.jetty.server:9.4.11.v20180605]
>        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281) [406:org.eclipse.jetty.io:9.4.11.v20180605]
>        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) [406:org.eclipse.jetty.io:9.4.11.v20180605]
>        at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:291) [406:org.eclipse.jetty.io:9.4.11.v20180605]
>        at org.eclipse.jetty.io.ssl.SslConnection$3.succeeded(SslConnection.java:151) [406:org.eclipse.jetty.io:9.4.11.v20180605]
>        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) [406:org.eclipse.jetty.io:9.4.11.v20180605]
>        at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) [406:org.eclipse.jetty.io:9.4.11.v20180605]
>        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) [417:org.eclipse.jetty.util:9.4.11.v20180605]
>        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) [417:org.eclipse.jetty.util:9.4.11.v20180605]
>        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) [417:org.eclipse.jetty.util:9.4.11.v20180605]
>        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) [417:org.eclipse.jetty.util:9.4.11.v20180605]
>        at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) [417:org.eclipse.jetty.util:9.4.11.v20180605]
>        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:762) [417:org.eclipse.jetty.util:9.4.11.v20180605]
>        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:680) [417:org.eclipse.jetty.util:9.4.11.v20180605]
>        at java.lang.Thread.run(Thread.java:745) [?:?]
> Caused by: java.lang.RuntimeException: Provider for class javax.xml.stream.XMLOutputFactory cannot be created
>        at javax.xml.stream.$FactoryFinder.findServiceProvider($FactoryFinder.java:192) ~[?:?]
>        ... 59 more
> Caused by: java.util.ServiceConfigurationError: javax.xml.stream.XMLOutputFactory: Provider com.ctc.wstx.stax.WstxOutputFactory not found
>        at java.util.ServiceLoader.fail(ServiceLoader.java:239) ~[?:?]
>        at java.util.ServiceLoader.access$300(ServiceLoader.java:185) ~[?:?]
>        at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:372) ~[?:?]
>        at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404) ~[?:?]
>        at java.util.ServiceLoader$1.next(ServiceLoader.java:480) ~[?:?]
>        at javax.xml.stream.$FactoryFinder.lambda$findServiceProvider$3($FactoryFinder.java:186) ~[?:?]
>        at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
>        at javax.xml.stream.$FactoryFinder.findServiceProvider($FactoryFinder.java:181) ~[?:?]
>        ... 59 more
> 
> Is there something I’m missing from my configuration?  Is there a jar file I need to put in the endorsed directory?
> 
> 
> --
> Javer Delgadillo | Realtime GIS Engineer/ScrumMaster
> Esri | 380 New York St | Redlands, CA 92373 | USA
> T 909 793 2853 x1068 | jdelgadillol@esri.com | esri.com
> 
> THE
> SCIENCE
> OF
> WHERE™
> 


Re: Help Running Karaf 4.2.1 + CXF 3.2.6 + JRE8

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Javier,

that should be already fixed. Can you try with 4.2.2-SNAPSHOT ?

Regards
JB

On 25/10/2018 17:07, Javier Delgadillo wrote:
> Hello,
> 
> I’m trying to upgrade our application to use more recent versions of Karaf and CXF.  Our app is currently running using Karaf 4.2.1 and CXF 3.2.6 running under JRE 1.8.0_102.  But when I hit rest endpoints, I get an exception.
> 
> Below are the cxf features/bundles I’ve got installed:
> <feature version="${cxf.version}">cxf</feature>
> <feature version="${cxf.version}">cxf-rs-security-cors</feature>
> <feature version="${cxf.version}">cxf-rs-description-swagger2</feature>
> <bundle>mvn:org.apache.cxf/cxf-rt-rs-security-cors/${cxf.version}</bundle>
> 
> Based on the following stacktrace, it seems like the woodstox engine isn’t registered correctly with the JVM:
> 
> javax.xml.stream.FactoryConfigurationError: Provider for class javax.xml.stream.XMLOutputFactory cannot be created
>         at javax.xml.stream.$FactoryFinder.findServiceProvider($FactoryFinder.java:193) ~[?:?]
>         at javax.xml.stream.$FactoryFinder.find($FactoryFinder.java:164) ~[?:?]
>         at javax.xml.stream.$FactoryFinder.find($FactoryFinder.java:106) ~[?:?]
>         at javax.xml.stream.XMLOutputFactory.newInstance(XMLOutputFactory.java:37) ~[?:?]
>         at org.apache.cxf.staxutils.StaxUtils.getXMLOutputFactory(StaxUtils.java:295) ~[?:?]
>         at org.apache.cxf.staxutils.StaxUtils.createXMLStreamWriter(StaxUtils.java:410) ~[?:?]
>         at org.apache.cxf.interceptor.StaxOutInterceptor.handleMessage(StaxOutInterceptor.java:82) ~[?:?]
>         at org.apache.cxf.jaxrs.interceptor.JAXRSDefaultFaultOutInterceptor.handleMessage(JAXRSDefaultFaultOutInterceptor.java:77) ~[?:?]
>         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[?:?]
>         at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:112) ~[?:?]
>         at org.apache.cxf.phase.PhaseInterceptorChain.wrapExceptionAsFault(PhaseInterceptorChain.java:374) ~[?:?]
>         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:332) ~[?:?]
>         at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:90) ~[?:?]
>         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[?:?]
>         at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) ~[?:?]
>         at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267) ~[?:?]
>         at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) ~[?:?]
>         at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) ~[?:?]
>         at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) ~[?:?]
>         at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:216) ~[?:?]
>         at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:301) ~[?:?]
>         at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:225) ~[?:?]
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) ~[243:javax.servlet-api:3.1.0]
>         at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:276) ~[?:?]
>         at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865) ~[?:?]
>         at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) ~[?:?]
>         at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) ~[?:?]
>         at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>         at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) ~[?:?]
>         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>         at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>         at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>         at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>         at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>         at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293) ~[?:?]
>         at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>         at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) ~[?:?]
>         at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>         at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>         at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>         at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>         at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) ~[?:?]
>         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>         at org.eclipse.jetty.server.Server.handle(Server.java:531) ~[414:org.eclipse.jetty.server:9.4.11.v20180605]
>         at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352) [414:org.eclipse.jetty.server:9.4.11.v20180605]
>         at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260) [414:org.eclipse.jetty.server:9.4.11.v20180605]
>         at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281) [406:org.eclipse.jetty.io:9.4.11.v20180605]
>         at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) [406:org.eclipse.jetty.io:9.4.11.v20180605]
>         at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:291) [406:org.eclipse.jetty.io:9.4.11.v20180605]
>         at org.eclipse.jetty.io.ssl.SslConnection$3.succeeded(SslConnection.java:151) [406:org.eclipse.jetty.io:9.4.11.v20180605]
>         at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) [406:org.eclipse.jetty.io:9.4.11.v20180605]
>         at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) [406:org.eclipse.jetty.io:9.4.11.v20180605]
>         at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) [417:org.eclipse.jetty.util:9.4.11.v20180605]
>         at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) [417:org.eclipse.jetty.util:9.4.11.v20180605]
>         at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) [417:org.eclipse.jetty.util:9.4.11.v20180605]
>         at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) [417:org.eclipse.jetty.util:9.4.11.v20180605]
>         at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) [417:org.eclipse.jetty.util:9.4.11.v20180605]
>         at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:762) [417:org.eclipse.jetty.util:9.4.11.v20180605]
>         at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:680) [417:org.eclipse.jetty.util:9.4.11.v20180605]
>         at java.lang.Thread.run(Thread.java:745) [?:?]
> Caused by: java.lang.RuntimeException: Provider for class javax.xml.stream.XMLOutputFactory cannot be created
>         at javax.xml.stream.$FactoryFinder.findServiceProvider($FactoryFinder.java:192) ~[?:?]
>         ... 59 more
> Caused by: java.util.ServiceConfigurationError: javax.xml.stream.XMLOutputFactory: Provider com.ctc.wstx.stax.WstxOutputFactory not found
>         at java.util.ServiceLoader.fail(ServiceLoader.java:239) ~[?:?]
>         at java.util.ServiceLoader.access$300(ServiceLoader.java:185) ~[?:?]
>         at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:372) ~[?:?]
>         at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404) ~[?:?]
>         at java.util.ServiceLoader$1.next(ServiceLoader.java:480) ~[?:?]
>         at javax.xml.stream.$FactoryFinder.lambda$findServiceProvider$3($FactoryFinder.java:186) ~[?:?]
>         at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
>         at javax.xml.stream.$FactoryFinder.findServiceProvider($FactoryFinder.java:181) ~[?:?]
>         ... 59 more
> 
> Is there something I’m missing from my configuration?  Is there a jar file I need to put in the endorsed directory?
> 
> 
> --
> Javer Delgadillo | Realtime GIS Engineer/ScrumMaster
> Esri | 380 New York St | Redlands, CA 92373 | USA
> T 909 793 2853 x1068 | jdelgadillol@esri.com | esri.com
> 
> THE
> SCIENCE
> OF
> WHERE™
>