Sorry, I used the wrong line, it is about XML input factory, not XML event factory. At least the code that is currently used.
Specific line of code that fails now: final XMLInputFactory inputFactory = XMLInputFactory.newInstance(); Am Di., 14. Jan. 2020 um 09:00 Uhr schrieb Markus Rathgeb < [email protected]>: > Hi, > > I am still in trouble to migrate an existing code base to the Aries JAX-RS > Whiteboard implementation. > > A code of my own contains the following line: > final XMLEventFactory eventFactory = XMLEventFactory.newInstance(); > > This line works before as expected. > > After the migration I get an exception: > > java.util.ServiceConfigurationError: javax.xml.stream.XMLInputFactory: > Provider com.ctc.wstx.stax.WstxInputFactory 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) > at javax.xml.stream.$FactoryFinder.find($FactoryFinder.java:164) > at javax.xml.stream.$FactoryFinder.find($FactoryFinder.java:106) > at javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:66) > at ... custom code ... > at ... custom code ... > at javax.servlet.http.HttpServlet.service(HttpServlet.java:695) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) > at > org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:852) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604) > at > org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:226) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1591) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:542) > at > org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:536) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) > at > org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1581) > at > org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1307) > at > org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293) > at > org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:482) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1549) > at > org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1204) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) > at > org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:772) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) > at org.eclipse.jetty.server.Server.handle(Server.java:494) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:374) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:268) > at > org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) > at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) > at > org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:426) > at > org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:320) > at > org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:158) > at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) > at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) > at > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) > at > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) > at > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) > at > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) > at > org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918) > at java.lang.Thread.run(Thread.java:748) > > I checked the classes of all bundles in the runtime which one contains > com.ctc.wstx.stax.... ones. > It is the one with BSN "org.apache.aries.jax.rs.whiteboard". > > So, I am assume some bundled stuff in your code base changes the default > XML event factory. > But perhaps not correctly because the provider is not found? > > Can you help? > > I does not expect that the default XML providers are touched by such an > specification implementation at all. > > Best regards, > Markus > > >
