You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org> on 2018/07/03 09:45:00 UTC
[jira] [Commented] (CXF-7775) embedded jetty websocket gets
ClassCastException: org.eclipse.jetty.servlet.ServletContextHandler$Context
cannot be cast to org.eclipse.jetty.webapp.WebAppContext$Context
[ https://issues.apache.org/jira/browse/CXF-7775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16531119#comment-16531119 ]
Colm O hEigeartaigh commented on CXF-7775:
------------------------------------------
Do you have a test-case that we can use to reproduce the scenario?
> embedded jetty websocket gets ClassCastException: org.eclipse.jetty.servlet.ServletContextHandler$Context cannot be cast to org.eclipse.jetty.webapp.WebAppContext$Context
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CXF-7775
> URL: https://issues.apache.org/jira/browse/CXF-7775
> Project: CXF
> Issue Type: Bug
> Components: Transports
> Affects Versions: 3.2.5
> Reporter: Bin
> Priority: Major
>
> After upgrade from jetty 9.2.5.v20141112 to 9.4.11.v20180605 and cxf from v3.1.5 to v3.2.5, the websocket server code used to work, now getting ClassCastException:
>
> 17:08:07.810 [qtp1128117613-31] WARN org.eclipse.jetty.server.HttpChannel [HttpChannel.java:573] [] - /websocket/
> java.lang.ClassCastException: org.eclipse.jetty.servlet.ServletContextHandler$Context cannot be cast to org.eclipse.jetty.webapp.WebAppContext$Context
> at org.apache.cxf.transport.websocket.jetty9.Jetty9WebSocketDestination.getServer(Jetty9WebSocketDestination.java:125)
> at org.apache.cxf.transport.websocket.jetty9.Jetty9WebSocketDestination.getWebSocketFactory(Jetty9WebSocketDestination.java:132)
> at org.apache.cxf.transport.websocket.jetty9.Jetty9WebSocketDestination.invoke(Jetty9WebSocketDestination.java:102)
> 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)
> 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.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
> at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317)
> at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
> at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
> at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
> at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219)
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
> at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
> at org.eclipse.jetty.server.Server.handle(Server.java:531)
> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352)
> at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
> at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281)
> at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
> at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:291)
> at org.eclipse.jetty.io.ssl.SslConnection$3.succeeded(SslConnection.java:151)
> at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
> at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
> at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
> at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
> at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
> at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
> at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
> at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:762)
> at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:680)
> at java.lang.Thread.run(Thread.java:745)
>
>
> Looks like
> org.apache.cxf.transport.websocket.jetty9.Jetty9WebSocketDestination was changed to assume ServletContext will always be WebAppContext.Context, we are not using WebAppContext in the program.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)