aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlos Sierra Andrés (Jira) <j...@apache.org>
Subject [jira] [Commented] (ARIES-1965) XMLInputFactory gets broken
Date Mon, 27 Jan 2020 11:40:00 GMT

    [ https://issues.apache.org/jira/browse/ARIES-1965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17024288#comment-17024288
] 

Carlos Sierra Andrés commented on ARIES-1965:
---------------------------------------------

Hi [~maggu2810],

thx for reporting this. Can you tell us at which point in the application lifecycle it is
trying to load the class?

by the stack trace it looks like this is happening whie trying to serve the request, but can
you please confirm?

The different whiteboards involved should set the appropiate thread context class loaders
to the different involved bundles, but maybe we missed some. This means your bundle should
be set as the TCCL to serve the request, does your bundle provide this classes or imports
to other bundles that might have them?

Even though the whiteboard has those classes internally it does not mean it is the one it
is not finding them. If the whiteboard is setting the TCCL properly to your bundle it should
be your bundle the one that provided a implementation of the factory, and the SPI declaration.

Carlos.

> XMLInputFactory gets broken
> ---------------------------
>
>                 Key: ARIES-1965
>                 URL: https://issues.apache.org/jira/browse/ARIES-1965
>             Project: Aries
>          Issue Type: Bug
>          Components: jax-rs-whiteboard
>    Affects Versions: jax-rs-whiteboard-1.0.5
>            Reporter: Markus Rathgeb
>            Priority: Major
>
> In my code I used the following line:
> {code:java}
> final XMLInputFactory inputFactory = XMLInputFactory.newInstance();{code}
> After adding the Aires JAX-RS Whiteboard this does not work anymore but raises a service
configuration error.
> {noformat}
> 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){noformat}
> 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.
>  
> I does not expect that the default XML providers are touched by such an specification
implementation at all, but I assume no one cares as long as it is still working.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message